示例#1
0
        public CrossPoolMigrateStoragePage(WizardMode wizardMode)
        {
            DisplayDiskCapacity = false;
            this.wizardMode     = wizardMode;

            InitializeText();
        }
        public CrossPoolMigrateNetworkingPage(bool templatesOnly, WizardMode wizardMode)
        {
            this.templatesOnly = templatesOnly;
            this.wizardMode = wizardMode;

            InitializeText();
        }
示例#3
0
 public void SetSchemaMenu(WizardMode mode, ToolStripMenuItem inputLoadSchemaToolStripMenuItem, ToolStripMenuItem inputSaveSchemaToolStripMenuItem, TextBox schemaPathTextBox, Button schemaFolderPathButton)
 {
     inputLoadSchemaToolStripMenuItem.Enabled = mode == WizardMode.Schema || mode == WizardMode.All;
     inputSaveSchemaToolStripMenuItem.Enabled = mode == WizardMode.Schema || mode == WizardMode.All;
     schemaPathTextBox.Enabled      = mode == WizardMode.Schema || mode == WizardMode.All;
     schemaFolderPathButton.Enabled = mode == WizardMode.Schema || mode == WizardMode.All;
 }
        public CrossPoolMigrateFinishPage(int selectionCount, WizardMode wizardMode, bool templatesOnly)
		{
            InitializeComponent();
            this.selectionCount = selectionCount;
            this.wizardMode = wizardMode;
            this.templatesOnly = templatesOnly;
		}
示例#5
0
 private void SetMenuVisibility(WizardMode mode)
 {
     SetImportMenu(mode, tsbtMappings, loadMappingsToolStripMenuItem, saveMappingsToolStripMenuItem, tbImportConfig, btImportConfigPath);
     SetExportMenu(mode, lookupMappings, tsbtFilters, loadFiltersToolStripMenuItem, saveFiltersToolStripMenuItem, tbExportConfig, btExportConfigPath);
     SetSchemaMenu(mode, loadSchemaToolStripMenuItem, saveSchemaToolStripMenuItem, tbSchemaPath, btSchemaFolderPath);
     SetAllMenu(mode, loadAllToolStripMenuItem, saveAllToolStripMenuItem);
 }
        public CrossPoolMigrateWizard(IXenConnection con, IEnumerable<SelectedItem> selection, WizardMode mode)
			: base(con)
        {
            InitializeComponent();
            wizardMode = mode;
            InitialiseWizard(selection);
        }
示例#7
0
 public CrossPoolMigrateFinishPage(int selectionCount, WizardMode wizardMode, bool templatesOnly)
 {
     InitializeComponent();
     this.selectionCount = selectionCount;
     this.wizardMode     = wizardMode;
     this.templatesOnly  = templatesOnly;
 }
 public CrossPoolMigrateWizard(IXenConnection con, IEnumerable <SelectedItem> selection, WizardMode mode)
     : base(con)
 {
     InitializeComponent();
     wizardMode = mode;
     InitialiseWizard(selection);
 }
        public CrossPoolMigrateStoragePage(WizardMode wizardMode)
        {
            DisplayDiskCapacity = false;
            this.wizardMode = wizardMode;

            InitializeText();
        }
        public CrossPoolMigrateNetworkingPage(bool templatesOnly, WizardMode wizardMode)
        {
            this.templatesOnly = templatesOnly;
            this.wizardMode    = wizardMode;

            InitializeText();
        }
示例#11
0
 public void SetImportMenu(WizardMode mode, System.Windows.Forms.ToolStripButton mappingsToolStripButton, System.Windows.Forms.ToolStripMenuItem inputLoadMappingsToolStripMenuItem, System.Windows.Forms.ToolStripMenuItem inputSaveMappingsToolStripMenuItem, System.Windows.Forms.TextBox importConfigTextBox, System.Windows.Forms.Button importConfigPathButton)
 {
     mappingsToolStripButton.Enabled            = mode == WizardMode.All || mode == WizardMode.Import;
     inputLoadMappingsToolStripMenuItem.Enabled = mode == WizardMode.All || mode == WizardMode.Import;
     inputSaveMappingsToolStripMenuItem.Enabled = mode == WizardMode.All || mode == WizardMode.Import;
     importConfigTextBox.Enabled    = mode == WizardMode.All || mode == WizardMode.Import;
     importConfigPathButton.Enabled = mode == WizardMode.All || mode == WizardMode.Import;
 }
