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)
 {
     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.º 3
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.º 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()
     //{
     //    Command = new LambdaCommand("Manage Databases",()=>EnableWizard = true),
     //    Description = "Open database management dialog.",
     //    Position = ToolbarPosition.Left,
     //    Title = "Manage Databases"
     //});
 }
Exemplo n.º 6
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     ui.AddCommand(new ToolbarItem()
     {
         Checked  = MinimalView,
         Title    = "Minimal",
         Command  = new LambdaCommand("minimal", () => MinimalView = !MinimalView),
         Position = ToolbarPosition.BottomRight
     });
 }
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     //ui.AddCommand(new ToolbarItem()
     //{
     //    Title = "Woop Woop",
     //    Command = new LambdaCommand("Woop Woop", () =>
     //    {
     //        var window = EditorWindow.GetWindow<uFrameInspectorWindow>(typeof(UnityDesignerWindow));
     //        window.ShowUtility();
     //    })
     //});
 }
Exemplo n.º 8
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.º 9
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.º 10
0
 private void Awake()
 {
     //parentImage = GetComponentInParent<Image>();
     ColorUtility.TryParseHtmlString("#FFFF00", out selectedItemColor);
     ColorUtility.TryParseHtmlString("#575757", out emptyItemColor);
     ColorUtility.TryParseHtmlString("#AB843A", out defaultColor);
     ColorUtility.TryParseHtmlString("#DDAA4A", out mouseOverColor);
     //playerShip = FindObjectOfType<PlayerShipController>();
     spriteImage = GetComponent <Image>();
     inventory   = FindObjectOfType <Inventory>();
     UpdateItem(null, 0);
     parentImage.color = defaultColor;
     toolbarUI         = FindObjectOfType <ToolbarUI>();
 }
Exemplo n.º 11
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"
     //});
 }
Exemplo n.º 12
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.º 13
0
    public void QueryToolbarCommands(ToolbarUI ui)
    {
        //ui.AddCommand(new ToolbarItem()
        //{
        //    Title = "Create Graph",
        //    Position = ToolbarPosition.BottomRight,
        //    Command = new CreateGraphMenuCommand(),
        //    Order = -1
        //});

        //ui.AddCommand(new ToolbarItem()
        //{
        //    Title = "Import Graph",
        //    Position = ToolbarPosition.BottomRight,
        //    Command = new AddGraphToWorkspace()
        //});
    }
Exemplo n.º 14
0
        public void QueryToolbarCommands(ToolbarUI ui)
        {
            //ui.AddCommand(new ToolbarItem()
            //{
            //    Title = "Pickup",
            //    Command = new PickupCommand(),
            //    Position = ToolbarPosition.Right,
            //});

            //if (CopiedNodes.Count > 0)
            //{
            //    ui.AddCommand(new ToolbarItem()
            //    {
            //        Title = "Drop",
            //        Command = new DropCommand()
            //    });
            //}
        }
Exemplo n.º 15
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.º 16
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";
                    if (isBreakpointsWindowOpened)
                    {
                        window.Close();
                    }
                })
            });
        }
Exemplo n.º 17
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.º 18
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
 }
Exemplo n.º 19
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     //ui.AddCommand(new ToolbarItem()
     //{
     //    Command = new LambdaCommand("Manage Databases",()=>EnableWizard = true),
     //    Description = "Open database management dialog.",
     //    Position = ToolbarPosition.Left,
     //    Title = "Manage Databases"
     //});
 }