Invert.Core.GraphDesigner.ToolbarUI.AddCommand C# (CSharp) 메소드

AddCommand() 공개 메소드

public AddCommand ( ToolbarItem command ) : void
command ToolbarItem
리턴 void
        public void AddCommand(ToolbarItem command)
        {
            
            var cmd = command;
            if (cmd == null || cmd.Position == ToolbarPosition.Right)
            {
                RightCommands.Add(command);
            }
            else if (cmd.Position == ToolbarPosition.BottomLeft)
            {
                BottomLeftCommands.Add(command);
            }else if (cmd.Position == ToolbarPosition.BottomRight)
            {
                BottomRightCommands.Add(command);
            }
            else
            {
                LeftCommands.Add(command);
            }
        }

Usage Example

예제 #1
0
        public void QueryToolbarCommands(ToolbarUI ui)
        {
            var databaseService = Container.Resolve <DatabaseService>();

            if (databaseService.CurrentConfiguration == null)
            {
                return;
            }


            ui.AddCommand(new ToolbarItem()
            {
                Command     = new SaveAndCompileCommand(),
                Title       = "Build",
                Position    = ToolbarPosition.Right,
                Description = "Start code generation process. This generates C# code based on the nodes and items in the diagram."
            });
            ui.AddCommand(new ToolbarItem()
            {
                Command = new SaveAndCompileCommand()
                {
                    ForceCompileAll = true
                },
                Title       = "Build All",
                Position    = ToolbarPosition.Right,
                Description = "Start code generation process. This forces all code to regenerate for everything in the database."
            });
        }
All Usage Examples Of Invert.Core.GraphDesigner.ToolbarUI::AddCommand