示例#12
0
 public CrossPoolMigrateDestinationPage(Host preSelectedHost, List <VM> selectedVMs, WizardMode wizardMode)
 {
     this.preSelectedHost = preSelectedHost;
     SetDefaultTarget(preSelectedHost);
     this.selectedVMs = selectedVMs;
     this.wizardMode  = wizardMode;
     InitializeText();
 }
示例#13
0
        public CrossPoolMigrateDestinationPage(List <VM> selectedVMs, WizardMode wizardMode, List <IXenConnection> ignoredConnections)
        {
            this.selectedVMs        = selectedVMs;
            this.wizardMode         = wizardMode;
            this.ignoredConnections = ignoredConnections ?? new List <IXenConnection>();

            InitializeText();
        }
 public CrossPoolMigrateDestinationPage(Host preSelectedHost, List<VM> selectedVMs, WizardMode wizardMode)
 {
     this.preSelectedHost = preSelectedHost;
     SetDefaultTarget(preSelectedHost);
     this.selectedVMs = selectedVMs;
     this.wizardMode = wizardMode;
     InitializeText();
 }
示例#15
0
        public CrossPoolMigrateDestinationPage(Host preSelectedHost, List <VM> selectedVMs, WizardMode wizardMode, List <IXenConnection> ignoredConnections)
        {
            SetDefaultTarget(preSelectedHost);
            this.selectedVMs        = selectedVMs;
            this.wizardMode         = wizardMode;
            this.ignoredConnections = ignoredConnections ?? new List <IXenConnection>();

            InitializeText();
        }
示例#16
0
 protected override void InitializeFields()
 {
     base.InitializeFields();
     this.pages = new WizardPageCollection(this);
     this.mode  = WizardMode.Wizard97;
     this.UpdateView(this.mode);
     this.pageHeaderCustomized = false;
     LocalizationProvider <RadWizardLocalizationProvider> .CurrentProviderChanged += new EventHandler(this.RadWizardLocalizationProvider_CurrentProviderChanged);
 }
        public CrossPoolMigrateDestinationPage(Host preSelectedHost, List<VM> selectedVMs, WizardMode wizardMode, List<IXenConnection> ignoredConnections)
        {
            SetDefaultTarget(preSelectedHost);
            this.selectedVMs = selectedVMs;
            this.wizardMode = wizardMode;
            this.ignoredConnections = ignoredConnections ?? new List<IXenConnection>();

            InitializeText();
        }
        public CrossPoolMigrateTransferNetworkPage(List <VM> selectedVMs, bool templatesOnly, WizardMode wizardMode)
        {
            this.selectedVMs   = selectedVMs;
            this.templatesOnly = templatesOnly;
            this.wizardMode    = wizardMode;

            InitializeComponent();
            InitializeCustomPageElements();
        }
        public CrossPoolMigrateTransferNetworkPage(List<VM> selectedVMs, bool templatesOnly, WizardMode wizardMode)
        {
            this.selectedVMs = selectedVMs;
            this.templatesOnly = templatesOnly;
            this.wizardMode = wizardMode;

            InitializeComponent();
            InitializeCustomPageElements();
        }
示例#20
0
 public void SetExportMenu(WizardMode mode, ToolStripButton inputLookupMappings, ToolStripButton filtersToolStripButton, ToolStripMenuItem inputLoadFiltersToolStripMenuItem, ToolStripMenuItem inputSaveFiltersToolStripMenuItem, TextBox exportConfigTextBox, Button exportConfigPathButton)
 {
     inputLookupMappings.Enabled               = mode == WizardMode.Export || mode == WizardMode.All;
     filtersToolStripButton.Enabled            = mode == WizardMode.Export || mode == WizardMode.All;
     inputLoadFiltersToolStripMenuItem.Enabled = mode == WizardMode.Export || mode == WizardMode.All;
     inputSaveFiltersToolStripMenuItem.Enabled = mode == WizardMode.Export || mode == WizardMode.All;
     exportConfigTextBox.Enabled               = mode == WizardMode.Export || mode == WizardMode.All;
     exportConfigPathButton.Enabled            = mode == WizardMode.Export || mode == WizardMode.All;
 }
