From 5501e97b7e6c3a7f63f5a2978d8892f102253595 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 4 Jun 2019 19:52:44 +0100 Subject: [PATCH] Added a call to activate when the setup dialog is shown. --- Meade.net/SetupDialogForm.cs | 5 +++++ Meade.net/SetupDialogForm.designer.cs | 1 + Meade.net/SharedResources.cs | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Meade.net/SetupDialogForm.cs b/Meade.net/SetupDialogForm.cs index 79b1816..2a1dac3 100644 --- a/Meade.net/SetupDialogForm.cs +++ b/Meade.net/SetupDialogForm.cs @@ -63,5 +63,10 @@ namespace ASCOM.Meade.net return profileProperties; } + + private void SetupDialogForm_Shown(object sender, EventArgs e) + { + Activate(); + } } } \ No newline at end of file diff --git a/Meade.net/SetupDialogForm.designer.cs b/Meade.net/SetupDialogForm.designer.cs index 0c80d7c..11f868f 100644 --- a/Meade.net/SetupDialogForm.designer.cs +++ b/Meade.net/SetupDialogForm.designer.cs @@ -102,6 +102,7 @@ namespace ASCOM.Meade.net this.MinimizeBox = false; this.Name = "SetupDialogForm"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.Shown += new System.EventHandler(this.SetupDialogForm_Shown); ((System.ComponentModel.ISupportInitialize)(this.picASCOM)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); diff --git a/Meade.net/SharedResources.cs b/Meade.net/SharedResources.cs index e7c8fa0..733506b 100644 --- a/Meade.net/SharedResources.cs +++ b/Meade.net/SharedResources.cs @@ -221,7 +221,7 @@ namespace ASCOM.Meade.net using (SetupDialogForm F = new SetupDialogForm()) { F.SetProfile(profileProperties); - + var result = F.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) {