/// <summary> /// Assigns the specific population controller properties /// </summary> private void SetInfoToPopulationController() { IUPopulationController popController = mQueryController as IUPopulationController; if (popController == null) { return; } popController.Context.BlockSize = int.Parse(textBox_BlockSize.Text); }
/// <summary> /// Initializes the 'PIU_PasajeroAeronaveIT' instance form /// </summary> /// <param name="exchangeInfo">Exchange information.</param> /// <returns>IUPopulationController</returns> public IUPopulationController Initialize(ExchangeInfo exchangeInfo) { // Controller factory. Controller = ControllerFactory.PasajeroAeronave.Population_PIU_PasajeroAeronave(exchangeInfo); Controller.Scenario = new ScenarioPresentation(this, ScenarioType.Population); #region Population PIU_PasajeroAeronave Links // Displayset Controller.DisplaySet.Population = new DataGridViewPresentation(this.gPopulation, this.toolStripExportExcel, this.toolStripExportWord, this.toolStripRetrieveAll, this.toolStripRefresh, this.toolStripHelp, this.optionsToolStripMenuItem, this.mnuNavigations, exchangeInfo); Controller.DisplaySet.NumberOfInstances = new ToolStripStatusLabelNumberInstancesPresentation(this.toolStripStatusLabelCount); Controller.DisplaySet.First = null; Controller.DisplaySet.Previous = null; Controller.DisplaySet.Refresh = null; Controller.DisplaySet.Next = null; Controller.DisplaySet.ExecuteServiceTrigger = new ToolStripDropDownButtonPresentation(this.toolStripDropDownButtonSave); Controller.DisplaySet.PreferencesTrigger = new ToolStripMenuItemPresentation(this.toolStripPreferences); Controller.DisplaySet.SaveColumnsWidthTrigger = new ToolStripMenuItemPresentation(this.toolStripSaveColumnWidth); // Order Criteria // Actions Controller.Action.ActionItems[0].Trigger = new ToolStripButtonPresentation(this.toolstripActions_0, this.mnuActions_0); Controller.Action.ActionItems[1].Trigger = new ToolStripButtonPresentation(this.toolstripActions_1, this.mnuActions_1); Controller.Action.ActionItems[2].Trigger = new ToolStripButtonPresentation(this.toolstripActions_2, this.mnuActions_2); Controller.Action.ActionItems[3].Trigger = new ToolStripButtonPresentation(this.toolstripActions_3, this.mnuActions_3); Controller.Action.ActionItems[4].Trigger = new ToolStripButtonPresentation(this.toolstripActions_4, this.mnuActions_4); Controller.Action.ActionItems[5].Trigger = new ToolStripButtonPresentation(this.toolStripPrint, this.mnuPrint); // Navigations Controller.Navigation.NavigationItems[0].Trigger = new ToolStripButtonPresentation(this.toolstripNavigations_0, this.mnuNavigations_0); Controller.Navigation.NavigationItems[1].Trigger = new ToolStripButtonPresentation(this.toolstripNavigations_1, this.mnuNavigations_1); Controller.Navigation.NavigationItems[2].Trigger = new ToolStripButtonPresentation(this.toolstripNavigations_2, this.mnuNavigations_2); // Contextual Menu this.gPopulation.ContextMenuStrip = this.contextMenuStrip; #endregion Population PIU_PasajeroAeronave Links // Save position trigger Controller.SavePositionTrigger = new ToolStripMenuItemPresentation(this.toolStripSavePositions); // Ok. Controller.OkTrigger = new ButtonPresentation(this.bOk); // Cancel. Controller.CancelTrigger = new ButtonPresentation(this.bCancel); // Initialize controller. Controller.Initialize(); return(Controller); }
/// <summary> /// Load the specific information of one population scenario /// </summary> private void LoadPopulationInfo() { IUPopulationController popController = mQueryController as IUPopulationController; // If it is not a Population Controller if (popController == null) { textBox_BlockSize.Enabled = false; return; } textBox_BlockSize.Enabled = true; textBox_BlockSize.Text = popController.Context.BlockSize.ToString(); }
/// <summary> /// Save the Scenario info in the Preferences Server /// </summary> private void SaveScenarioInfo() { IUPopulationController popController = mQueryController as IUPopulationController; if (popController != null) { Logics.Logic.UserPreferences.SavePopulationInfo(popController.Context.ClassName + ":" + popController.Name, int.Parse(textBox_BlockSize.Text), popController.DisplaySet.CurrentDisplaySet.Name, popController.DisplaySet.DisplaySetList); return; } IUInstanceController insController = mQueryController as IUInstanceController; if (insController != null) { Logics.Logic.UserPreferences.SaveInstanceInfo(insController.Context.ClassName + ":" + insController.Name, insController.DisplaySet.CurrentDisplaySet.Name, insController.DisplaySet.DisplaySetList); } }
/// <summary> /// Creates the specific IUPopulationController of the 'PIU_NaveNodriza' IU pattern. /// </summary> /// <param name="exchangeInfo">IUPopulationContext reference.</param> /// <returns>Specific IUPopulationController of the 'PIU_NaveNodriza' IU pattern.</returns> public static IUPopulationController Population_PIU_NaveNodriza(ExchangeInfo exchangeInfo) { IUPopulationContext lContext = new IUPopulationContext(exchangeInfo, "NaveNodriza", "PIU_NaveNodriza"); // Block size. lContext.BlockSize = 40; IUPopulationController lController = new IUPopulationController("PIU_NaveNodriza", "PIU_NaveNodriza", "Clas_1347649273856884UIPobCl_1_Alias", lContext, null); // Action _Auto_. lController.Action = NaveNodriza.Action__Auto_(lController); // DisplaySet '_Auto_'. DisplaySetByBlocksController lDisplaySetByBlocksController = new DisplaySetByBlocksController(NaveNodriza.DisplaySet__Auto_(lController)); lController.DisplaySet = lDisplaySetByBlocksController; // Get user preferences for this scenario. lController.SetPreferences(Logic.UserPreferences.GetScenarioPrefs("NaveNodriza:PIU_NaveNodriza") as PopulationPrefs); return(lController); }
/// <summary> /// Creates the specific IUPopulationController of the 'PIU_Aeronave' IU pattern. /// </summary> /// <param name="exchangeInfo">IUPopulationContext reference.</param> /// <returns>Specific IUPopulationController of the 'PIU_Aeronave' IU pattern.</returns> public static IUPopulationController Population_PIU_Aeronave(ExchangeInfo exchangeInfo) { IUPopulationContext lContext = new IUPopulationContext(exchangeInfo, "Aeronave", "PIU_Aeronave"); // Block size. lContext.BlockSize = 40; IUPopulationController lController = new IUPopulationController("PIU_Aeronave", "Aeronave", "Clas_1348178411520734UIPobCl_1_Alias", lContext, null); // Action _Auto_. lController.Action = Aeronave.Action__Auto_(lController); // Navigation _Auto_. lController.Navigation = Aeronave.Navigation__Auto_(lController); // DisplaySet '_Auto_'. DisplaySetByBlocksController lDisplaySetByBlocksController = new DisplaySetByBlocksController(Aeronave.DisplaySet__Auto_(lController)); lController.DisplaySet = lDisplaySetByBlocksController; // Get user preferences for this scenario. lController.SetPreferences(Logic.UserPreferences.GetScenarioPrefs("Aeronave:PIU_Aeronave") as PopulationPrefs); return(lController); }
/// <summary> /// Creates the specific IUPopulationController of the '_Auto_' IU pattern. /// </summary> /// <param name="exchangeInfo">IUPopulationContext reference.</param> /// <returns>Specific IUPopulationController of the '_Auto_' IU pattern.</returns> public static IUPopulationController Population__Auto_(ExchangeInfo exchangeInfo) { IUPopulationContext lContext = new IUPopulationContext(exchangeInfo, "Revision", "_Auto_"); // Block size. lContext.BlockSize = 40; IUPopulationController lController = new IUPopulationController("_Auto_", "Revision", "Clas_1348178542592347UIPobCl_Auto_Alias", lContext, null); // Action _Auto_. lController.Action = Revision.Action__Auto_(lController); // Navigation _Auto_. lController.Navigation = Revision.Navigation__Auto_(lController); // DisplaySet '_Auto_'. DisplaySetByBlocksController lDisplaySetByBlocksController = new DisplaySetByBlocksController(Revision.DisplaySet__Auto_(lController)); lDisplaySetByBlocksController.DisplaySetList.Add(Revision.DisplaySet__Auto_(lController).CurrentDisplaySet); lController.DisplaySet = lDisplaySetByBlocksController; // Get user preferences for this scenario. lController.SetPreferences(Logic.UserPreferences.GetScenarioPrefs("Revision:_Auto_") as PopulationPrefs); return(lController); }
/// <summary> /// Initializes the 'MDIU_PasajeroAeronaveIT' instance form. /// </summary> /// <param name="exchangeInfo">Exchange information</param> /// <returns>IUMasterDetailController</returns> public IUMasterDetailController Initialize(ExchangeInfo exchangeInfo) { Controller = ControllerFactory.PasajeroAeronave.MasterDetail_MDIU_PasajeroAeronave(exchangeInfo); Controller.Scenario = new ScenarioPresentation(this, ScenarioType.MasterDetail); #region Master-Detail MDIU_PasajeroAeronave Links IUInstanceController ControllerMaster = Controller.Master as IUInstanceController; #region Instance IIU_PasajeroAeronave Links // DisplaySet ControllerMaster.DisplaySet.Viewer = new ListViewPresentation(lstViewDisplaySetMaster, MastertoolStripExportExcel, MastertoolStripExportWord, MastertoolStripRefresh, MastertoolStripHelp, MasteroptionsToolStripMenuItem, mnuNavigationsMaster); // OID Selector ControllerMaster.OidSelector.Label = new LabelPresentation(this.lOIDSelectorMaster); ControllerMaster.OidSelector.Editors[0] = new MaskedTextBoxPresentation(this.maskedTextBoxMasterid_PasajeroAeronave1); ControllerMaster.OidSelector.Trigger = new ButtonPresentation(this.bOIDSelectorMaster); if (ControllerMaster.OidSelector.SupplementaryInfo != null) { ControllerMaster.OidSelector.SupplementaryInfo.Viewer = new LabelDisplaySetPresentation(this.lSIOIDSelectorMaster); } // Actions ControllerMaster.Action.ActionItems[0].Trigger = new ToolStripButtonPresentation(this.toolstripActionsMaster_0, this.mnuActionsMaster_0); ControllerMaster.Action.ActionItems[1].Trigger = new ToolStripButtonPresentation(this.toolstripActionsMaster_1, this.mnuActionsMaster_1); ControllerMaster.Action.ActionItems[2].Trigger = new ToolStripButtonPresentation(this.toolstripActionsMaster_2, this.mnuActionsMaster_2); ControllerMaster.Action.ActionItems[3].Trigger = new ToolStripButtonPresentation(this.toolstripActionsMaster_3, this.mnuActionsMaster_3); ControllerMaster.Action.ActionItems[4].Trigger = new ToolStripButtonPresentation(this.toolstripActionsMaster_4, this.mnuActionsMaster_4); ControllerMaster.Action.ActionItems[5].Trigger = new ToolStripButtonPresentation(this.toolStripPrintMaster, this.mnuPrintMaster); // Navigations ControllerMaster.Navigation.NavigationItems[0].Trigger = new ToolStripButtonPresentation(this.toolstripNavigationsMaster_0, this.mnuNavigationsMaster_0); ControllerMaster.Navigation.NavigationItems[1].Trigger = new ToolStripButtonPresentation(this.toolstripNavigationsMaster_1, this.mnuNavigationsMaster_1); ControllerMaster.Navigation.NavigationItems[2].Trigger = new ToolStripButtonPresentation(this.toolstripNavigationsMaster_2, this.mnuNavigationsMaster_2); this.pnlDisplaySetMaster.ContextMenuStrip = MastercontextMenuStrip; ControllerMaster.DisplaySet.PreferencesTrigger = new ToolStripMenuItemPresentation(this.MastertoolStripPreferences); #endregion Instance IIU_PasajeroAeronave Links // Save position Controller.SavePositionTrigger = new ToolStripMenuItemPresentation(MastertoolStripSavePositions); IUPopulationController ControllerDetail0 = Controller.Details[0] as IUPopulationController; #region Population PIU_Pasajero Links // Displayset ControllerDetail0.DisplaySet.Population = new DataGridViewPresentation(this.gPopulationDetail0, this.Detail0toolStripExportExcel, this.Detail0toolStripExportWord, this.Detail0toolStripRetrieveAll, this.Detail0toolStripRefresh, this.Detail0toolStripHelp, this.Detail0optionsToolStripMenuItem, this.mnuNavigationsDetail0, exchangeInfo); ControllerDetail0.DisplaySet.NumberOfInstances = new ToolStripStatusLabelNumberInstancesPresentation(this.toolStripStatusLabelCountDetail0); ControllerDetail0.DisplaySet.First = null; ControllerDetail0.DisplaySet.Previous = null; ControllerDetail0.DisplaySet.Refresh = null; ControllerDetail0.DisplaySet.Next = null; ControllerDetail0.DisplaySet.ExecuteServiceTrigger = new ToolStripDropDownButtonPresentation(this.toolStripDropDownButtonSaveDetail0); ControllerDetail0.DisplaySet.PreferencesTrigger = new ToolStripMenuItemPresentation(this.Detail0toolStripPreferences); ControllerDetail0.DisplaySet.SaveColumnsWidthTrigger = new ToolStripMenuItemPresentation(this.Detail0toolStripSaveColumnWidth); // Order Criteria // Actions ControllerDetail0.Action.ActionItems[0].Trigger = new ToolStripButtonPresentation(this.toolstripActionsDetail0_0, this.mnuActionsDetail0_0); ControllerDetail0.Action.ActionItems[1].Trigger = new ToolStripButtonPresentation(this.toolstripActionsDetail0_1, this.mnuActionsDetail0_1); ControllerDetail0.Action.ActionItems[2].Trigger = new ToolStripButtonPresentation(this.toolstripActionsDetail0_2, this.mnuActionsDetail0_2); ControllerDetail0.Action.ActionItems[3].Trigger = new ToolStripButtonPresentation(this.toolstripActionsDetail0_3, this.mnuActionsDetail0_3); ControllerDetail0.Action.ActionItems[4].Trigger = new ToolStripButtonPresentation(this.toolStripPrintDetail0, this.mnuPrintDetail0); // Navigations ControllerDetail0.Navigation.NavigationItems[0].Trigger = new ToolStripButtonPresentation(this.toolstripNavigationsDetail0_0, this.mnuNavigationsDetail0_0); // Contextual Menu this.gPopulationDetail0.ContextMenuStrip = this.Detail0contextMenuStrip; #endregion Population PIU_Pasajero Links #endregion Master-Detail MDIU_PasajeroAeronave Links // Close button Controller.CancelTrigger = new ButtonPresentation(this.bCancel); // Initialize scenario Controller.Initialize(); return(Controller); }