示例#21
0
 // Note that resumeAfter is currently only implemented for Migrate mode, used for resume on server functionality
 public CrossPoolMigrateWizard(IXenConnection con, IEnumerable <SelectedItem> selection, Host targetHostPreSelection, WizardMode mode, bool resumeAfterMigrate = false)
     : base(con)
 {
     InitializeComponent();
     hostPreSelection = targetHostPreSelection;
     wizardMode       = mode;
     InitialiseWizard(selection);
     _resumeAfterMigrate = resumeAfterMigrate;
 }
        public CrossPoolMigrateCanMigrateFilter(IXenObject itemAddedToComboBox, List<VM> preSelectedVMs, WizardMode wizardMode)
            : base(itemAddedToComboBox)
        {
            _wizardMode = wizardMode;

            if (preSelectedVMs == null)
                throw new ArgumentNullException("Pre-selected VMs are null");
            this.preSelectedVMs = preSelectedVMs;
        }
 // Note that resumeAfter is currently only implemented for Migrate mode, used for resume on server functionality
 public CrossPoolMigrateWizard(IXenConnection con, IEnumerable<SelectedItem> selection, Host targetHostPreSelection, WizardMode mode, bool resumeAfterMigrate=false)
     : base(con)
 {
     InitializeComponent();
     hostPreSelection = targetHostPreSelection;
     wizardMode = mode;
     InitialiseWizard(selection);
     _resumeAfterMigrate = resumeAfterMigrate;
 }
示例#24
0
        protected override void InitializeFields()
        {
            base.InitializeFields();

            this.pages = new WizardPageCollection(this);

            this.mode = WizardMode.Wizard97;
            this.UpdateView(this.mode);

            this.pageHeaderCustomized = false;
        }
示例#25
0
        public CrossPoolMigrateCanMigrateFilter(IXenObject itemAddedToComboBox, List <VM> preSelectedVMs, WizardMode wizardMode)
            : base(itemAddedToComboBox)
        {
            _wizardMode = wizardMode;

            if (preSelectedVMs == null)
            {
                throw new ArgumentNullException("Pre-selected VMs are null");
            }
            this.preSelectedVMs = preSelectedVMs;
        }
示例#26
0
        private void Start()
        {
            schedule = FindObjects.GameLogic.GetComponent <SchedulingSystem>();
            wizard   = FindObjects.GameLogic.GetComponent <WizardMode>();
            init     = FindObjects.GameLogic.GetComponent <Initialize>();
            coord    = FindObjects.GameLogic.GetComponent <ConvertCoordinates>();
            actor    = FindObjects.GameLogic.GetComponent <ActorBoard>();
            gameMode = FindObjects.GameLogic.GetComponent <SubMode>();
            modeline = FindObjects.GameLogic.GetComponent <UIModeline>();

            input = GetComponent <PlayerInput>();
        }
示例#27
0
        private void UpdateView(WizardMode mode)
        {
            RadWizard control = null;

            if (this.ElementTree != null)
            {
                control = this.ElementTree.Control as RadWizard;
            }

            if (this.view != null)
            {
                if (control != null)
                {
                    control.UnWireEvents();
                }

                this.Children.Remove(view);
            }
            WizardView previousView = this.view;

            switch (this.mode)
            {
            case WizardMode.Wizard97:
                this.view = new Wizard97View(this);
                if (control != null)
                {
                    control.UnapplyAeroStyle();
                }
                break;

            case WizardMode.Aero:
                this.view = new WizardAeroView(this);
                break;

            default:
                break;
            }
            if (this.view != null)
            {
                this.Children.Add(view);
                this.UpdateView(this.selectedPage);

                if (control != null)
                {
                    control.WireEvents();
                }
            }
            if (previousView != null)
            {
                this.SetViewProperties(previousView);
            }
        }
