CView.CtrlStruct fireCtrl_str; // Controls struct who fire the event #endregion #region initialize /// <summary> /// Load all information from UI to work with /// </summary> /// <param name="viewManager"></param> /// <param name="eventDesc"></param> public CLogic(CSystem csystem, CViewsManager views_manager, CEventDesc eventDesc) { sys = csystem; vm = views_manager; Globals = sys.Globals; errors = sys.ProgramErrors; debug = sys.ProgramDebug; event_desc = eventDesc; if (event_desc != null) { view = (event_desc.View_Guid != "") ? vm.getFirstView_byGuid(event_desc.View_Guid) : null; if (view != null) { mainCtrl = view.mainControl(); fireCtrl_str = view.getCtrlStruct(eventDesc.Control_Name); } fireCtrl = (Control)event_desc.fireCtrl; args = event_desc.args; } MainView = ((view != null) && (Globals.get_str(dGLOBALS.MAIN_VIEW) == view.Name)) ? view : vm.getFirstView(Globals.get_str(dGLOBALS.MAIN_VIEW)); }