private void DialogClosedHandler(object sender, DialogClosedEventArgs dialogArgs)
        {
            // If the dialog was successfully confirmed, the user wants to overwrite the
            // file, so do this
            if (dialogArgs.Success)
            {
                // Overwrite the file and store the file name
                string fileName = FileNameInput.text;
                fileManager.CreateOrOverwriteFile(fileName);
                currentOpenFileName = fileName;

                // Then, set the recording state to file ready and reenable mouse drag
                SetRecordingState(RecordingState.FileReady);
                OrbitalCamera.MouseMovementEnabled();
            }

            // Finally, dereference the dialog manager
            if (dialogManager != null)
            {
                dialogManager = null;
            }
        }
Ejemplo n.º 2
0
        private void DialogClosed(object sender, DialogClosedEventArgs e)
        {
            if (sender is BaseDialog dialog)
            {
                DialogStack.Remove(dialog);
                DialogResult = e.Result?.ToString();

                switch (e.ClickedButton)
                {
                case DialogButton.FirstButton:
                    DialogClickedButton = $"FirstButton ({dialog.FirstButtonContent})";
                    break;

                case DialogButton.SecondButton:
                    DialogClickedButton = $"SecondButton ({dialog.SecondButtonContent})";
                    break;

                case DialogButton.ThirdButton:
                    DialogClickedButton = $"ThirdButton ({dialog.ThirdButtonContent})";
                    break;
                }
            }
        }