示例#1
0
        public ShellViewModel(
            CommandService commandService,
            Lazy <StatusBarViewModel> statusBar,
            MainMenuService mainMenuService,
            ToolbarService toolbarService,
            [ImportMany] IEnumerable <Lazy <IExtension> > extensions,
            [ImportMany] IEnumerable <Lazy <ToolViewModel> > toolControls)
        {
            _extensions   = extensions;
            _toolControls = toolControls;

            _commandService = commandService;

            MainMenu = mainMenuService.GetMainMenu();

            var toolbars = toolbarService.GetToolbars();

            StandardToolbar = toolbars.Single(t => t.Key == "Standard").Value;

            _statusBar = statusBar;

            _keyBindings = new List <KeyBinding>();

            ModalDialog = new ModalDialogViewModelBase("Dialog");

            _documents = new List <IDocumentTabViewModel>();
        }
示例#2
0
 public Menu()
 {
     this.service   = new MainMenuService();
     this.menuItems = new List <String>()
     {
         "1 - Просмотреть встречи",
         "2 - Создать встречу",
         "3 - Распечатать встречу",
         "0 - Выход"
     };
 }
示例#3
0
        public ShellViewModel(
            CommandService commandService,
            Lazy <StatusBarViewModel> statusBar,
            MainMenuService mainMenuService,
            ToolbarService toolbarService,
            [ImportMany] IEnumerable <Lazy <IExtension> > extensions,
            [ImportMany] IEnumerable <Lazy <ToolViewModel> > toolControls)
        {
            _extensions   = extensions;
            _toolControls = toolControls;

            _commandService = commandService;

            MainMenu = mainMenuService.GetMainMenu();

            var toolbars = toolbarService.GetToolbars();

            StandardToolbar = toolbars.SingleOrDefault(t => t.Key == "Standard").Value;

            _statusBar = statusBar;

            _keyBindings = new List <KeyBinding>();

            ModalDialog = new ModalDialogViewModelBase("Dialog");

            _documents     = new List <IDocumentTabViewModel>();
            _documentViews = new Dictionary <IDocumentTabViewModel, IDockable>();
            _perspectives  = new List <IPerspective>();

            this.WhenAnyValue(x => x.CurrentPerspective).Subscribe(perspective =>
            {
                if (perspective != null)
                {
                    //Root.Navigate(perspective.Root);
                    ApplyPerspective(perspective.Root);
                }
            });
        }
示例#4
0
 public MainMenuController(ILogger <MainMenuController> logger)
 {
     this.mainMenuService = new MainMenuService();
     this.logger          = logger;
 }