Exemplo n.º 1
0
        public void QueryToolbarCommands(ToolbarUI ui)
        {
            if (WorkspaceService.Workspaces.Count() < 15)
            {
                ui.AddCommand(new ToolbarItem()
                {
                    Command     = new LambdaCommand("Workspaces", () => EnableWizard = true),
                    Title       = "Workspace:",
                    Description = "Click to manage your workspaces."
                });

                foreach (var item in WorkspaceService.Workspaces)
                {
                    ui.AddCommand(new ToolbarItem()
                    {
                        Title   = item.Name,
                        Checked = item == WorkspaceService.CurrentWorkspace,
                        Command = new OpenWorkspaceCommand()
                        {
                            Workspace = item
                        }
                    });
                }
            }
            else
            {
                ui.AddCommand(new ToolbarItem()
                {
                    Title      = WorkspaceService.CurrentWorkspace == null ? "--Choose Workspace--" : WorkspaceService.CurrentWorkspace.Name,
                    IsDropdown = true,
                    Command    = new SelectWorkspaceCommand(),
                    Position   = ToolbarPosition.Left
                });
            }
        }
Exemplo n.º 2
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."
            });
        }
Exemplo n.º 3
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     if (CurrentBreakpoint != null)
     {
         ui.AddCommand(new ToolbarItem()
         {
             Command = new ContinueCommand(),
             Title   = "Continue"
         });
         ui.AddCommand(new ToolbarItem()
         {
             Command = new StepCommand(),
             Title   = "Step"
         });
     }
     ui.AddCommand(new ToolbarItem()
     {
         Title       = "Debug Mode",
         Checked     = IsDebugMode,
         Description = "Enabling debug mode will turn on breakpoints, which you can setup on Action nodes and other Sequence nodes.",
         Command     = new LambdaCommand("Debug Mode", () =>
         {
             IsDebugMode = !IsDebugMode;
             InvertApplication.Execute(new SaveAndCompileCommand()
             {
                 ForceCompileAll = true
             });
         }),
         Position = ToolbarPosition.Right
     });
 }
Exemplo n.º 4
0
        public void QueryToolbarCommands(ToolbarUI ui)
        {
            var repo = Container.Resolve <IRepository>();

            if (repo == null)
            {
                return;
            }
            var undoItem = repo.All <UndoItem>().LastOrDefault();

            if (undoItem != null)
            {
                ui.AddCommand(new ToolbarItem()
                {
                    Title    = "Undo",
                    Command  = new UndoCommand(),
                    Position = ToolbarPosition.BottomRight,
                    Order    = -2
                });
            }
            var redoItem = repo.All <RedoItem>().LastOrDefault();

            if (redoItem != null)
            {
                ui.AddCommand(new ToolbarItem()
                {
                    Title    = "Redo",
                    Command  = new RedoCommand(),
                    Position = ToolbarPosition.BottomRight,
                    Order    = -1
                });
            }
        }
Exemplo n.º 5
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     ui.AddCommand(new ToolbarItem()
     {
         Checked  = MinimalView,
         Title    = "Minimal",
         Command  = new LambdaCommand("minimal", () => MinimalView = !MinimalView),
         Position = ToolbarPosition.BottomRight
     });
 }
Exemplo n.º 6
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     ui.AddCommand(new ToolbarItem()
     {
         Title   = "Export", Position = ToolbarPosition.BottomLeft,
         Command = new LambdaCommand("Export", () =>
         {
             Signal <IShowContextMenu>(_ => _.Show(null, new ExportUICommand()));
         })
     });
     ui.AddCommand(new ToolbarItem()
     {
         Title    = "Import",
         Position = ToolbarPosition.BottomLeft,
         Command  = new ImportCommand()
         {
         },
     });
 }
Exemplo n.º 7
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     ui.AddCommand(new ToolbarItem()
     {
         Command     = new ScaffoldOrUpdateKernelCommand(),
         Title       = "Update Kernel",
         Position    = ToolbarPosition.Right,
         Description = "Start Create/Update MVVM Kernel.",
         Order       = -1,
         IsDelayCall = true
     });
 }
