public MainWindowViewModel(DockingManager dockingManager, ResizingPanel horizontalResizingPanel, ResizingPanel verticalResizingPanel, DockablePane tabsPane) { this.dockingManager = dockingManager; (new DesignerMetadata()).Register(); MyActivityLibraryMetadata2.RegisterAll(); dockingManager.ActiveDocumentChanged += delegate(object sender, EventArgs args) { this.UpdateViews(); }; this.toolboxControl = new ToolboxControl(); this.InitialiseToolbox(); this.horizontalResizingPanel = horizontalResizingPanel; this.verticalResizingPanel = verticalResizingPanel; this.tabsPane = tabsPane; this.dockableContents = new Dictionary <ContentTypes, DockableContent>(); this.ViewToolbox(); string disableDebugViewOutputValue = ConfigurationManager.AppSettings["DisableDebugViewOutput"]; if (!string.IsNullOrEmpty(disableDebugViewOutputValue)) { this.disableDebugViewOutput = bool.Parse(disableDebugViewOutputValue); } }
/// <summary> /// Initializes a new instance of the <see cref = "MainViewModel" /> class. /// </summary> internal MainViewModel() { (new DesignerMetadata()).Register(); MyActivityLibraryMetadata2.RegisterAll(); LoadToolboxIconsForBuiltInActivities(); this.ToolboxPanel = CreateToolbox(); this.ExitCommand = new RelayCommand(this.ExecuteExit, CanExecuteExit); this.OpenCommand = new RelayCommand(this.ExecuteOpen, CanExecuteOpen); this.NewCommand = new RelayCommand(this.ExecuteNew, CanExecuteNew); this.SaveCommand = new RelayCommand(this.ExecuteSave, CanExecuteSave); this.SaveAsCommand = new RelayCommand(this.ExecuteSaveAs, CanExecuteSaveAs); this.ExecuteNew(null); }