コード例 #1
0
ファイル: VMStoragePage.cs プロジェクト: robhoes/xenadmin
        private void DeleteDriveButton_Click(object sender, EventArgs e)
        {
            List<VBDRow> rows = SelectedVBDRows;
            if (rows == null)
                return;
            List<SelectedItem> l = new List<SelectedItem>();
            foreach (VBDRow r in rows)
                l.Add(new SelectedItem(r.VDI));

            DeleteVirtualDiskCommand cmd = new DeleteVirtualDiskCommand(Program.MainWindow, l);
            // User has visibility that this disk in use by this VM. Allow unplug + delete in single step (non default behaviour),
            // but only if we are the only VBD (default behaviour)
            cmd.AllowRunningVMDelete = true;
            if (cmd.CanExecute())
                cmd.Execute();
        }
コード例 #2
0
 private void removeVirtualDisk_Click(object sender, EventArgs e)
 {
     SelectedItemCollection vdis = SelectedVDIs;
     DeleteVirtualDiskCommand cmd = new DeleteVirtualDiskCommand(Program.MainWindow, vdis);
     cmd.AllowMultipleVBDDelete = true;
     if (cmd.CanExecute())
         cmd.Execute();
 }
コード例 #3
0
ファイル: SrStoragePage.cs プロジェクト: ushamandya/xenadmin
 private void RemoveSelectedVdis()
 {
     SelectedItemCollection vdis = SelectedVDIs;
     DeleteVirtualDiskCommand cmd = new DeleteVirtualDiskCommand(Program.MainWindow, vdis) {AllowMultipleVBDDelete = true};
     if (cmd.CanExecute())
         cmd.Execute();
 }