public override void PageLoaded(PageLoadedDirection direction) { base.PageLoaded(direction); textBoxLog.Clear(); switch (SelectedUpdateType) { case UpdateType.NewRetail: case UpdateType.Existing: textBoxLog.Text = PatchingWizardModeGuidanceBuilder.ModeRetailPatch(SelectedServers, Patch); AutomaticRadioButton.Enabled = true; AutomaticRadioButton.Checked = true; break; case UpdateType.NewSuppPack: AutomaticRadioButton.Enabled = true; AutomaticRadioButton.Checked = true; textBoxLog.Text = PatchingWizardModeGuidanceBuilder.ModeSuppPack(SelectedServers); break; } if (SelectedUpdateType == UpdateType.NewSuppPack || SelectedServers.Exists(server => !Helpers.ClearwaterOrGreater(server))) { removeUpdateFileCheckBox.Checked = false; removeUpdateFileCheckBox.Visible = false; } }
public override void PageLoaded(PageLoadedDirection direction) { base.PageLoaded(direction); textBoxLog.Clear(); var unknownType = false; var someHostMayRequireRestart = false; // If a host has restartHost guidance, even if is a live patch, we want this true (as live patch may fail) switch (SelectedUpdateType) { case UpdateType.NewRetail: case UpdateType.Existing: textBoxLog.Text = PatchingWizardModeGuidanceBuilder.ModeRetailPatch(SelectedServers, Patch, out someHostMayRequireRestart); break; case UpdateType.ISO: AutomaticRadioButton.Enabled = true; AutomaticRadioButton.Checked = true; textBoxLog.Text = PoolUpdate != null ? PatchingWizardModeGuidanceBuilder.ModeRetailPatch(SelectedServers, PoolUpdate, LivePatchCodesByHost, out someHostMayRequireRestart) : PatchingWizardModeGuidanceBuilder.ModeSuppPack(SelectedServers, out someHostMayRequireRestart); break; default: unknownType = true; break; } var automaticDisabled = unknownType || (AnyPoolForbidsAutoRestart() && someHostMayRequireRestart); AutomaticRadioButton.Enabled = !automaticDisabled; AutomaticRadioButton.Checked = !automaticDisabled; ManualRadioButton.Checked = automaticDisabled; if (automaticDisabled) { tableLayoutPanel1.MouseMove += tableLayoutPanel1_MouseMove; } if (SelectedUpdateType == UpdateType.ISO || SelectedServers.Exists(server => !Helpers.ClearwaterOrGreater(server))) { removeUpdateFileCheckBox.Checked = false; removeUpdateFileCheckBox.Visible = false; } }
public override void PageLoaded(PageLoadedDirection direction) { base.PageLoaded(direction); textBoxLog.Clear(); var unknownType = false; var someHostMayRequireRestart = false; // If a host has restartHost guidance, even if is a live patch, we want this true (as live patch may fail) switch (SelectedUpdateType) { case UpdateType.NewRetail: case UpdateType.Existing: textBoxLog.Text = PatchingWizardModeGuidanceBuilder.ModeRetailPatch(SelectedServers, Patch, LivePatchCodesByHost, out someHostMayRequireRestart); break; case UpdateType.NewSuppPack: textBoxLog.Text = PatchingWizardModeGuidanceBuilder.ModeSuppPack(SelectedServers, out someHostMayRequireRestart); break; default: unknownType = true; break; } var automaticDisabled = unknownType || (AnyPoolForbidsAutoRestart() && someHostMayRequireRestart); AutomaticRadioButton.Enabled = !automaticDisabled; AutomaticRadioButton.Checked = !automaticDisabled; ManualRadioButton.Checked = automaticDisabled; if (automaticDisabled) { allowRadioButtonContainer.SetToolTip(Messages.POOL_FORBIDS_AUTOMATIC_RESTARTS); } if (SelectedUpdateType == UpdateType.NewSuppPack || SelectedServers.Exists(server => !Helpers.ClearwaterOrGreater(server))) { removeUpdateFileCheckBox.Checked = false; removeUpdateFileCheckBox.Visible = false; } }