public ShellViewModel(SDGuiStrings strings, IConfigController configController, IBuildController buildController, Action onCloseHandle) { _onCloseHandle = onCloseHandle; _buildController = buildController; _buildController.BuildMessenger.OnStepMessage += (s) => StepMessage = s; _configController = configController; Strings = strings; Config = configController.GetConfigSection <ICoreConfigSection>(); ConfigSections = configController.GetAllConfigSections().ToList(); ProgressBarViewModel = new ProgressBarViewModel(buildController, strings); _configController.OnRecentProjectsChanged += RecentProjectsChanged; _buildWindow = new BuildView(Strings, buildController.BuildMessenger); RecentProjectsChanged(); }
public ShellViewModel(SDGuiStrings strings, IConfigController configController, BuildController buildController, Action onCloseHandle) { _onCloseHandle = onCloseHandle; _buildController = buildController; _buildController.BuildMessenger.OnStepMessage += (s) => StepMessage = s; _buildController.BuildMessenger.OnBuildFailed += () => Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => _buildWindow.Show())); _configController = configController; Strings = strings; Config = configController.GetConfigSection<ICoreConfigSection>(); ConfigSections = configController.GetAllConfigSections().ToList(); _configController.OnRecentProjectsChanged += RecentProjectsChanged; _buildWindow = new BuildView(Strings, buildController.BuildMessenger); ProgressBarViewModel = new ProgressBarViewModel(buildController, strings); RecentProjectsChanged(); }