Esempio n. 1
0
 protected virtual void onClosing(DialogCancelEventArgs args)
 {
     if (Closing != null)
     {
         Closing.Invoke(this, args);
     }
 }
Esempio n. 2
0
 protected override void onClosing(DialogCancelEventArgs args)
 {
     base.onClosing(args);
     if (recordAudioController.ActivelyRecording)
     {
         stopRecording();
     }
 }
Esempio n. 3
0
 void MDIDialogDecorator_Closing(object sender, DialogCancelEventArgs e)
 {
     if (fireCloseEvent)
     {
         ViewHost.Context.runAction(closeAction, ViewHost);
         e.Cancel = true;
     }
 }
        static void inputBox_Closing(object sender, DialogCancelEventArgs e)
        {
            ImageBrowserWindow <BrowseType> inputBox = (ImageBrowserWindow <BrowseType>)sender;
            String errorPrompt = null;

            if (inputBox.Accepted && !inputBox.SendResult(inputBox.SelectedValue, ref errorPrompt))
            {
                MessageBox.show(errorPrompt, "Error", MessageBoxStyle.IconError | MessageBoxStyle.Ok);
                e.Cancel = true;
            }
        }
        private async void OnDialogCancelClicked(DialogCancelEventArgs args)
        {
            switch (args.EventType)
            {
            case DialogType.WaitForProcess: {
                string tok = args.Token;

                if (tok != "" && _cancTokSources[tok] != null && !_cancTokSources[tok].IsCancellationRequested)
                {
                    _cancTokSources[tok].Cancel();
                }

                if (_activeProc != null && !_activeProc.HasExited)
                {
                    await Task.Factory.StartNew(() => {
                            _activeProc.Kill();
                            _activeProc.WaitForExit();
                        });
                }
            }
            break;
            }
        }
Esempio n. 6
0
 protected override void onClosing(DialogCancelEventArgs args)
 {
     args.Cancel = !window.ClientWidget.Enabled;
     base.onClosing(args);
 }
Esempio n. 7
0
 protected override void onClosing(DialogCancelEventArgs args)
 {
     InputManager.Instance.MouseButtonPressed -= InputManager_MouseButtonPressed;
     base.onClosing(args);
 }