コード例 #1
0
        //End sending data to the simulator.
        private void SettingsMenuItem_Click(object sender, EventArgs e)
        {
            Settings.Default.PropertyChanged += onChange;
            frmSettings settings = new frmSettings();

            settings.ShowDialog();
            if (settings.DialogResult == DialogResult.OK)
            {
                if (Properties.Settings.Default.AvionicsTabChangeFlag)
                {
                    MessageBox.Show("You must restart TFM for the avionics tab changes to take affect", "restart required", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                Properties.Settings.Default.Save();
            }
            else
            {
                Properties.Settings.Default.Reload();
            }
        }
コード例 #2
0
        } // ShowIssueTracker.

        private void ShowSettings()
        {
            /// TODO: TFM main form: Remove avionics tab from settings.
            /// TODO: TFM main form: Make displaying settings reusable code in the global scope.
            ///
            frmSettings settings = new frmSettings();

            settings.ShowDialog();
            if (settings.DialogResult == DialogResult.OK)
            {
                if (Properties.Settings.Default.AvionicsTabChangeFlag)
                {
                    MessageBox.Show("You must restart TFM for the avionics tab changes to take affect", "restart required", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                Properties.Settings.Default.Save();
            }
            else
            {
                Properties.Settings.Default.Reload();
            }
        } // ShowSettings.