示例#28
0
        private void OnGUI()
        {
            Rect headerRect = GUILayoutUtility.GetRect(640, 128);

            GUI.DrawTexture(headerRect, header);
            GUILayout.Space(8);
            using (new GUILayout.HorizontalScope())
            {
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Tips", Styles.buttonLeft))
                {
                    wizardMode = WizardMode.TipOfTheDay;
                }
                EditorGUI.BeginDisabledGroup(true);
                if (GUILayout.Button("Setup", Styles.buttonMid))
                {
                    wizardMode = WizardMode.FirstTimeSetup;
                }
                if (GUILayout.Button("Configuration", Styles.buttonRight))
                {
                    wizardMode = WizardMode.Configuration;
                }
                EditorGUI.EndDisabledGroup();
                GUILayout.FlexibleSpace();
            }
            GUILayout.Space(8);

            switch (wizardMode)
            {
            case WizardMode.TipOfTheDay: TipOfTheDayGUI();
                break;

            case WizardMode.FirstTimeSetup: FirstTimeSetupGUI();
                break;

            case WizardMode.Configuration: ConfigurationGUI();
                break;
            }

            Rect line = GUILayoutUtility.GetRect(640, 1);

            EditorGUI.DrawRect(line, Color.black);
            using (new GUILayout.HorizontalScope())
            {
                showOnStartup = GUILayout.Toggle(showOnStartup, "Show this window on startup");
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Close"))
                {
                    this.Close();
                }
            }
        }
        /// <summary>
        ///     Constructor to start the wizard in the specified mode
        /// </summary>
        public ModelBuilderWizardForm(
            IServiceProvider serviceProvider,
            ModelBuilderSettings modelBuilderSettings, WizardMode wizardMode)
        {
            _wizardMode      = wizardMode;
            _serviceProvider = serviceProvider;

            Debug.Assert(modelBuilderSettings.Project != null, "modelBuilderSettings.Project != null");

            _modelBuilderSettings = modelBuilderSettings;

            Initialize();
        }
示例#30
0
        private void Start()
        {
            energyData = FindObjects.GameLogic.GetComponent <EnergyData>();
            board      = FindObjects.GameLogic.GetComponent <DungeonBoard>();
            direction  = FindObjects.GameLogic.GetComponent <Direction>();
            message    = FindObjects.GameLogic.GetComponent <UIMessage>();
            wizard     = FindObjects.GameLogic.GetComponent <WizardMode>();

            if (!LoadedActorData)
            {
                Reset();
            }
        }
        public CrossPoolMigrateTransferNetworkPage(List <VM> selectedVMs, bool templatesOnly, WizardMode wizardMode)
        {
            this.selectedVMs = selectedVMs;
            this.wizardMode  = wizardMode;

            InitializeComponent();

            blurbText.Text = templatesOnly ? Messages.CPS_WIZARD_MIGRATION_PAGE_TITLE_TEMPLATE : Messages.CPS_WIZARD_MIGRATION_PAGE_TITLE_VM;

            networkComboBox.ShowPoolName = true;
            networkComboBox.ExcludeDisconnectedNetworks       = true;
            networkComboBox.ExcludeNetworksWithoutIpAddresses = true;
        }
        // <summary>
        //     Constructor to start the wizard in the specified mode
        // </summary>
        public ModelBuilderWizardForm(
            IServiceProvider serviceProvider,
            ModelBuilderSettings modelBuilderSettings, 
            WizardMode wizardMode)
        {
            _wizardMode = wizardMode;
            _serviceProvider = serviceProvider;

            Debug.Assert(modelBuilderSettings.Project != null, "modelBuilderSettings.Project != null");

            _modelBuilderSettings = modelBuilderSettings;

            Initialize();
        }
        public CrossPoolMigrateCanMigrateFilter(IXenObject itemAddedToComboBox, List <VM> preSelectedVMs, WizardMode wizardMode, IDictionary <string, IDictionary <string, string> > cache = null)
            : base(itemAddedToComboBox)
        {
            _wizardMode = wizardMode;
            if (cache == null)
            {
                this.cache = new Dictionary <string, IDictionary <string, string> >();
            }
            else
            {
                this.cache = cache;
            }

            if (preSelectedVMs == null)
            {
                throw new ArgumentNullException("Pre-selected VMs are null");
            }
            this.preSelectedVMs = preSelectedVMs;
        }
