Beispiel #1
0
        private void DoRemoveNetwork()
        {
            if (SelectedVif != null)
            {
                VM vm = XenObject as VM;

                var action = new DeleteVIFAction(SelectedVif);
                action.Completed += action_Completed;
                action.RunAsync();
            }
            else if (SelectedNetwork != null)
            {
                NetworkAction action = new NetworkAction(XenObject.Connection, SelectedNetwork, false);
                action.Completed += action_Completed;
                action.RunAsync();
            }
        }
Beispiel #2
0
        private void DoRemoveNetwork()
        {
            Program.MainWindow.AllowHistorySwitch = true;

            if (SelectedVif != null)
            {
                VM vm = XenObject as VM;

                var action = new DeleteVIFAction(SelectedVif);
                action.Completed += action_Completed;
                action.RunAsync();
            }
            else if (SelectedNetwork != null)
            {
                NetworkAction action = new NetworkAction(XenObject.Connection, SelectedNetwork, false);
                action.Completed += action_Completed;
                action.RunAsync();
            }
        }