private void MainForm_Load(object sender, EventArgs e) { mainConf = new MainConfig(); if (mainConf.LoadMainConfig()) { mainConf.LoadSettings(); LoadVirtualMachines(mainConf); } else { // create settings for first run mainConf.CreateSettings(); } }
public ConsoleSettings(MainConfig mainConf) { InitializeComponent(); // set general tab conUpdateCombo.SelectedIndex = mainConf.UpdateSched; // set paths tab conQemuLoc.Text = mainConf.QemuPath; conVdkLoc.Text = mainConf.VdkPath; conDefVmLoc.Text = mainConf.DefVmPath; // set advanced tab conAppDebug.Checked = mainConf.AppDebug; }
private void LoadVirtualMachines(MainConfig mainConf) { int num = mainConf.GetNumberOfVms(); for (int i = 0; i < num; i++) { string path = mainConf.GetImagePath(i); VirtMachConfig vmConfig = new VirtMachConfig(); if (vmConfig.LoadVMConfig(path)) { if (vmConfig.LoadVmSettings()) { foreach (VirtMachInfo vmInfo in vmConfig.VMInfo) { VirtualMachine vm = new VirtualMachine(vmInfo); ListViewItem lvi = VirtMachListView.Items.Add(vmConfig.ToString(), 0); lvi.SubItems.Add(vm.MemSize.ToString() + " MB"); lvi.Tag = vm; } } } } }
public NewVMWizard(MainConfig mainConfIn) { InitializeComponent(); mainConf = mainConfIn; }