private void ChangeStatus(CheckModule moduleName, bool status) { if (this.initModuleStatus.ContainsKey(moduleName)) { if (status) { this.initModuleStatus[moduleName] = true; } else { this.initModuleStatus[moduleName] = false; } } }
public static string GetCheckModuleDes(this CheckModule moduleDes) { switch (moduleDes) { case CheckModule.EnableRDP: return("Enable Remote Destop service."); case CheckModule.EnableWinRM: return("Enable WinRM service."); case CheckModule.IPconfig: return("Gateway of each NIC is pingable."); case CheckModule.HyperVFeature: return("Hyper-V features are install."); case CheckModule.ClusterFeature: return("Cluster features are install."); case CheckModule.ISCSiConnection: return("ISCSi storages are connection."); case CheckModule.JoinDomain: return("Host in Domain."); case CheckModule.EnableRemoteControle: return("Host allow remote control."); case CheckModule.GPUFeature: return("GPU feature are install."); case CheckModule.CreateVM: return("Create VM."); case CheckModule.CreateCluster: return("Create Cluster."); case CheckModule.CreateVirtualSwitch: return("Virtual switch setting is correct."); case CheckModule.CheckCluster: case CheckModule.JoinNodeToCluster: default: break; } return("Those features are not ready."); }
void SetupModule(CheckModule moduleName) { switch (moduleName) { case CheckModule.EnableRDP: ProcessCaller.ProcessOpenByPowershell(MainForm.CorefigPath + VanScript.RemoteDesktop); break; case CheckModule.EnableWinRM: ProcessCaller.ProcessOpenByPowershell(MainForm.CorefigPath + VanScript.WINRM); break; case CheckModule.IPconfig: ProcessCaller.ProcessOpenByPowershell(MainForm.CorefigPath + VanScript.IpSettings); break; case CheckModule.GPUFeature: this.InstallGpuFeature(); break; case CheckModule.HyperVFeature: case CheckModule.ClusterFeature: MessageBox.Show("After install those feature. You need reboot."); ProcessCaller.ProcessOpenByPowershell(MainForm.CorefigPath + VanScript.Roles); break; case CheckModule.ISCSiConnection: List <ISCSiInfo> info = GetISCSiInfo(); if (info.Count > 0) { iscsiForm = new iSCSIForm(info); iscsiForm.Show(this); } else { ProcessCaller.ProcessOpen(VanScript.IscsiUI); } break; case CheckModule.JoinDomain: ProcessCaller.ProcessOpenByPowershell(MainForm.CorefigPath + VanScript.JoinDomainAndRename); break; case CheckModule.EnableRemoteControle: EnableRemoteControl(); break; case CheckModule.CreateCluster: MainForm.clusterForm.Show(this); break; case CheckModule.CreateVM: MainForm.Open59Manager(); break; case CheckModule.CreateVirtualSwitch: vSwitchForm = new CreateVirtualSwitchForm(); vSwitchForm.Show(this); break; default: MessageBox.Show("Not ready"); break; } }