public RegistrationViewModel() { sharedData = SingletonSharedData.GetInstance(); serverClient = new ServerClient(); RegisterAccountCommand = new Command(RegisterAccount); UsernameOnFocusCommand = new Command(UsernameOnFocus); GoToLoginCommand = new Command(GoToLogin); }
public EventPopupViewModel(Event selectedEvent) { sharedData = SingletonSharedData.GetInstance(); serverClient = new ServerClient(); NavigateToMapCMD = new Command(NavigateToMap); this.SelectedEvent = selectedEvent; SetupBinding(); PopupNavigation.PopAllAsync(); }
/// <summary> /// Starts tracking in a new Thread /// </summary> private void StartService() { Thread thread = new Thread(() => { SingletonSharedData sharedData = SingletonSharedData.GetInstance(); sharedData.TrackingPoupViewModel.Track(); }); thread.Start(); }
public LoginViewModel() { serverClient = new ServerClient(); sharedData = SingletonSharedData.GetInstance(); dataController = new DataController(); LoginCMD = new Command(Login); EntryFocusedCommand = new Command(EntryFocused); LoginClickedCMD = new Command(Login); }
public MapViewModel() { serverClient = new ServerClient(); sharedData = SingletonSharedData.GetInstance(); StopFollowingCMD = new Command(StopFollowing); SetSpeedCMD = new Command <String>(SetSpeed); PlayPauseCMD = new Command(PlayPause); InitialSetup(); }
public MasterDetailViewModel() { sharedData = SingletonSharedData.GetInstance(); dataController = new DataController(); serverClient = new ServerClient(); MenuItems = new ObservableCollection <MasterMenuItems>(); LogOutCMD = new Command(LogOut); HomeClickedCMD = new Command(HomeClicked); OnAppearing(); }
public ActionsViewModel() { sharedData = SingletonSharedData.GetInstance(); IsLockIDEnabled = true; LockIDFocusedCommand = new Command(LockIDFocused); NavigateScannerViewCommand = new Command(NavigateScannerView); LockCommand = new Command(Lock); UnlockCommand = new Command(Unlock); ShareWithFriendCommand = new Command(ShareWithFriend); RemoveSharedCommand = new Command(RemoveShared); serverClient = new ServerClient(); LockVisible = true; }
public LoginViewModel() { ((MasterDetailPage)Application.Current.MainPage).IsGestureEnabled = false; if (username != null) { Username = username; } if (Application.Current.Properties.ContainsKey("username")) { Username = Application.Current.Properties["username"].ToString(); } LoginCommand = new Command(Login); GoToRegisterPageCommand = new Command(GoToRegisterPage); OnEntryFocusedCommand = new Command(OnEntryFocused); serverClient = new ServerClient(); sharedData = SingletonSharedData.GetInstance(); }
public LoginViewModel() { try { serverClient = new ServerClient(); sharedData = SingletonSharedData.GetInstance(); dataController = new DataController(); LoginCMD = new Command(Login); EntryFocusedCommand = new Command(EntryFocused); LoginClickedCMD = new Command(Login); ResetPasswordCMD = new Command(ResetPassword); } catch (Exception e) { Console.WriteLine("LoginViewmodel init error"); } }
public MasterDetailViewModel() { try { sharedData = SingletonSharedData.GetInstance(); dataController = new DataController(); serverClient = new ServerClient(); MenuItems = new ObservableCollection <MasterMenuItems>(); LogOutCMD = new Command(LogOut); HomeClickedCMD = new Command(HomeClicked); OnAppearing(); } catch (Exception e) { Console.WriteLine("masterdetailviewmodel init error"); } }
public MapViewModel() { try { serverClient = new ServerClient(); sharedData = SingletonSharedData.GetInstance(); StopFollowingCMD = new Command(StopFollowing); SetSpeedCMD = new Command <String>(SetSpeed); PlayPauseCMD = new Command(PlayPause); InitialSetup(); } catch (Exception e) { Console.WriteLine("mapviewmodel init error"); } }
public TrackingPoupViewModel(TrackingEventViewModel trackingEventViewModel, TrackingEvent selectedEvent) { serverClient = new ServerClient(); sharedData = SingletonSharedData.GetInstance(); sharedData.TrackingPoupViewModel = this; this.selectedEvent = selectedEvent; this.trackingEventViewModel = trackingEventViewModel; SlideCompletedCMD = new Command(SlideCompleted); InitializeTrackingText(); MessagingCenter.Subscribe <String>(this, "TrackingStopped", (value) => { StopTracking(); }); }
private async Task InternalNavigateToAsync(Type viewModelType, object parameter) { Page page = CreatePage(viewModelType, parameter); var mpage = Application.Current.MainPage as MasterDetailPage; mpage.Detail = new NavigationPage(page); if (viewModelType == typeof(LoginViewModel)) { SingletonSharedData sharedData = SingletonSharedData.GetInstance(); page.BindingContext = new LoginViewModel(); } else { await(page.BindingContext as BaseViewModel).InitializeAsync(parameter); } }
public MapView() { InitializeComponent(); Map.CustomPins = new List <CustomPin>(); sharedData = SingletonSharedData.GetInstance(); }
public CustomMapRenderer(Context context) : base(context) { sharedData = SingletonSharedData.GetInstance(); serverClient = new ServerClient(); }
/// <summary> /// Gets the result of the scan and saves it to the SharedData class /// </summary> private async void OnScan() { SingletonSharedData.GetInstance().ScannedBikestandID = result.Text; await NavigationService.NavigateToAsync(typeof(ActionsViewModel)); }