コード例 #1
0
        /// <summary>
        /// Startup steps, when the page is loaded.
        /// </summary>
        private void InputWizardWalkthrough_Loaded(object sender, RoutedEventArgs e)
        {
            m_history = new List <string>()
            {
                "Welcome"
            };

            if (IsolatedStorageManager.SettingExists("ShowWalkthroughAtStartup"))
            {
                DoNotShowCheckBox.IsChecked = !Convert.ToBoolean(IsolatedStorageManager.ReadFromIsolatedStorage("ShowWalkthroughAtStartup"));
            }
        }
コード例 #2
0
        private void InputWizardUserControl_Loaded(object sender, RoutedEventArgs e)
        {
            bool showWalkthrough = true;

            if (IsolatedStorageManager.SettingExists("ShowWalkthroughAtStartup"))
            {
                showWalkthrough = Convert.ToBoolean(IsolatedStorageManager.ReadFromIsolatedStorage("ShowWalkthroughAtStartup"));
            }

            if (showWalkthrough)
            {
                m_dataContext.LaunchWalkthroughCommand.Execute(null);
            }
        }
コード例 #3
0
        /// <summary>
        /// Attempts to run the PMU Connection Tester from a number of different locations.
        /// </summary>
        private void RunConnectionTesterQuery_Yes(object sender, RoutedEventArgs e)
        {
            const string Executable = "PMUConnectionTester.exe";

            string currentDirectory             = FilePath.GetAbsolutePath("");
            string openPDCDirectory             = FilePath.GetAbsolutePath(@"..\openPDC");
            string pmuConnectionTesterDirectory = FilePath.GetAbsolutePath(@"..\PMU Connection Tester");
            string fullPath = null;
            bool   failed   = false;

            if (IsolatedStorageManager.SettingExists("PMUConnectionTester.exe"))
            {
                fullPath = IsolatedStorageManager.ReadFromIsolatedStorage("PMUConnectionTester.exe").ToNonNullString();
            }

            if (!TryRunConnectionTester(fullPath))
            {
                fullPath = Path.Combine(currentDirectory, Executable);

                if (!TryRunConnectionTester(fullPath))
                {
                    fullPath = Path.Combine(openPDCDirectory, Executable);

                    if (!TryRunConnectionTester(fullPath))
                    {
                        fullPath = Path.Combine(pmuConnectionTesterDirectory, Executable);

                        if (!TryRunConnectionTester(fullPath))
                        {
                            failed = true;
                        }
                    }
                }
            }

            if (failed)
            {
                TraverseDecisionTree("ConnectionTesterPathInput");
            }
            else
            {
                TraverseDecisionTree("ConnectionFileQuery");
            }
        }