示例#34
0
        private void UpdateView(WizardMode mode)
        {
            RadWizard radWizard = (RadWizard)null;

            if (this.ElementTree != null)
            {
                radWizard = this.ElementTree.Control as RadWizard;
            }
            if (this.view != null)
            {
                radWizard?.UnWireEvents();
                this.Children.Remove((RadElement)this.view);
            }
            WizardView view = this.view;

            switch (this.mode)
            {
            case WizardMode.Wizard97:
                this.view = (WizardView) new Wizard97View(this);
                if (radWizard != null)
                {
                    radWizard.UnapplyAeroStyle();
                    break;
                }
                break;

            case WizardMode.Aero:
                this.view = (WizardView) new WizardAeroView(this);
                break;
            }
            if (this.view != null)
            {
                this.Children.Add((RadElement)this.view);
                this.UpdateView(this.selectedPage);
                radWizard?.WireEvents();
            }
            if (view == null)
            {
                return;
            }
            this.SetViewProperties(view);
        }
 public override void AcceptChanges(WizardMode wizardMode)
 {
     if (wizardMode == WizardMode.PropertySheet)
     {
         this.UpdateConnectorInstance();
     }
     else
     {
         try
         {
             this.CreateConnectorInstance();
             this.WizardResult = WizardResult.Success;
         }
         catch (Exception ex)
         {
             this.WizardResult = WizardResult.Failed;
             this.ErrorMessage = ex.ToString();
         }
     }
 }
        public override void AcceptChanges(WizardMode wizardMode)
        {
            //Get the server name to connect to and connect
            String strServerName          = Registry.GetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\System Center\\2010\\Service Manager\\Console\\User Settings", "SDKServiceMachine", "localhost").ToString();
            EnterpriseManagementGroup emg = new EnterpriseManagementGroup(strServerName);

            //Get the AdminSettings MP so you can get the Admin Setting class
            ManagementPack      mpIncidentSLAManagement            = emg.GetManagementPack("Microsoft.Demo.IncidentSLAManagement.Library", "9396306c2be7fcc4", new Version("1.0.0.0"));
            ManagementPackClass classIncidentSLAManagementSettings = mpIncidentSLAManagement.GetClass("Microsoft.Demo.IncidentSLAManagement.Settings.ClassType");

            //Get the object using the object ID
            EnterpriseManagementObject emoIncidentSLASettings = emg.EntityObjects.GetObject <EnterpriseManagementObject>(this.EnterpriseManagementObjectID, ObjectQueryOptions.Default);

            //Set the property value to the new value
            emoIncidentSLASettings[classIncidentSLAManagementSettings, "IncidentSLABreachWarningThreshold"].Value = this.WarningThreshold;

            //Update object
            emoIncidentSLASettings.Commit();

            this.WizardResult = WizardResult.Success;
        }
        private void OnGUI()
        {
            Rect headerRect = GUILayoutUtility.GetRect(640, 215);

            GUI.DrawTexture(headerRect, header);
            using (new GUILayout.AreaScope(new Rect(160, 180, 320, 32)))
            {
                using (new GUILayout.HorizontalScope())
                {
                    GUILayout.FlexibleSpace();

                    using (new GUILayout.HorizontalScope(EditorStyles.miniButton))
                    {
                        bool value = false;

                        value = wizardMode == WizardMode.TipOfTheDay;
                        value = GUILayout.Toggle(value, "  Tips  ", Styles.buttonLeft);
                        if (value)
                        {
                            wizardMode = WizardMode.TipOfTheDay;
                        }

                        value = wizardMode == WizardMode.FirstTimeSetup;
                        value = GUILayout.Toggle(value, "  Setup  ", Styles.buttonMid);
                        if (value)
                        {
                            wizardMode = WizardMode.FirstTimeSetup;
                        }

                        value = wizardMode == WizardMode.About;
                        value = GUILayout.Toggle(value, "  About  ", Styles.buttonRight);
                        if (value)
                        {
                            wizardMode = WizardMode.About;
                        }
                    }

                    GUILayout.FlexibleSpace();
                }
            }
            GUILayout.Space(8);

            switch (wizardMode)
            {
            case WizardMode.TipOfTheDay:
                OnTipsGUI();
                break;

            case WizardMode.FirstTimeSetup:
                OnSetupGUI();
                break;

            case WizardMode.About:
                OnAboutGUI();
                break;
            }

            Rect line = GUILayoutUtility.GetRect(640, 1);

            EditorGUI.DrawRect(line, Color.black);
            using (new GUILayout.HorizontalScope())
            {
                if (!GameplayIngredientsSettings.currentSettings.disableWelcomeScreenAutoStart)
                {
                    showOnStartup = GUILayout.Toggle(showOnStartup, " Show this window on startup");
                }
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Close"))
                {
                    this.Close();
                }
            }
        }
        public CrossPoolMigrateFinishPage(int selectionCount, WizardMode wizardMode)
		{
            InitializeComponent();
            this.selectionCount = selectionCount;
            this.wizardMode = wizardMode;
		}
