示例#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
                });
            }
        }
示例#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
     });
 }
示例#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."
            });
        }
示例#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
                });
            }
        }
示例#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"
     //});
 }
示例#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();
     //    })
     //});
 }
示例#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
     });
 }
 public void QueryToolbarCommands(ToolbarUI ui)
 {
     ui.AddCommand(new ToolbarItem()
     {
         Title   = "Toggle FPS",
         Checked = ShowFPS,
         Command = new LambdaCommand("Toggle Fps", () =>
         {
             ShowFPS = !ShowFPS;
         }),
         Position = ToolbarPosition.BottomRight
     });
 }
示例#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>();
 }
示例#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"
     //});
 }
示例#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
     //});
 }
示例#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()
        //});
    }
示例#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()
            //    });
            //}
        }
示例#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()
         {
         },
     });
 }
        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();
                    }
                })
            });
        }
        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
                });
            }
        }
示例#18
0
 public void QueryToolbarCommands(ToolbarUI ui)
 {
 }
 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"
     //});
 }