public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = ((AddAgentWizard)WizardEventArgs.Wizard); AgentDriverConfigPage p = new AgentDriverConfigPage(mWizard.Agent); xDriverConfigFrame.SetContent(p); break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { mWizard = (AddAgentWizard)WizardEventArgs.Wizard; switch (WizardEventArgs.EventType) { case EventType.Init: xAgentNameTextBox.BindControl(mWizard.Agent, nameof(Agent.Name)); xAgentNameTextBox.AddValidationRule(new AgentNameValidationRule()); xAgentNameTextBox.Focus(); xAgentDescriptionTextBox.BindControl(mWizard.Agent, nameof(Agent.Notes)); xAgentTagsViewer.Init(mWizard.Agent.Tags); //Removing ASCF from platform combobox List <dynamic> platformesToExclude = new List <dynamic>(); platformesToExclude.Add(GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib.ePlatformType.ASCF); //GingerCore.General.FillComboFromEnumObj(xPlatformTypeComboBox, mWizard.Agent.Platform, excludeList:platformesToExclude);//All //Only platforms used in Solution (having Target Application for) List <object> onlySolutionPlatforms = WorkSpace.Instance.Solution.ApplicationPlatforms.Select(x => x.Platform).Distinct().ToList().Cast <object>().ToList(); GingerCore.General.FillComboFromEnumObj(xPlatformTypeComboBox, mWizard.Agent.Platform, values: onlySolutionPlatforms, excludeList: platformesToExclude); xPlatformTypeComboBox.SelectionChanged += xPlatformTypeComboBox_SelectionChanged; ////set Web as default //foreach(object platform in xPlatformTypeComboBox.Items) //{ // if(platform.ToString() == GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib.ePlatformType.Web.ToString()) // { // xPlatformTypeComboBox.SelectedItem = platform; // break; // } //} xPlatformTypeComboBox.SelectedIndex = 0; xDriverTypeComboBox.BindControl(mWizard.Agent.AgentOperations, nameof(AgentOperations.DriverInfo)); xDriverTypeComboBox.SelectionChanged += xDriverTypeComboBox_SelectionChanged; if (xDriverTypeComboBox.Items.Count > 0) { xDriverTypeComboBox.SelectedItem = xDriverTypeComboBox.Items[0]; } xDriverTypeComboBox.AddValidationRule(eValidationRule.CannotBeEmpty); xDriverTypeComboBox.Visibility = Visibility.Visible; break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { mWizard = (AddAgentWizard)WizardEventArgs.Wizard; switch (WizardEventArgs.EventType) { case EventType.Init: xAgentNameTextBox.BindControl(mWizard.Agent, nameof(Agent.Name)); xAgentNameTextBox.AddValidationRule(new AgentNameValidationRule()); xAgentNameTextBox.Focus(); xAgentDescriptionTextBox.BindControl(mWizard.Agent, nameof(Agent.Notes)); xAgentTagsViewer.Init(mWizard.Agent.Tags); //Removing ASCF from platform combobox List <GingerCore.General.ComboEnumItem> platformList = (GingerCore.General.GetEnumValuesForCombo(typeof(GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib.ePlatformType))).Where(x => ((GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib.ePlatformType)x.Value) != GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib.ePlatformType.ASCF).ToList(); xPlatformTypeComboBox.BindControl(platformList); xPlatformTypeComboBox.SelectionChanged += xPlatformTypeComboBox_SelectionChanged; xPlatformTypeComboBox.SelectedIndex = 0; xDriverTypeComboBox.BindControl(mWizard.Agent, nameof(Agent.DriverType)); xDriverTypeComboBox.SelectionChanged += xDriverTypeComboBox_SelectionChanged; xDriverTypeComboBox.AddValidationRule(eValidationRule.CannotBeEmpty); xDriverTypeStackPanel.Visibility = Visibility.Collapsed; if (mWizard.Agent.AgentType == Agent.eAgentType.Service) { xPluginRadioButton.IsChecked = true; } else { xDriverRadioButton.IsChecked = true; } break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { mWizard = (AddAgentWizard)WizardEventArgs.Wizard; switch (WizardEventArgs.EventType) { case EventType.Init: xAgentNameTextBox.BindControl(mWizard.Agent, nameof(Agent.Name)); xAgentNameTextBox.AddValidationRule(new AgentNameValidationRule()); xAgentNameTextBox.Focus(); xAgentDescriptionTextBox.BindControl(mWizard.Agent, nameof(Agent.Notes)); xAgentTagsViewer.Init(mWizard.Agent.Tags); //Removing ASCF from platform combobox List <ComboEnumItem> platformList = (GingerCore.General.GetEnumValuesForCombo(typeof(GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib.ePlatformType))).Where(x => ((GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib.ePlatformType)x.Value) != GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib.ePlatformType.ASCF).ToList(); xPlatformTypeComboBox.BindControl(platformList); xPlatformTypeComboBox.SelectionChanged += xPlatformTypeComboBox_SelectionChanged; xPlatformTypeComboBox.SelectedIndex = 0; xDriverTypeComboBox.BindControl(mWizard.Agent, nameof(Agent.DriverInfo)); xDriverTypeComboBox.SelectionChanged += xDriverTypeComboBox_SelectionChanged; if (xDriverTypeComboBox.Items.Count > 0) { xDriverTypeComboBox.SelectedItem = xDriverTypeComboBox.Items[0]; } xDriverTypeComboBox.AddValidationRule(eValidationRule.CannotBeEmpty); xDriverTypeComboBox.Visibility = Visibility.Visible; break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { mWizard = (AddAgentWizard)WizardEventArgs.Wizard; switch (WizardEventArgs.EventType) { case EventType.Init: xAgentNameTextBox.BindControl(mWizard.Agent, nameof(Agent.Name)); xAgentNameTextBox.AddValidationRule(new AgentNameValidationRule()); xAgentNameTextBox.Focus(); xAgentDescriptionTextBox.BindControl(mWizard.Agent, nameof(Agent.Notes)); xAgentTagsViewer.Init(mWizard.Agent.Tags); xPlatformTypeComboBox.SelectionChanged += xPlatformTypeComboBox_SelectionChanged; App.FillComboFromEnumVal(xPlatformTypeComboBox, mWizard.Agent.Platform); xPlatformTypeComboBox.SelectedIndex = 0; xDriverTypeComboBox.BindControl(mWizard.Agent, nameof(Agent.DriverType)); xDriverTypeComboBox.SelectionChanged += xDriverTypeComboBox_SelectionChanged; xDriverTypeComboBox.AddValidationRule(eValidationRule.CannotBeEmpty); xDriverTypeStackPanel.Visibility = Visibility.Collapsed; break; } }