NexStar.Telescope/Driver.cs
/// <summary>
/// Displays the Setup Dialog form.
/// If the user clicks the OK button to dismiss the form, then
/// the new settings are saved, otherwise the old values are reloaded.
/// THIS IS THE ONLY PLACE WHERE SHOWING USER INTERFACE IS ALLOWED!
/// </summary>
Displays the Setup Dialog form.
If the user clicks the OK button to dismiss the form, then
the new settings are saved, otherwise the old values are reloaded.
Displays the Setup Dialog form . If the user clicks the OK button to dismiss the form then the new settings are saved otherwise the old values are reloaded .
public void SetupDialog()
        {
            if (IsConnected)
                System.Windows.Forms.MessageBox.Show("Already connected, just press OK");
            using (SetupDialogForm F = new SetupDialogForm())
            {
                var result = F.ShowDialog();
                if (result == System.Windows.Forms.DialogResult.OK)
                {
                    Properties.Settings.Default.Save();
                    return;
                }
                Properties.Settings.Default.Reload();
            }
        }
public void SetupDialog ( ) { if ( IsConnected ) System . Windows . Forms . MessageBox . Show ( " " ) ; using ( SetupDialogForm F = new SetupDialogForm ( ) ) { var result = F . ShowDialog ( ) ; if ( result == System . Windows . Forms . DialogResult . OK ) { Properties . Settings . Default . Save ( ) ; return ; } Properties . Settings . Default . Reload ( ) ; } }
Displays the Setup Dialog form.
Displays the Setup Dialog form .
// consider only showing the setup dialog if not connected // or call a different dialog if connected