示例#39
0
 public void SetAllMenu(WizardMode mode, ToolStripMenuItem inputLoadAllToolStripMenuItem, ToolStripMenuItem inputSaveAllToolStripMenuItem)
 {
     inputLoadAllToolStripMenuItem.Enabled = mode == WizardMode.All;
     inputSaveAllToolStripMenuItem.Enabled = mode == WizardMode.All;
 }
        //This Saves the values that have been set throughout the Wizard Pages back into the management pack so the
        //Advanced Action Log Notifier can read them via ((Get-SCSMObject -Class (Get-SCSMClass -Name "AdhocAdam.Advanced.Action.Log.Notify.AdminSettings$")))
        public override void AcceptChanges(WizardMode wizardMode)
        {
            //Get the server name to connect to and then connect
            String strServerName          = Registry.GetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\System Center\\2010\\Service Manager\\Console\\User Settings", "SDKServiceMachine", "localhost").ToString();
            EnterpriseManagementGroup emg = new EnterpriseManagementGroup(strServerName);

            //Get the Advanced Action Notifier class by GUID
            ManagementPackClass adhocAdamAALNClass = emg.EntityTypes.GetClass(new Guid("49a053e7-6080-e211-fd79-ca3607eecce7"));

            //Get the SMLets Exchange Connector Settings object using the object GUID
            EnterpriseManagementObject emoAdminSetting = emg.EntityObjects.GetObject <EnterpriseManagementObject>(this.EnterpriseManagementObjectID, ObjectQueryOptions.Default);

            //Workflow Status
            //Retrieve the unsealed workflow management pack that contains the workflows, to control whether or not the workflows are enabled/disabled
            //https://marcelzehner.ch/2013/07/04/a-look-at-scsm-workflows-and-notifications-and-how-to-manage-them-by-using-scripts/
            ManagementPack     adhocAdamAALWFClass           = emg.ManagementPacks.GetManagementPack(new Guid("4db18489-38fa-895a-7149-902b675dc752"));
            ManagementPackRule assignedNotificationWF        = adhocAdamAALWFClass.GetRule("AdhocAdam.Advanced.Action.Log.Notify.TroubleTicketAnalystCommentNotification");
            ManagementPackRule affectedNotificationWF        = adhocAdamAALWFClass.GetRule("AdhocAdam.Advanced.Action.Log.Notify.TroubleTicketUserCommentNotification");
            ManagementPackRule workItemCommentNotificationWF = adhocAdamAALWFClass.GetRule("AdhocAdam.Advanced.Action.Log.Notify.WorkItemUserCommentNotification");

            assignedNotificationWF.Status        = ManagementPackElementStatus.PendingUpdate;
            affectedNotificationWF.Status        = ManagementPackElementStatus.PendingUpdate;
            workItemCommentNotificationWF.Status = ManagementPackElementStatus.PendingUpdate;

            //Notify Assigned To
            if (this.IsNotifyAssignedUserEnabled == true)
            {
                assignedNotificationWF.Enabled = ManagementPackMonitoringLevel.@true;
            }
            else
            {
                assignedNotificationWF.Enabled = ManagementPackMonitoringLevel.@false;
            }

            //Notify Affected User
            if (this.IsNotifyAffecteddUserEnabled == true)
            {
                affectedNotificationWF.Enabled = ManagementPackMonitoringLevel.@true;
            }
            else
            {
                affectedNotificationWF.Enabled = ManagementPackMonitoringLevel.@false;
            }

            //Service Request Comments
            if (this.IsNotifyWorkItemCommentsEnabled == true)
            {
                workItemCommentNotificationWF.Enabled = ManagementPackMonitoringLevel.@true;
            }
            else
            {
                workItemCommentNotificationWF.Enabled = ManagementPackMonitoringLevel.@false;
            }

            //save the changes back to the unsealed mp
            adhocAdamAALWFClass.AcceptChanges();

            //Azure Settings
            emoAdminSetting[adhocAdamAALNClass, "EnableAzureTranslate"].Value = this.IsAzureTranslateEnabled;
            emoAdminSetting[adhocAdamAALNClass, "ACSAPIKey"].Value            = this.AzureCognitiveServicesTranslateAPIKey;

            //Templates
            try { emoAdminSetting[adhocAdamAALNClass, "TroubleTicketAnalystCommentTemplate"].Value = this.TroubleTicketAnalystCommentTemplate.Id; }
            catch { }
            try { emoAdminSetting[adhocAdamAALNClass, "TroubleTicketUserCommentTemplate"].Value = this.TroubleTicketUserCommentTemplate.Id; }
            catch { }
            try { emoAdminSetting[adhocAdamAALNClass, "WorkItemCommentTemplate"].Value = this.WorkItemCommentLogTemplate.Id; }
            catch { }

            //Update the MP
            emoAdminSetting.Commit();
            this.WizardResult = WizardResult.Success;
        }
