コード例 #1
0
ファイル: PropertiesDialog.cs プロジェクト: ywscr/xenadmin
        private void verticalTabs_SelectedIndexChanged(object sender, EventArgs e)
        {
            var snapshotTypePage = verticalTabs.SelectedItem as NewPolicySnapshotTypePage;

            if (snapshotTypePage != null)
            {
                newPolicyVMSSTypePage1.ToggleQuiesceCheckBox(newVMSSVMsPage1.SelectedVMs);
                return;
            }

            var vmApplianceStartOrderPage = verticalTabs.SelectedItem as NewVMApplianceVMOrderAndDelaysPage;

            if (vmApplianceStartOrderPage != null && newVMApplianceVMsPage1 != null)
            {
                vmApplianceStartOrderPage.SetSelectedVMs(newVMApplianceVMsPage1.SelectedVMs);
                return;
            }

            if (verticalTabs.SelectedItem == VMHAEditPage)
            {
                VMHAEditPage.StartNtolUpdate();
                if (GpuEditPage != null)
                {
                    VMHAEditPage.VGpus = GpuEditPage.VGpus;
                    VMHAEditPage.RefillPrioritiesComboBox();
                }
                return;
            }

            if (verticalTabs.SelectedItem == GpuEditPage && VMHAEditPage != null)
            {
                GpuEditPage.SelectedPriority = VMHAEditPage.SelectedPriority;
                GpuEditPage.ShowHideWarnings();
                return;
            }

            if (verticalTabs.SelectedItem == usbEditPage && VMHAEditPage != null)
            {
                usbEditPage.SelectedPriority = VMHAEditPage.SelectedPriority;
                usbEditPage.ShowHideWarnings();
                return;
            }

            if (verticalTabs.SelectedItem == HostPowerONEditPage)
            {
                HostPowerONEditPage.LoadPowerOnMode();
                return;
            }
        }
コード例 #2
0
        private void verticalTabs_SelectedIndexChanged(object sender, EventArgs e)
        {
            var snapshotTypePageSpecific = verticalTabs.SelectedItem as NewPolicySnapshotTypePageSpecific <VMSS>;

            if (snapshotTypePageSpecific != null)
            {
                newPolicyVMSSTypePage1.ToggleQuiesceCheckBox(newVMSSVMsPage1.SelectedVMs);
                return;
            }

            var selectedPage = verticalTabs.SelectedItem as NewPolicyArchivePage;

            if (selectedPage != null)
            {
                if (newPolicySnapshotFrequencyPage1.ValidToSave)
                {
                    selectedPage.SetXenObjects(null, null);
                }
                return;
            }

            var vmApplianceStartOrderPage = verticalTabs.SelectedItem as NewVMApplianceVMOrderAndDelaysPage;

            if (vmApplianceStartOrderPage != null && newVMApplianceVMsPage1 != null)
            {
                vmApplianceStartOrderPage.SetSelectedVMs(newVMApplianceVMsPage1.SelectedVMs);
                return;
            }

            if (verticalTabs.SelectedItem == VMHAEditPage)
            {
                VMHAEditPage.StartNtolUpdate();
                if (GpuEditPage != null)
                {
                    VMHAEditPage.GpuGroup = GpuEditPage.GpuGroup;
                    VMHAEditPage.VgpuType = GpuEditPage.VgpuType;
                    VMHAEditPage.RefillPrioritiesComboBox();
                }
                return;
            }

            if (verticalTabs.SelectedItem == GpuEditPage && VMHAEditPage != null)
            {
                GpuEditPage.SelectedPriority = VMHAEditPage.SelectedPriority;
                GpuEditPage.ShowHideWarnings();
                return;
            }
        }