Ejemplo n.º 1
0
 public RegistrationViewModel()
 {
     sharedData             = SingletonSharedData.GetInstance();
     serverClient           = new ServerClient();
     RegisterAccountCommand = new Command(RegisterAccount);
     UsernameOnFocusCommand = new Command(UsernameOnFocus);
     GoToLoginCommand       = new Command(GoToLogin);
 }
Ejemplo n.º 2
0
        public EventPopupViewModel(Event selectedEvent)
        {
            sharedData         = SingletonSharedData.GetInstance();
            serverClient       = new ServerClient();
            NavigateToMapCMD   = new Command(NavigateToMap);
            this.SelectedEvent = selectedEvent;

            SetupBinding();
            PopupNavigation.PopAllAsync();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Starts tracking in a new Thread
        /// </summary>
        private void StartService()
        {
            Thread thread = new Thread(() =>
            {
                SingletonSharedData sharedData = SingletonSharedData.GetInstance();
                sharedData.TrackingPoupViewModel.Track();
            });

            thread.Start();
        }
Ejemplo n.º 4
0
        public LoginViewModel()
        {
            serverClient   = new ServerClient();
            sharedData     = SingletonSharedData.GetInstance();
            dataController = new DataController();

            LoginCMD            = new Command(Login);
            EntryFocusedCommand = new Command(EntryFocused);
            LoginClickedCMD     = new Command(Login);
        }
Ejemplo n.º 5
0
        public MapViewModel()
        {
            serverClient = new ServerClient();
            sharedData   = SingletonSharedData.GetInstance();

            StopFollowingCMD = new Command(StopFollowing);
            SetSpeedCMD      = new Command <String>(SetSpeed);
            PlayPauseCMD     = new Command(PlayPause);

            InitialSetup();
        }
Ejemplo n.º 6
0
        public MasterDetailViewModel()
        {
            sharedData     = SingletonSharedData.GetInstance();
            dataController = new DataController();
            serverClient   = new ServerClient();

            MenuItems = new ObservableCollection <MasterMenuItems>();

            LogOutCMD      = new Command(LogOut);
            HomeClickedCMD = new Command(HomeClicked);
            OnAppearing();
        }
Ejemplo n.º 7
0
        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;
        }
Ejemplo n.º 8
0
 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");
            }
        }
Ejemplo n.º 10
0
        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");
            }
        }
Ejemplo n.º 11
0
        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");
            }
        }
Ejemplo n.º 12
0
        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();
            });
        }
Ejemplo n.º 13
0
        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);
            }
        }
Ejemplo n.º 14
0
 public MapView()
 {
     InitializeComponent();
     Map.CustomPins = new List <CustomPin>();
     sharedData     = SingletonSharedData.GetInstance();
 }
 public CustomMapRenderer(Context context) : base(context)
 {
     sharedData   = SingletonSharedData.GetInstance();
     serverClient = new ServerClient();
 }
Ejemplo n.º 16
0
 /// <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));
 }