public VMDataGridViewRow(VM vm, VMStartupOptions settings) { Vm = vm; Cells.Add(_nameCell); Cells.Add(_descriptionCell); Cells.Add(_orderCell); Cells.Add(_startDelayCell);; Settings = settings; _nameCell.Value = Vm.Name; _descriptionCell.Value = Vm.Description; UpdateRow(); }
private void RefreshTab() { dataGridView1.Rows.Clear(); foreach (VM vm in _selectedVMs) { VMStartupOptions settings = _currentSettings != null && _currentSettings.ContainsKey(vm) ? new VMStartupOptions(_currentSettings[vm].Order, _currentSettings[vm].StartDelay) : new VMStartupOptions(vm.order, vm.start_delay); // Create a new row for this VM dataGridView1.Rows.Add(new VMDataGridViewRow(vm, settings)); } dataGridView1.Sort(ColumnName, ListSortDirection.Ascending); }
public AsyncAction SaveSettings() { if (vm == null || (!ChangesMadeInStartupOptions() && !ChangesMadeInHA())) { return(null); } var settings = new Dictionary <VM, VMStartupOptions>(); if (ChangesMadeInHA() && PoolHasHAEnabled) { settings[vm] = new VMStartupOptions((long)nudOrder.Value, (long)nudStartDelay.Value, SelectedPriority); return(new SetHaPrioritiesAction(vm.Connection, settings, haNtolIndicator.Ntol, true)); } settings[vm] = new VMStartupOptions((long)nudOrder.Value, (long)nudStartDelay.Value); return(new SetVMStartupOptionsAction(vm.Connection, settings, true)); }
public AsyncAction SaveSettings() { if (vm == null || (!ChangesMadeInStartupOptions() && !ChangesMadeInHA())) return null; var settings = new Dictionary<VM, VMStartupOptions>(); if (ChangesMadeInHA() && PoolHasHAEnabled) { settings[vm] = new VMStartupOptions((long) nudOrder.Value, (long) nudStartDelay.Value, SelectedPriority); return new SetHaPrioritiesAction(vm.Connection, settings, haNtolIndicator.Ntol); } settings[vm] = new VMStartupOptions((long)nudOrder.Value, (long)nudStartDelay.Value); return new SetVMStartupOptionsAction(vm.Connection, settings); }
public VMDataGridViewRow(VM vm, VMStartupOptions settings) { Vm = vm; Cells.Add(_nameCell); Cells.Add(_descriptionCell); Cells.Add(_orderCell); Cells.Add(_startDelayCell);; Settings = settings; _nameCell.Value = Vm.Name; _descriptionCell.Value = Vm.Description; UpdateRow(); }