public MainShellViewModel(IResultFactory resultFactory,
                                  IEventAggregator eventAggregator,
                                  IPersistanceManager persistanceManager,
                                  ISettingsManager settingsManager,
                                  MainMenuViewModel mainMenuViewModel,
                                  MainToolBarViewModel mainToolBarViewModel,
                                  IEnumerable <PanelViewModel> panels,
                                  IFileSystem fileSystem,
                                  ProfileDialogStrategy profileDialogStrategy,
                                  IPaths paths,
                                  IParser parser,
                                  IPortable portable
                                  )
            : base(resultFactory)
        {
            this.eventAggregator = eventAggregator;
            this.eventAggregator.Subscribe(this);
            this.persistanceManager    = persistanceManager;
            this.settingsManager       = settingsManager;
            this.fileSystem            = fileSystem;
            this.profileDialogStrategy = profileDialogStrategy;
            this.paths  = paths;
            this.parser = parser;

            Profiles = new BindableCollection <MonitorViewModel>();
            Tools    = new BindableCollection <PanelViewModel>(panels);

            Menu       = mainMenuViewModel;
            Menu.Views = Tools;
            ToolBar    = mainToolBarViewModel;

            DisplayName = "CockpitBuilder";
        }
示例#2
0
 public MainMenuViewModel(IResultFactory resultFactory,
                          IEventAggregator eventAggregator,
                          IFileSystem fileSystem,
                          Func <MonitorViewModel> scriptEditorFactory,
                          ProfileDialogStrategy profileDialogStrategy,
                          ISettingsManager settings)
 {
     this.resultFactory         = resultFactory;
     this.eventAggregator       = eventAggregator;
     this.scriptEditorFactory   = scriptEditorFactory;
     this.fileSystem            = fileSystem;
     this.profileDialogStrategy = profileDialogStrategy;
 }
示例#3
0
        public MainMenuViewModel(IResultFactory resultFactory,
                                 IEventAggregator eventAggregator,
                                 Func <MonitorViewModel> profileEditorFactory,
                                 IFileSystem fileSystem,
                                 ProfileDialogStrategy profileDialogStrategy,
                                 ISettingsManager settings)
        {
            eventAggregator.Subscribe(this);

            this.resultFactory         = resultFactory;
            this.eventAggregator       = eventAggregator;
            this.profileEditorFactory  = profileEditorFactory;
            this.fileSystem            = fileSystem;
            this.profileDialogStrategy = profileDialogStrategy;
            this.settingsManager       = settings;

            RecentScripts = new BindableCollection <RecentFileViewModel>(ListRecentFiles());
        }