ACAT.Lib.Extension.CommandHandlers.ShowDialogsHandler.Execute C# (CSharp) Method

Execute() public method

Executes the command
public Execute ( bool &handled ) : bool
handled bool set to true if the command was handled
return bool
        public override bool Execute(ref bool handled)
        {
            handled = true;

            Form form = Dispatcher.Scanner.Form;

            switch (Command)
            {
                case "CmdShowGeneralSettings":
                    showDialog("GeneralSettingsForm");
                    break;

                case "CmdShowScanSettings":
                    showDialog("ScannerSettingsForm");
                    break;

                case "CmdShowWordPredictionSettings":
                    showDialog("WordPredictionSettingsForm");
                    break;

                case "CmdShowMouseGridSettings":
                    showDialog("MouseGridSettingsForm");
                    break;

                case "CmdShowVoiceSettings":
                    showDialog("TextToSpeechSettingsForm");
                    break;

                case "CmdShowMuteScreenSettings":
                    showDialog("ScreenLockSettingsForm");
                    break;

                case "CmdShowDesignSettings":
                    showDialog("ResizeScannerForm");
                    break;

                case "CmdShowAboutBox":
                    showAboutBox(form);
                    break;

                default:
                    handled = false;
                    break;
            }

            return true;
        }