// Apply button on properties tab private void ApplyButton_Click(object sender, EventArgs e) { if (this.configChanged && changedConfigs.Count > 0) { SetUnsetConfig r = TaskHandlers.SetConfig(changedConfigs); if (r.Error == String.Empty) { DisplayMessageBox.Info("Properties configured: " + String.Join(",", r.Properties), "CodeReady Containers - Settings Applied"); } else { DisplayMessageBox.Error(r.Error); } } if (this.configsNeedingUnset.Count > 0) { SetUnsetConfig r = TaskHandlers.UnsetConfig(configsNeedingUnset); if (r.Error == String.Empty) { DisplayMessageBox.Info("Properties unset: " + String.Join(",", r.Properties), "CodeReady Containers - Settings Applied"); } else { DisplayMessageBox.Error(r.Error); } } // Load the configs again and reset the change trackers getConfigurationAndResetChanged(); }
async private void StartMenu_Click(object sender, EventArgs e) { // Check using get-config if pullSecret is configured var configs = TaskHandlers.ConfigView(); if (configs.Configs.PullSecretFile == "") { var pullSecretForm = new PullSecretPickerForm(); var pullSecretPath = pullSecretForm.ShowFilePicker(); if (pullSecretPath == "") { DisplayMessageBox.Warn("No Pull Secret was provided, Cannot start cluster without pull secret."); return; } Dictionary <String, dynamic> pullSecretConfig = new Dictionary <String, dynamic> { ["pull-secret-file"] = pullSecretPath }; TaskHandlers.SetConfig(pullSecretConfig); } ShowNotification(@"Starting Cluster", ToolTipIcon.Info); var startResult = await Task.Run(() => TaskHandlers.Start()); if (startResult == null) { return; } if (startResult.KubeletStarted) { DisplayMessageBox.Info(@"CodeReady Containers Cluster has started", @"Cluster Started"); } else { DisplayMessageBox.Warn(@"Cluster did not start. Please check detailed status"); } }