示例#1
0
 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();
     }
 }
示例#2
0
        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;
        }
示例#3
0
        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;
                        }
                    }
                }
            }
        }
示例#4
0
        public NewVMWizard(MainConfig mainConfIn)
        {
            InitializeComponent();

            mainConf = mainConfIn;
        }