示例#41
0
        private void ImportExport_Load(object sender, EventArgs e)
        {
            ChangePanel(activePanel);

            if(activePanel == WizardPanel.Select) {
                mode = WizardMode.Export;
                HandleSelect();

                // set the active tab
                switch(exportTab) {
                    case ExporPanelTab.General: {
                        GeneralSelector.Selected = true;
                        GeneralCheckbox.Checked = true;
                        break;
                    }
                    case ExporPanelTab.Methods: {
                        MethodSelector.Selected = true;
                        MethodsCheckbox.Checked = true;
                        break;
                    }
                    case ExporPanelTab.Schedule: {
                        TaskSelector.Selected = true;
                        TasksCheckbox.Checked = true;
                        break;
                    }
                }
            }
            else {
                GeneralSelector.Selected = true;
            }
        }
示例#42
0
        private void NextButton_Click(object sender, EventArgs e)
        {
            if(CanChange() == false) {
                return;
            }

            switch(activePanel) {
                case WizardPanel.Welcome: {
                        if(ExportOptionbox.Checked) {
                            ChangePanel(WizardPanel.Select);
                            NextButton.Text = "Next";
                            mode = WizardMode.Export;
                            HandleSelect();
                        }
                        else {
                            ChangePanel(WizardPanel.Import);
                            NextButton.Text = "Next";
                            mode = WizardMode.Import;
                        }

                        break;
                    }
                case WizardPanel.Select: {
                        if(ExportOptionbox.Checked) {
                            ChangePanel(WizardPanel.Export);
                            NextButton.Text = "Start";
                        }
                        else {
                            ChangePanel(WizardPanel.Action);
                            HandleAction();
                        }

                        break;
                    }
                case WizardPanel.Import: {
                        ChangePanel(WizardPanel.Select);
                        NextButton.Text = "Start";
                        HandleSelect();
                        break;
                    }
                case WizardPanel.Export: {
                        ChangePanel(WizardPanel.Action);
                        HandleAction();
                        break;
                    }
            }
        }
 public override void AcceptChanges(WizardMode wizardMode)
 {
     if (wizardMode == WizardMode.PropertySheet)
     {
         this.UpdateConnectorInstance();
     }
     else
     {
         try
         {
             this.CreateConnectorInstance();
             this.WizardResult = WizardResult.Success;
         }
         catch (Exception ex)
         {
             this.WizardResult = WizardResult.Failed;
             this.ErrorMessage = ex.ToString();
         }
     }
 }
示例#44
0
 private void Start()
 {
     wizard = FindObjects.GameLogic.GetComponent <WizardMode>();
 }