Пример #1
0
        private void RunSetupWizard()
        {
            if (PluginMain.GetApplication().Logbook != null &&
                PluginMain.GetApplication().ActiveView == this)
            {
                byte[] extensionData = PluginMain.GetApplication().Logbook.GetExtensionData(GUIDs.PluginMain);

                if (extensionData == null || extensionData.Length == 0)
                {
                    GarminWorkoutManager.Instance.RemoveAllWorkouts();
                    GarminProfileManager.Instance.UserProfile.Cleanup();
                    Options.Instance.ResetLogbookSettings();
                    Utils.SaveDataToLogbook();

                    // Show the wizard on first run
                    GarminFitnessSetupWizard wizard = new GarminFitnessSetupWizard();

                    wizard.ShowDialog();
                }
            }
        }
        private void RunSetupWizard()
        {
            if (PluginMain.GetApplication().Logbook != null &&
                PluginMain.GetApplication().ActiveView.Id == GUIDs.SettingsView &&
                PluginMain.GetApplication().ActiveView.SubTitle == this.Title)
            {
                byte[] extensionData = PluginMain.GetApplication().Logbook.GetExtensionData(GUIDs.PluginMain);

                if (extensionData == null || extensionData.Length == 0)
                {
                    Utils.SaveDataToLogbook();

                    // Show the wizard on first run
                    GarminFitnessSetupWizard wizard = new GarminFitnessSetupWizard();

                    wizard.ShowDialog();
                }
            }
        }
        private void RunWizardLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            GarminFitnessSetupWizard wizard = new GarminFitnessSetupWizard();

            wizard.ShowDialog();
        }