예제 #1
0
파일: CommandSet.cs 프로젝트: Aniz/visualSh
        /// <summary>
        /// Provide the menu commands that this command set handles
        /// </summary>
        protected override global::System.Collections.Generic.IList <global::System.ComponentModel.Design.MenuCommand> GetMenuCommands()
        {
            // Get the standard commands
            global::System.Collections.Generic.IList <global::System.ComponentModel.Design.MenuCommand> commands = base.GetMenuCommands();

            global::System.ComponentModel.Design.MenuCommand menuCommand;

            // Add command handler for the "view explorer" command in the top-level menu.
            // We use a ContextBoundMenuCommand because the visibility of this command is
            // based on whether or not the command context of our DSL editor is active.
            menuCommand = new DslShell::CommandContextBoundMenuCommand(this.ServiceProvider,
                                                                       new global::System.EventHandler(OnMenuViewModelExplorer),
                                                                       Constants.ViewvShomeExplorerCommand,
                                                                       typeof(vShomeEditorFactory).GUID);

            commands.Add(menuCommand);

            // Add handler for "Validate All" menu command (validates the entire model).
            menuCommand = new DslShell::DynamicStatusMenuCommand(new global::System.EventHandler(OnStatusValidateModel),
                                                                 new global::System.EventHandler(OnMenuValidateModel),
                                                                 DslShell::CommonModelingCommands.ValidateModel);
            commands.Add(menuCommand);
            // Add handler for "Validate" menu command (validates the current selection).
            menuCommand = new DslShell::DynamicStatusMenuCommand(new global::System.EventHandler(OnStatusValidate),
                                                                 new global::System.EventHandler(OnMenuValidate),
                                                                 DslShell::CommonModelingCommands.Validate);
            commands.Add(menuCommand);

            return(commands);
        }
        /// <summary>
        /// Provide the menu commands that this command set handles
        /// </summary>
        protected override global::System.Collections.Generic.IList <global::System.ComponentModel.Design.MenuCommand> GetMenuCommands()
        {
            // Get the standard commands
            var commands = new global::System.Collections.Generic.List <global::System.ComponentModel.Design.MenuCommand>(3);

            global::System.ComponentModel.Design.MenuCommand menuCommand;

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(this.OnStatusCut),
                new global::System.EventHandler(this.OnMenuCut),
                global::System.ComponentModel.Design.StandardCommands.Cut);
            commands.Add(menuCommand);

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(this.OnStatusCopy),
                new global::System.EventHandler(this.OnMenuCopy),
                global::System.ComponentModel.Design.StandardCommands.Copy);
            commands.Add(menuCommand);

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(this.OnStatusPaste),
                new global::System.EventHandler(this.OnMenuPaste),
                global::System.ComponentModel.Design.StandardCommands.Paste);
            commands.Add(menuCommand);

            return(commands);
        }
예제 #3
0
		/// <summary>
		/// Provide the menu commands that this command set handles
		/// </summary>
		protected override global::System.Collections.Generic.IList<global::System.ComponentModel.Design.MenuCommand> GetMenuCommands()
		{
			// Get the standard commands
			global::System.Collections.Generic.IList<global::System.ComponentModel.Design.MenuCommand> commands = base.GetMenuCommands();

			global::System.ComponentModel.Design.MenuCommand menuCommand;
			// Add command handler for the "view explorer" command in the top-level menu.
			// We use a ContextBoundMenuCommand because the visibility of this command is
			// based on whether or not the command context of our DSL editor is active. 
			menuCommand = new DslShell::CommandContextBoundMenuCommand(this.ServiceProvider,
				new global::System.EventHandler(OnMenuViewModelExplorer),
				Constants.ViewActiveWriterExplorerCommand,
				typeof(ActiveWriterEditorFactory).GUID);

			commands.Add(menuCommand);

			// Add handler for "Validate All" menu command (validates the entire model).
			menuCommand = new DslShell::DynamicStatusMenuCommand(new global::System.EventHandler(OnStatusValidateModel), 
				new global::System.EventHandler(OnMenuValidateModel),
				DslShell::CommonModelingCommands.ValidateModel);
			commands.Add(menuCommand);
			// Add handler for "Validate" menu command (validates the current selection).
			menuCommand = new DslShell::DynamicStatusMenuCommand(new global::System.EventHandler(OnStatusValidate), 
				new global::System.EventHandler(OnMenuValidate),
				DslShell::CommonModelingCommands.Validate);
			commands.Add(menuCommand);

			return commands;
		}
예제 #4
0
		/// <summary>
		/// Provide the menu commands that this command set handles
		/// </summary>
		protected override global::System.Collections.Generic.IList<global::System.ComponentModel.Design.MenuCommand> GetMenuCommands()
		{
			// Get the standard commands
			global::System.Collections.Generic.IList<global::System.ComponentModel.Design.MenuCommand> commands = base.GetMenuCommands();

			global::System.ComponentModel.Design.MenuCommand menuCommand;

			// Add handler for "Validate All" menu command (validates the entire model).
			menuCommand = new DslShell::DynamicStatusMenuCommand(new global::System.EventHandler(OnStatusValidateModel), 
				new global::System.EventHandler(OnMenuValidateModel),
				DslShell::CommonModelingCommands.ValidateModel);
			commands.Add(menuCommand);
			// Add handler for "Validate" menu command (validates the current selection).
			menuCommand = new DslShell::DynamicStatusMenuCommand(new global::System.EventHandler(OnStatusValidate), 
				new global::System.EventHandler(OnMenuValidate),
				DslShell::CommonModelingCommands.Validate);
			commands.Add(menuCommand);

			return commands;
		}
