// We know this is clumsy, but its a .NET-ism --
        // Form widgets can *only* be controlled by the thread that creates them.
        // Thus, we make this guarantee by wrapping all creation & processing actions
        // in a method called by just one thread.  <sigh>
        private static void PopupDialogViaDelegate(AsyncCompletionToken completionToken,
                                                   string toonName,
                                                   string dialogTitle,
                                                   string dialogMessage,
                                                   string expiryActionName,
                                                   int expiryRemainingInSeconds,
                                                   bool isBotStopAllowed,
                                                   bool isStopOnContinue,
                                                   SystemSound soundCue,
                                                   int soundPeriodInSeconds)
        {
            UserDialogForm dialogForm = new UserDialogForm(completionToken,
                                                           toonName,
                                                           dialogTitle,
                                                           dialogMessage,
                                                           expiryActionName,
                                                           expiryRemainingInSeconds,
                                                           isBotStopAllowed,
                                                           isStopOnContinue,
                                                           soundCue,
                                                           soundPeriodInSeconds);

            // Popup the window--
            // We'd *really* like to make this dialog a child of the main Honorbuddy window.
            // By doing such, the dialog would be 'brought to the front' any time te Honorbuddy main
            // window was.
            // Alas, C#/WindowsForms disallows this because the main HB GUI and this dialog are
            // on separate threads.
            dialogForm.TopMost = true;
            dialogForm.Activate();
            dialogForm.ShowDialog();
        }
 public override void WrapUp(UserDialogForm userDialogForm)
 {
     userDialogForm._buttonContinueProfile.Enabled = true;
     if (userDialogForm._isBotStopAllowed)
     {
         userDialogForm._buttonStopBot.Enabled = true;
     }
 }
 public override void WrapUp(UserDialogForm userDialogForm)
 {
     userDialogForm._completionToken.PopdownResponse = PopdownReason.ContinueViaExpiry;
     userDialogForm.Close();
 }
 public override void Initialize(UserDialogForm userDialogForm)
 {
     userDialogForm._buttonContinueProfile.Enabled = true;
     userDialogForm._buttonStopBot.Enabled         = true;
 }
 public abstract void WrapUp(UserDialogForm userDialogForm);
 public abstract void Initialize(UserDialogForm userDialogForm);