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
                });
            }
        }
Example #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
     });
 }
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
     });
 }
Example #6
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     //ui.AddCommand(new ToolbarItem()
     //{
     //    Command = new Import16Command(),
     //    Position = ToolbarPosition.BottomRight,
     //    Title = "Upgrade 1.6 Graph"
     //});
     //ui.AddCommand(new ToolbarItem()
     //{
     //    Command = new FixTypes(),
     //    Position = ToolbarPosition.BottomRight,
     //    Title = "Fix Types"
     //});
 }
Example #7
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
     //});
 }
Example #8
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()
         {
         },
     });
 }
Example #9
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
 }
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     ui.AddCommand(new ToolbarItem()
     {
         Title = "Toggle FPS",
         Checked = ShowFPS,
         Command = new LambdaCommand("Toggle Fps", () =>
         {
             ShowFPS = !ShowFPS;
         }),
         Position = ToolbarPosition.BottomRight
     });
 }
Example #11
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     
    
 }