예제 #5
0
        /// <summary>
        /// Provide the menu commands that this command set handles
        /// </summary>
        protected override global::System.Collections.Generic.IList <global::System.ComponentModel.Design.MenuCommand> GetMenuCommands()
        {
            // Get the standard commands
            global::System.Collections.Generic.IList <global::System.ComponentModel.Design.MenuCommand> commands = base.GetMenuCommands();

            global::System.ComponentModel.Design.MenuCommand menuCommand;

            // Add handler for "Validate All" menu command (validates the entire model).
            menuCommand = new DslShell::DynamicStatusMenuCommand(new global::System.EventHandler(OnStatusValidateModel),
                                                                 new global::System.EventHandler(OnMenuValidateModel),
                                                                 DslShell::CommonModelingCommands.ValidateModel);
            commands.Add(menuCommand);
            // Add handler for "Validate" menu command (validates the current selection).
            menuCommand = new DslShell::DynamicStatusMenuCommand(new global::System.EventHandler(OnStatusValidate),
                                                                 new global::System.EventHandler(OnMenuValidate),
                                                                 DslShell::CommonModelingCommands.Validate);
            commands.Add(menuCommand);

            return(commands);
        }
예제 #6
0
		/// <summary>
		/// Provide the menu commands that this command set handles
		/// </summary>
		protected override global::System.Collections.Generic.IList<global::System.ComponentModel.Design.MenuCommand> GetMenuCommands()
		{
			// Get the standard commands
			var commands = new global::System.Collections.Generic.List<global::System.ComponentModel.Design.MenuCommand>(3);

			global::System.ComponentModel.Design.MenuCommand menuCommand;

			menuCommand = new DslShell::DynamicStatusMenuCommand(
				new global::System.EventHandler(this.OnStatusCut),
				new global::System.EventHandler(this.OnMenuCut),
				global::System.ComponentModel.Design.StandardCommands.Cut);
			commands.Add(menuCommand);

			menuCommand = new DslShell::DynamicStatusMenuCommand(
				new global::System.EventHandler(this.OnStatusCopy),
				new global::System.EventHandler(this.OnMenuCopy),
				global::System.ComponentModel.Design.StandardCommands.Copy);
			commands.Add(menuCommand);

			menuCommand = new DslShell::DynamicStatusMenuCommand(
				new global::System.EventHandler(this.OnStatusPaste),
				new global::System.EventHandler(this.OnMenuPaste),
				global::System.ComponentModel.Design.StandardCommands.Paste);
			commands.Add(menuCommand);

			return commands;
		}
예제 #7
0
        protected override System.Collections.Generic.IList <System.ComponentModel.Design.MenuCommand> GetMenuCommands()
        {
            // Get the standard commands
            global::System.Collections.Generic.IList <global::System.ComponentModel.Design.MenuCommand> commands = base.GetMenuCommands();


            global::System.ComponentModel.Design.MenuCommand menuCommand;

            // Add command handler for the "view explorer" command in the top-level menu.
            // We use a ContextBoundMenuCommand because the visibility of this command is
            // based on whether or not the command context of our DSL editor is active.

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(GenerateFromStatus),
                new global::System.EventHandler(GenerateFrom),
                Constants.CreateRootMap1);
            commands.Add(menuCommand);

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(GenerateFromStatus),
                new global::System.EventHandler(SelectWithChildren),
                Constants.CreateRootMap2);
            commands.Add(menuCommand);

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(GenerateFromStatus),
                new global::System.EventHandler(CenterChildren),
                Constants.CreateRootMap3);
            commands.Add(menuCommand);

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(GenerateFromStatus),
                new global::System.EventHandler(CenterItems),
                Constants.AlignToCenter);
            commands.Add(menuCommand);

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(GenerateFromStatus),
                new global::System.EventHandler(AlignLeftItems),
                Constants.AlignToLeft);
            commands.Add(menuCommand);

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(GenerateFromStatus),
                new global::System.EventHandler(AlignRightItems),
                Constants.AlignToRight);
            commands.Add(menuCommand);

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(GenerateFromStatus),
                new global::System.EventHandler(AlignTopItems),
                Constants.AlignToTop);
            commands.Add(menuCommand);

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(GenerateFromStatus),
                new global::System.EventHandler(AlignMiddleItems),
                Constants.AlignToMiddle);
            commands.Add(menuCommand);

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(GenerateFromStatus),
                new global::System.EventHandler(AlignBottomItems),
                Constants.AlignToBottom);
            commands.Add(menuCommand);

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(GenerateFromStatus),
                new global::System.EventHandler(DistributeVerticalItems),
                Constants.DistributeVertical);
            commands.Add(menuCommand);

            menuCommand = new DslShell::DynamicStatusMenuCommand(
                new global::System.EventHandler(GenerateFromStatus),
                new global::System.EventHandler(DistributeHorizontalItems),
                Constants.DistributeHorizontal);
            commands.Add(menuCommand);

            return(commands);
        }