示例#1
0
 // Constructor
 public ToolbarComponent()
 {
     _viewModel = new AppToolbar
     {
         ChooseWindowCommand    = new Binding.RelayCommand(p => SwitchView?.Invoke(ViewType.WindowList)),
         FindProgramCommand     = new Binding.RelayCommand(p => SwitchView?.Invoke(ViewType.FindProgram)),
         ToggleLockCommand      = new Binding.RelayCommand(p => SwitchView?.Invoke(ViewType.LockWindow)),
         RefreshListCommand     = new Binding.RelayCommand(p => RefreshWindowList?.Invoke()),
         MenuSettingsCommand    = new Binding.RelayCommand(p => ShowSettingsWindow?.Invoke()),
         MenuAboutCommand       = new Binding.RelayCommand(p => ShowAboutWindow?.Invoke()),
         MenuQuitCommand        = new Binding.RelayCommand(p => QuitProgram?.Invoke()),
         ShowContextMenuCommand = new Binding.RelayCommand(ShowContextMenu)
     };
 }
示例#2
0
        private void quickCollapseMenu()
        {
            LeftMenu.animate(WidthProperty, 300, 65, 0, new CubicEase {
                EasingMode = EasingMode.EaseOut
            });
            Dimmer.animate(OpacityProperty, 300, 0, 0);
            AppToolbar.animate(OpacityProperty, 300, 1, 0, new CubicEase {
                EasingMode = EasingMode.EaseOut
            });

            LeftIconMenu.animate(WidthProperty, 300, 65, 0, new CubicEase {
                EasingMode = EasingMode.EaseOut
            });

            LeftTitleBar.animate(OpacityProperty, 100, 0, 0, new CubicEase {
                EasingMode = EasingMode.EaseOut
            });
            LeftPanelItems.animate(OpacityProperty, 150, 0, 100, new CubicEase {
                EasingMode = EasingMode.EaseOut
            });
        }
示例#3
0
        private void expandMenu()
        {
            LeftMenu.animate(WidthProperty, 300, 360, 0, new CubicEase {
                EasingMode = EasingMode.EaseOut
            });
            Dimmer.animate(OpacityProperty, 300, .5);
            AppToolbar.animate(OpacityProperty, 300, .3, 0, new CubicEase {
                EasingMode = EasingMode.EaseOut
            });

            LeftIconMenu.animate(WidthProperty, 300, 0, 0, new CubicEase {
                EasingMode = EasingMode.EaseOut
            });

            LeftTitleBar.animate(OpacityProperty, 200, 1, 200, new CubicEase {
                EasingMode = EasingMode.EaseOut
            });
            LeftPanelItems.animate(OpacityProperty, 300, 1, 300, new CubicEase {
                EasingMode = EasingMode.EaseOut
            });
        }
示例#4
0
        public EditorUiController(ImGuiManager imGuiManager,
                                  SettingsCommandHandler commandHandler,
                                  AppOperationQueue appOperationQueue,
                                  ApplicationState applicationState,
                                  ITextureFileLoader textureFileLoader,
                                  MonoGameImGuiRenderer monoGameImGuiRenderer)
        {
            _imGuiManager      = imGuiManager;
            _appOperationQueue = appOperationQueue;
            _applicationState  = applicationState;

            _imguiDemoWindow = new DemoWindow {
                IsVisible = false
            };
            _imGuiManager.AddElement(_imguiDemoWindow);

            var appToolbar = new AppToolbar(_appOperationQueue, _applicationState);

            _imGuiManager.AddElement(appToolbar);

            _newFileDialog = new NewFileDialog();
            _newFileDialog.CreateButtonClicked += NewFileDialogOnCreateButtonClicked;
            _newFileDialog.ModalClosed         += NewFileDialogOnModalClosed;
            _imGuiManager.AddElement(_newFileDialog);

            _messagePopup              = new MessagePopup();
            _messagePopup.ModalClosed += MessagePopupOnModalClosed;
            _imGuiManager.AddElement(_messagePopup);

            _emitterSettingsController = new EmitterSettingsController(imGuiManager,
                                                                       commandHandler,
                                                                       applicationState,
                                                                       appOperationQueue,
                                                                       textureFileLoader,
                                                                       monoGameImGuiRenderer);

            appToolbar.NewMenuItemClicked  += AppToolbarOnNewMenuItemClicked;
            appToolbar.OpenMenuItemClicked += AppToolbarOnOpenMenuItemClicked;
            appToolbar.SaveMenuItemClicked += AppToolbarOnSaveMenuItemClicked;
        }
示例#5
0
        public PlotterUi(Game game, AppSettings appSettings, ScriptManager scriptManager, OnScreenLogger onScreenLogger)
        {
            _appSettings    = appSettings;
            _scriptManager  = scriptManager;
            _onScreenLogger = onScreenLogger;

            var renderer = new MonoGameImGuiRenderer(game);

            renderer.Initialize();

            _imGuiManager = new ImGuiManager(renderer);

            _imGuiDemoWindow = new ImGuiDemoWindow();
            _imGuiManager.AddElement(_imGuiDemoWindow);

            var messageOverlay = new MessageOverlay(onScreenLogger)
            {
                IsVisible = true
            };

            messageOverlay.DismissMostRecentMessageClicked +=
                (sender, args) => _onScreenLogger.RemoveMostRecentMessage();

            _imGuiManager.AddElement(messageOverlay);

            AppToolbar = new AppToolbar(_scriptManager, _appSettings)
            {
                IsVisible = true
            };
            _imGuiManager.AddElement(AppToolbar);

            _imGuiManager.AddElement(new ImGuiSettings {
                IsVisible = true
            });

            AppToolbar.SettingsClicked += (sender, args) => CreateSettingsWindow();
            AppToolbar.NewClicked      += (sender, args) => CreateNewFileDialog();
            AppToolbar.OpenClicked     += (sender, args) => OpenScriptFile(args);
        }
示例#6
0
        //获取toolbar
        public AppToolbar GetEditToolbar(PbBillInfo billInfo)
        {
            var    toolbar = new AppToolbar();
            string btname  = string.Empty;

            foreach (var buttons in billInfo.DetailToolbarInfo.ToolbarButtonGroupInfosInfos)
            {
                if (buttons == null)
                {
                    continue;
                }
                foreach (var button in buttons.ToolbarButtonInfos)
                {
                    if (button.IsDockLeft)
                    {
                        btname = ButtonNameConvert.ConvertToExtTpye(button);
                        if (toolbar.LButtons.Contains(btname))
                        {
                            continue;
                        }
                        toolbar.LButtons.Add(btname);
                    }
                    else
                    {
                        btname = ButtonNameConvert.ConvertToExtTpye(button);
                        if (toolbar.RButtons.Contains(btname))
                        {
                            continue;
                        }
                        toolbar.RButtons.Add(btname);
                    }
                }
            }

            return(toolbar);
        }