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."
            });
        }
Example #2
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
                });
            }
        }
 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()
         {
         },
     });
 }
Example #4
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     ui.AddCommand(new ToolbarItem()
     {
         Checked  = MinimalView,
         Title    = "Minimal",
         Command  = new LambdaCommand("minimal", () => MinimalView = !MinimalView),
         Position = ToolbarPosition.BottomRight
     });
 }
Example #5
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
     });
 }
 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
     //});
 }