Пример #1
0
        /// <summary>
        /// Launchs a navigation in an scenario.
        /// </summary>
        /// <param name="navigationInfo">Navigation information.</param>
        public static void LaunchNavigationScenario(ExchangeInfoNavigation navigationInfo, INavigationItemSuscriber navigationItem)
        {
            // Instance Scenario, initialize and return the controller instance inside the Scenario.
            Form         lScenario   = CreateScenarioInstance(navigationInfo);
            IUController lController = Initialize(lScenario, navigationInfo);

            if (lController != null)
            {
                if (navigationItem != null)
                {
                    IUMasterDetailController lMasterDetailController = lController as IUMasterDetailController;
                    if (lMasterDetailController != null)
                    {
                        navigationItem.SuscribeNavigationEvents(lMasterDetailController.Master as INavigationItemEvents);
                    }
                    else
                    {
                        navigationItem.SuscribeNavigationEvents(lController as INavigationItemEvents);
                    }
                }
            }

            if (lScenario != null)
            {
                lScenario.MdiParent = MainForm;
                LaunchShowState     = ShowState.Showing;
                lScenario.Show();
                LaunchShowState = ShowState.Showed;
            }
        }
Пример #2
0
        /// <summary>
        /// Creates the specific IUMasterDetailController of the 'MDIU_PasajeroAeronave' IU pattern.
        /// </summary>
        /// <param name="exchangeInfo">Exchange information received.</param>
        /// <returns>Specific IUMasterDetailController of the 'MDIU_PasajeroAeronave' IU pattern.</returns>
        public static IUMasterDetailController MasterDetail_MDIU_PasajeroAeronave(ExchangeInfo exchangeInfo)
        {
            IUMasterDetailContext    lContext    = new IUMasterDetailContext("PasajeroAeronave", "MDIU_PasajeroAeronave");
            IUMasterDetailController lController = new IUMasterDetailController("MDIU_PasajeroAeronave", "PasajeroAeronave", "Clas_1348178542592177UIMaDet_1_Alias", lContext, null);

            // Master interaction unit.
            lController.Master = Instance_IIU_PasajeroAeronave(exchangeInfo);

            // Detail interaction units.
            ExchangeInfoNavigation infoDetail0 = new ExchangeInfoNavigation("Pasajero", "", "PasajeroAeronave", "", null, null, "");

            lController.AddDetail(Pasajero.Population_PIU_Pasajero(infoDetail0), "Pasajero", "Clas_1348178542592177UIMaDet_1Det_2_Alias");

            return(lController);
        }
Пример #3
0
        /// <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);
        }