Example #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();
            });
        }
Example #2
0
        private void StopTracking()
        {
            isTracking = false;

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

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

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

            RGSender.Stop();
            RGSender = null;
        }
Example #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();
            });
        }