Exemple #1
0
        private void StartTrackingClick(object sender, RoutedEventArgs e)
        {
            isTracking             = true;
            positionLoggingCounter = 0;

            Dispatcher.BeginInvoke(() =>
            {
                StopTrackingButton.IsEnabled  = true;
                StartTrackingButton.IsEnabled = false;

                if (RunnerIDInput.Text == "")
                {
                    RunnerIDInput.Text = "-1";
                }

                // Save values
                IsolatedStorageSettings.ApplicationSettings["RunnerID"]      = int.Parse(RunnerIDInput.Text);
                IsolatedStorageSettings.ApplicationSettings["ServerAddress"] = ServerAddressInput.Text;
                IsolatedStorageSettings.ApplicationSettings["RunnerName"]    = NameInput.Text;
                IsolatedStorageSettings.ApplicationSettings["Password"]      = PasswordInput.Text;

                IsolatedStorageSettings.ApplicationSettings.Save();

                RGSender = new RGSender(this);
                InitializeGeolocator();
            });
        }
Exemple #2
0
        private void StopTracking()
        {
            isTracking = false;

            Dispatcher.BeginInvoke(() => {
                StopTrackingButton.IsEnabled  = false;
                StartTrackingButton.IsEnabled = true;
            });

            RGSender.Stop();
            RGSender = null;
        }
Exemple #3
0
        private void StopTracking()
        {
            isTracking = false;

            Dispatcher.BeginInvoke(() => {
                StopTrackingButton.IsEnabled = false;
                StartTrackingButton.IsEnabled = true;
            });

            RGSender.Stop();
            RGSender = null;
        }
Exemple #4
0
        private void StartTrackingClick(object sender, RoutedEventArgs e)
        {
            isTracking = true;
            positionLoggingCounter = 0;

            Dispatcher.BeginInvoke(() =>
            {
                StopTrackingButton.IsEnabled = true;
                StartTrackingButton.IsEnabled = false;

                if (RunnerIDInput.Text == "")
                    RunnerIDInput.Text = "-1";

                // Save values
                IsolatedStorageSettings.ApplicationSettings["RunnerID"] = int.Parse(RunnerIDInput.Text);
                IsolatedStorageSettings.ApplicationSettings["ServerAddress"] = ServerAddressInput.Text;
                IsolatedStorageSettings.ApplicationSettings["RunnerName"] = NameInput.Text;
                IsolatedStorageSettings.ApplicationSettings["Password"] = PasswordInput.Text;

                IsolatedStorageSettings.ApplicationSettings.Save();

                RGSender = new RGSender(this);
                InitializeGeolocator();
            });
        }