Bugfixes
This commit is contained in:
@@ -33,6 +33,7 @@ namespace YJMPD_UWP.Model
|
|||||||
public GameStatus Status { get; private set; }
|
public GameStatus Status { get; private set; }
|
||||||
|
|
||||||
public List<Player> Players { get; private set; }
|
public List<Player> Players { get; private set; }
|
||||||
|
public BasicGeoposition Destination { get; private set; }
|
||||||
|
|
||||||
public bool Selected { get; private set; }
|
public bool Selected { get; private set; }
|
||||||
|
|
||||||
@@ -73,6 +74,7 @@ namespace YJMPD_UWP.Model
|
|||||||
Players = new List<Player>();
|
Players = new List<Player>();
|
||||||
Status = GameStatus.STOPPED;
|
Status = GameStatus.STOPPED;
|
||||||
Selected = false;
|
Selected = false;
|
||||||
|
Destination = new BasicGeoposition() { Altitude = -1 };
|
||||||
App.Photo.OnStatusUpdate += Photo_OnStatusUpdate;
|
App.Photo.OnStatusUpdate += Photo_OnStatusUpdate;
|
||||||
GeofenceMonitor.Current.GeofenceStateChanged += Current_GeofenceStateChanged;
|
GeofenceMonitor.Current.GeofenceStateChanged += Current_GeofenceStateChanged;
|
||||||
}
|
}
|
||||||
@@ -149,6 +151,8 @@ namespace YJMPD_UWP.Model
|
|||||||
{
|
{
|
||||||
App.Navigate(typeof(MatchView));
|
App.Navigate(typeof(MatchView));
|
||||||
|
|
||||||
|
Destination = bgps;
|
||||||
|
|
||||||
GeofenceMonitor.Current.Geofences.Add(new Geofence("destination", new Geocircle(bgps, 50), MonitoredGeofenceStates.Entered | MonitoredGeofenceStates.Exited, false, TimeSpan.FromSeconds(1)));
|
GeofenceMonitor.Current.Geofences.Add(new Geofence("destination", new Geocircle(bgps, 50), MonitoredGeofenceStates.Entered | MonitoredGeofenceStates.Exited, false, TimeSpan.FromSeconds(1)));
|
||||||
|
|
||||||
UpdateGameStatus(GameStatus.STARTED);
|
UpdateGameStatus(GameStatus.STARTED);
|
||||||
@@ -171,6 +175,7 @@ namespace YJMPD_UWP.Model
|
|||||||
{
|
{
|
||||||
App.Photo.Reset();
|
App.Photo.Reset();
|
||||||
Selected = false;
|
Selected = false;
|
||||||
|
Destination = new BasicGeoposition() { Altitude = -1 };
|
||||||
Players.Clear();
|
Players.Clear();
|
||||||
GeofenceMonitor.Current.Geofences.Clear();
|
GeofenceMonitor.Current.Geofences.Clear();
|
||||||
UpdateGamePlayers(null);
|
UpdateGamePlayers(null);
|
||||||
|
|||||||
@@ -85,8 +85,8 @@ namespace YJMPD_UWP.Model
|
|||||||
geo = new Geolocator
|
geo = new Geolocator
|
||||||
{
|
{
|
||||||
DesiredAccuracy = PositionAccuracy.High,
|
DesiredAccuracy = PositionAccuracy.High,
|
||||||
MovementThreshold = 3
|
//MovementThreshold = 3
|
||||||
//ReportInterval = 1500
|
ReportInterval = 1500
|
||||||
};
|
};
|
||||||
|
|
||||||
ClearHistory();
|
ClearHistory();
|
||||||
@@ -131,8 +131,7 @@ namespace YJMPD_UWP.Model
|
|||||||
|
|
||||||
private void Geo_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
|
private void Geo_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
|
||||||
{
|
{
|
||||||
|
UpdatePosition(args.Position);
|
||||||
UpdatePosition(args.Position);
|
|
||||||
|
|
||||||
if(trackhistory)
|
if(trackhistory)
|
||||||
_history.Add(args.Position);
|
_history.Add(args.Position);
|
||||||
|
|||||||
@@ -25,12 +25,13 @@ namespace YJMPD_UWP.Model
|
|||||||
|
|
||||||
public PhotoHandler()
|
public PhotoHandler()
|
||||||
{
|
{
|
||||||
|
Photo = "ms-appx:///Assets/Error.png";
|
||||||
Status = PhotoStatus.NOPHOTO;
|
Status = PhotoStatus.NOPHOTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Reset()
|
public void Reset()
|
||||||
{
|
{
|
||||||
Photo = null;
|
Photo = "ms-appx:///Assets/Error.png";
|
||||||
Status = PhotoStatus.NOPHOTO;
|
Status = PhotoStatus.NOPHOTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user