protected override void ExecuteCore(SelectedItemCollection selection) { Trace.Assert(selection.Count == 1); var action = new UpdateVIFAction(_vm, _vif, _vifDescriptor); action.Completed += action_Completed; action.RunAsync(); }
private void launchVmNetworkSettingsDialog() { VM vm = XenObject as VM; VIF vif = SelectedVif; if (vm == null || vif == null) { return; } int device; if (!int.TryParse(vif.device, out device)) { log.ErrorFormat("Aborting vif edit. Could not parse existing vif device to int. Value is: '{0}'", vif.device); return; } VIF proxyVIF; using (var d = new VIFDialog(vm.Connection, vif, device, vm.HasSriovRecommendation())) { if (d.ShowDialog() != DialogResult.OK) { return; } proxyVIF = d.GetNewSettings(); } var action = new UpdateVIFAction(vm, vif, proxyVIF); action.Completed += updateVIFAction_Completed; InBuildList = true; action.RunAsync(); }