public ProjectWidgetController(WidgetPanelControlViewModel widgetPanelControlVm) { this.widgetPanelControlVm = widgetPanelControlVm; DashboardStorage.Instance.RegisterAction(DashboardEventsEnum.NavProjectSelected, HandleProjectChange); DashboardStorage.Instance.RegisterAction(DashboardEventsEnum.NavStageSelected, HandleStageChange); DashboardStorage.Instance.RegisterAction(DashboardEventsEnum.NavWellSelected, HandleWellChange); Initialize(); }
public MainWindowViewModel() { LoadSavedState(); DashboardStorage.Instance.RegisterAction(DashboardEventsEnum.CurrentSeismosClientId, SaveClientId); DashboardStorage.Instance.RegisterAction(DashboardEventsEnum.CurrentSeismosProjectId, SaveProjectId); // WidgetPanelControlViewModel is instansiated here so it can be injected into the controllers widgetPanelControlViewModel = new WidgetPanelControlViewModel(); // controllers go here // they control the state of a set of related widgets (project widgets, well widgets, stage widgets) // if there are any other groups of widgets which the state needs to be controlled add them here projectWidgetController = new ProjectWidgetController(widgetPanelControlViewModel); wellWidgetController = new WellWidgetController(widgetPanelControlViewModel); }