Example #1
0
        public ModuleProperty(MacroList p, MacroModule mod) {
            _parent = p;
            //_prevShortCut = shortcut;
            _module = mod == null ? new MacroModule(0, "", "") : (MacroModule)mod.Clone();
            //
            // Windows フォーム デザイナ サポートに必要です。
            //
            InitializeComponent();

            StringResource sr = MacroPlugin.Instance.Strings;
            this._titleLabel.Text = sr.GetString("Form.ModuleProperty._titleLabel");
            this._pathLabel.Text = sr.GetString("Form.ModuleProperty._pathLabel");
            this._additionalAssemblyLabel.Text = sr.GetString("Form.ModuleProperty._additionalAssemblyLabel");
            this._shortcutLabel.Text = sr.GetString("Form.ModuleProperty._shortcutLabel");
            this._debugOption.Text = sr.GetString("Form.ModuleProperty._debugOption");
            this._okButton.Text = sr.GetString("Common.OK");
            this._cancelButton.Text = sr.GetString("Common.Cancel");
            this.Text = sr.GetString("Form.ModuleProperty.Text");

            _shortcutLabel.Visible = false;
            //_shortcut.Visible = false;

            if (mod != null) {
                _title.Text = _module.Title;
                _path.Text = _module.Path;
                _additionalAssembly.Text = Concat(_module.AdditionalAssemblies);
                _debugOption.Checked = _module.DebugMode;
                //_shortcut.Key = shortcut;
            }
        }
        public ModuleProperty(MacroList p, MacroModule mod)
        {
            _parent = p;
            //_prevShortCut = shortcut;
            _module = mod == null? new MacroModule(0, "", "") : (MacroModule)mod.Clone();
            //
            // Windows フォーム デザイナ サポートに必要です。
            //
            InitializeComponent();

            StringResource sr = MacroPlugin.Instance.Strings;

            this._titleLabel.Text = sr.GetString("Form.ModuleProperty._titleLabel");
            this._pathLabel.Text  = sr.GetString("Form.ModuleProperty._pathLabel");
            this._additionalAssemblyLabel.Text = sr.GetString("Form.ModuleProperty._additionalAssemblyLabel");
            this._shortcutLabel.Text           = sr.GetString("Form.ModuleProperty._shortcutLabel");
            this._debugOption.Text             = sr.GetString("Form.ModuleProperty._debugOption");
            this._okButton.Text     = sr.GetString("Common.OK");
            this._cancelButton.Text = sr.GetString("Common.Cancel");
            this.Text = sr.GetString("Form.ModuleProperty.Text");

            _shortcutLabel.Visible = false;
            //_shortcut.Visible = false;

            if (mod != null)
            {
                _title.Text = _module.Title;
                _path.Text  = _module.Path;
                _additionalAssembly.Text = Concat(_module.AdditionalAssemblies);
                _debugOption.Checked     = _module.DebugMode;
                //_shortcut.Key = shortcut;
            }
        }
        public override CommandResult InternalExecute(ICommandTarget target, params IAdaptable[] args)
        {
            IPoderosaMainWindow window = CommandTargetUtil.AsWindow(target);
            MacroList           dlg    = new MacroList();

            dlg.ShowDialog(window.AsForm());
            return(CommandResult.Succeeded);
        }