public ReserveSectionInfoForm(OHxCMainForm _mainForm)
 {
     try
     {
         InitializeComponent();
         mainForm = _mainForm;
         uctlReserveSectionView1.Start(mainForm.app);
     }
     catch (Exception ex)
     {
     }
 }
 /// <summary>
 /// 建構子
 /// </summary>
 /// <param name="_mainForm"></param>
 public frm_Maintenance(OHxCMainForm _mainForm)
 {
     try
     {
         InitializeComponent();
         mainForm = _mainForm;
         uc_SP_MTLMTSMaintenance1.CloseFormEvent += uc_SP_MTLMTSMaintenance_CloseFormEvent;
         btn_Close1.Button_Click += Btn_Close_Button_Click;
     }
     catch (Exception ex)
     {
         logger.Error(ex, "Exception");
     }
 }
Ejemplo n.º 3
0
 public ChangePwdForm(OHxCMainForm _mainForm)
 {
     try
     {
         InitializeComponent();
         mainForm = _mainForm;
         uc_PasswordChange1.CloseFormEvent += Uc_PasswordChange1_CloseFormEvent;
         this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     }
     catch (Exception ex)
     {
         logger.Error(ex, "Exception");
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 建構子
 /// </summary>
 /// <param name="_mainForm"></param>
 public frm_Operation(OHxCMainForm _mainForm)
 {
     try
     {
         InitializeComponent();
         mainForm = _mainForm;
         uc_SP_TransferManagement1.CloseFormEvent += uc_SubPages_CloseFormEvent;
         uc_SP_SystemModeControl1.CloseFormEvent  += uc_SubPages_CloseFormEvent;
         uc_SP_PathControlList1.CloseFormEvent    += uc_SubPages_CloseFormEvent;
     }
     catch (Exception ex)
     {
         logger.Error(ex, "Exception");
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 建構子
 /// </summary>
 /// <param name="_mainForm"></param>
 public frm_Query(OHxCMainForm _mainForm)
 {
     try
     {
         InitializeComponent();
         mainForm = _mainForm;
         uc_SP_MCSCommandLog1.SendCmdIDEvent    += Uc_SP_MCSCommandLog1_SendCmdIDEvent;
         uc_SP_MCSCommandLog1.CloseFormEvent    += uc_SubPages_CloseFormEvent;
         uc_SP_CommunicationLog1.CloseFormEvent += uc_SubPages_CloseFormEvent;
     }
     catch (Exception ex)
     {
         logger.Error(ex, "Exception");
     }
 }
        //BindingSource TransCMD_BindingSource = new BindingSource();
        #endregion 公用參數設定

        /// <summary>
        /// 建構子
        /// </summary>
        /// <param name="_mainForm"></param>
        public OHxC_Form(OHxCMainForm _form)
        {
            try
            {
                InitializeComponent();
                //initFuncKey();
                setFuncKeyClick();
                mainForm = _form;
                app      = mainForm.app;
                uctl_Map.start(app);

                //vehicleObjToShowBindingSource.DataSource = app.ObjCacheManager.GetVehicleObjToShows();
                //uc_grid_VHStatus1.grid_VH_Status.ItemsSource = vehicleObjToShowBindingSource;
                uc_grid_VHStatus1.grid_VH_Status.ItemsSource     = app.ObjCacheManager.GetVehicleObjToShows();
                uc_grid_VHStatus1.grid_VH_Status.PreviewMouseUp += grid_VH_Status_cell_click;

                uctl_Map.BackColor = Color.FromArgb(9, 0, 45);

                mainForm = _form;
                switch (WindownApplication.OHxCFormMode)
                {
                case OHxCFormMode.HistoricalPlayer:
                    //this.splitContainer2.Panel1.Controls.Remove(tableLayoutPanel4);

                    //tableLayoutPanel1.Controls.Remove(tableLayoutPanel4);
                    //uctlHistoricalReplyPlayer = new uctlHistoricalReplyPlayer();
                    //uctlHistoricalReplyPlayer.Dock = DockStyle.Fill;

                    //this.splitContainer2.Panel1.Controls.Add(uctlHistoricalReplyPlayer);
                    //tableLayoutPanel1.Controls.Add(uctlHistoricalReplyPlayer, 0, 0);
                    //uctlHistoricalReplyPlayer.Start();
                    //uctlHistoricalReplyPlayer.FocusVehicle += uctl_Map.FocusVehicleProcess;
                    uctlHistoricalReplyPlayer1.Start();
                    uctlHistoricalReplyPlayer1.FocusVehicle += uctl_Map.FocusVehicleProcess;
                    uctlHistoricalReplyPlayer1.Visible       = true;
                    //tableLayoutPanel1.
                    //tabControl1.TabPages.RemoveAt(1);
                    break;
                }

                foreach (var vh in uctl_Map.m_objItemNewVhcl)
                {
                    vh.VehicleBeChosen += setMonitorVehicle;
                }
                uctl_Map.MapDoubleClick += setMonitorVehicle;
                //TransCMD_BindingSource.DataSource = app.ObjCacheManager.GetMCS_CMD();
                //uc_grid_TransCMD1.grid_MCS_Command.ItemsSource = TransCMD_BindingSource;
                uc_grid_TransCMD1.grid_MCS_Command.ItemsSource = app.ObjCacheManager.GetMCS_CMD();
                uc_grid_CurAlarm1.grid_Cur_Alarm.ItemsSource   = app.ObjCacheManager.GetAlarms();
                uc_grid_SystemLog1.grid_Sys_Log.ItemsSource    = systemProcLst;

                app.ObjCacheManager.VehicleUpdateComplete    += ObjCacheManager_VehicleUpdateComplete;
                app.ObjCacheManager.MCSCommandUpdateComplete += ObjCacheManager_MCSCMDUpdateComplete;
                app.CurrentAlarmChange += ObjCacheManagerCurAlarmUpdateComplete;

                mainForm.MonitorRoadContorlStatusChanged += MainForm_MonitorRoadContorlStatusChanged;

                splitContainer2.SplitterDistance = 195;
                uctl_Map.Width  = 1719;
                uctl_Map.Height = 695;
                logUtility      = LogUtility.getInstance();

                utilityLog_tcp.start <LogTitle_TCP>(BCAppConstants.LogType.TCP_ForEQ.ToString());
                utilityLog_secs.start <LogTitle_SECS>(BCAppConstants.LogType.SECS_ForHost.ToString());
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Exception");
            }
        }