private void PropertiesButton_Click(object sender, EventArgs e) { if (DisksGridView.SelectedRows.Count <= 0) return; DiskGridRowItem selectedItem = ((DiskGridRowItem)DisksGridView.SelectedRows[0]); NewDiskDialog dialog = new NewDiskDialog(Connection, Template, SrPicker.SRPickerType.LunPerVDI, selectedItem.Disk, Affinity, selectedItem.CanResize, selectedItem.MinSize, AddedVDIs); dialog.DontCreateVDI = true; if (dialog.ShowDialog() != DialogResult.OK) return; selectedItem.Disk = dialog.NewDisk(); selectedItem.UpdateDetails(); UpdateEnablement(); }
private void AddButton_Click(object sender, EventArgs e) { NewDiskDialog dialog = new NewDiskDialog(Connection, Template, SrPicker.SRPickerType.LunPerVDI, null, Affinity, true, 0, AddedVDIs); dialog.DontCreateVDI = true; if (dialog.ShowDialog() != DialogResult.OK) return; DisksGridView.Rows.Add(new DiskGridRowItem(Connection, dialog.NewDisk(), dialog.NewDevice(), true, Affinity)); UpdateEnablement(); }