private void addContextMenuStrip_Opening(object sender, CancelEventArgs e) { this.addContextMenuStrip.Items.Clear(); Command command = new AddVirtualDiskCommand(Program.MainWindow, this.sr); this.addContextMenuStrip.Items.Add(new CommandToolStripMenuItem(command, Messages.ADD_VIRTUAL_DISK)); //command = new ImportStorageLinkVolumeCommand(Program.MainWindow, this.sr.StorageLinkRepository(Program.StorageLinkConnections)); //this.addContextMenuStrip.Items.Add(new CommandToolStripMenuItem(command, Messages.ADD_SL_VOLUME)); }
private void AddVdi() { var cmd = new AddVirtualDiskCommand(Program.MainWindow, vm); if (cmd.CanExecute()) { cmd.Execute(); } }
private void AddVdi() { var cmd = new AddVirtualDiskCommand(Program.MainWindow, vm); if (cmd.CanExecute()) { cmd.Execute(); } // don't wait for the property change to trigger it, as this can take a while UpdateButtons(); }
private void AddButton_Click(object sender, EventArgs e) { var cmd = new AddVirtualDiskCommand(Program.MainWindow.CommandInterface, vm); if (cmd.CanExecute()) { cmd.Execute(); } // don't wait for the property change to trigger it, as this can take a while UpdateButtons(); }