Exemplo n.º 8
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     ui.AddCommand(new ToolbarItem()
     {
         Title   = "Toggle FPS",
         Checked = ShowFPS,
         Command = new LambdaCommand("Toggle Fps", () =>
         {
             ShowFPS = !ShowFPS;
         }),
         Position = ToolbarPosition.BottomRight
     });
 }
Exemplo n.º 9
0
    public void QueryToolbarCommands(ToolbarUI ui)
    {
        var isInspectorWindowOpened = IsWindowOpen<uFrameInspectorWindow>();
        var isIssuesWindowOpened = IsWindowOpen<uFrameIssuesWindow>();
        ui.AddCommand(new ToolbarItem()
        {
            Title = "Inspector",
            Checked = isInspectorWindowOpened,
            Position = ToolbarPosition.BottomRight,
            Command = new LambdaCommand("Show", () =>
            {
                var window = EditorWindow.GetWindow<uFrameInspectorWindow>();
                window.title = "Inspector";
                if (isInspectorWindowOpened)
                {
                    window.Close();
                }
            })
        });

        ui.AddCommand(new ToolbarItem()
        {
            Title = "Issues",
            Checked = isIssuesWindowOpened,
            Position = ToolbarPosition.BottomRight,
            Command = new LambdaCommand("Show", () =>
            {
                var window = EditorWindow.GetWindow<uFrameIssuesWindow>();
                window.title = "Issues";
                if (isIssuesWindowOpened)
                {
                    window.Close();
                }
            })
        });
    }
Exemplo n.º 10
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     ui.AddCommand(new ToolbarItem()
     {
         Title    = CurrentConfiguration == null ? "Change Database" : "Database: " + CurrentConfiguration.Title,
         Command  = new ChangeDatabaseCommand(),
         Position = ToolbarPosition.BottomLeft,
         Order    = -1
     });
     //ui.AddCommand(new ToolbarItem()
     //{
     //    Title = "Save",
     //    Command = new SaveCommand(),
     //    Position = ToolbarPosition.Right
     //});
 }
Exemplo n.º 11
0
        public void QueryToolbarCommands(ToolbarUI ui)
        {
            var isBreakpointsWindowOpened = IsWindowOpen <uFrameBreakpointsWindow>();

            ui.AddCommand(new ToolbarItem()
            {
                Title    = "Breakpoints",
                Checked  = isBreakpointsWindowOpened,
                Position = ToolbarPosition.BottomRight,
                Command  = new LambdaCommand("Show", () =>
                {
                    var window = EditorWindow.GetWindow <uFrameBreakpointsWindow>();
                    //window.title = "Breakpoints";
                    window.titleContent.text = "Breakpoints";
                    if (isBreakpointsWindowOpened)
                    {
                        window.Close();
                    }
                })
            });
        }
Exemplo n.º 12
0
        public void QueryToolbarCommands(ToolbarUI ui)
        {

            if (WorkspaceService.Workspaces.Count() < 15)
            {
                ui.AddCommand(new ToolbarItem()
                { 
                    Command = new LambdaCommand("Workspaces", () => EnableWizard = true),
                    Title = "Workspace:",
                    Description = "Click to manage your workspaces."
                });   
          
                foreach (var item in WorkspaceService.Workspaces)
                {
                    ui.AddCommand(new ToolbarItem()
                    {
                        Title = item.Name,
                        Checked = item == WorkspaceService.CurrentWorkspace,
                        Command = new OpenWorkspaceCommand()
                        {
                            Workspace = item
                        }
                    });
                }
               
            }
            else
            {
                ui.AddCommand(new ToolbarItem()
                {
                    Title = WorkspaceService.CurrentWorkspace == null ? "--Choose Workspace--" : WorkspaceService.CurrentWorkspace.Name,
                    IsDropdown = true,
                    Command = new SelectWorkspaceCommand(),
                    Position = ToolbarPosition.Left
                });
            }
        }