Esempio n. 1
0
        // No comments here -- these are self-explanatory.

        private void configureToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SamplingConfig sc = new SamplingConfig(viewModel);

            ViewModel.ControllerTypes ct = viewModel.Settings.ControllerType;

            if (sc.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                viewModel.ConfigChanged = true;

                // If the controller type changed, close/re-open the controller.
                if (ct != viewModel.Settings.ControllerType)
                {
                    viewModel.Close();
                    viewModel.Open();
                }
            }

            sc.Dispose();
        }
Esempio n. 2
0
        // No comments here -- these are self-explanatory.
        private void configureToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SamplingConfig sc = new SamplingConfig(viewModel);
            ViewModel.ControllerTypes ct = viewModel.Settings.ControllerType;

            if (sc.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                viewModel.ConfigChanged = true;

                // If the controller type changed, close/re-open the controller.
                if (ct != viewModel.Settings.ControllerType)
                {
                    viewModel.Close();
                    viewModel.Open();
                }
            }

            sc.Dispose();
        }