public ShiftsInfoInput(AbstractShiftInformationControler controller) { InitializeComponent(); InitializeFormControls(); if (controller != null) { InitController(controller); } else { this.ShowErrorMessage("頁面初始化異常,請聯繫管理員檢查。"); } }
/// <summary> /// 初始化控制器 /// </summary> /// <param name="controller"></param> void InitController(AbstractShiftInformationControler controller) { this.m_ShiftInfoController = controller; this.m_ShiftInfoController.InitializeEvent += new EventHandler(m_ShiftInfoController_InitializeEvent); this.m_ShiftInfoController.BaseDataChangeEvent += new EventHandler(m_ShiftInfoController_BaseDataChangeEvent); this.m_ShiftInfoController.ProductionDataUpdateEvent += new EventHandler(m_ShiftInfoController_ProductionDataUpdateEvent); this.m_ShiftInfoController.ResetEvent += new EventHandler(m_ShiftInfoController_ResetEvent); this._shiftStaffWorkInfoControl = new ShiftStaffWorkInformation(ScreenSizeFactory.ScreenSize); this.m_frmShiftsInfoInputBase.PanelStaffWorkTimeEdit.Controls.Add(this._shiftStaffWorkInfoControl); }