예제 #1
0
 /// <summary>
 /// 维保管理
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TsbCIMCWorker_Click(object sender, EventArgs e)
 {
     if (null == m_formCIMCWorker)
     {
         m_formCIMCWorker = new CFormCIMCWorker();
     }
     m_formCIMCWorker.ShowDialog();
 }
예제 #2
0
        /// <summary>
        /// 初始化主界面各信息
        /// </summary>
        private void InitializeInfo()
        {
            int    nSum             = 0;
            int    nOccupy          = 0;
            int    nSpace           = 0;
            int    nMaxSpace        = 0;
            string strSumDescp      = "(";
            string strOccupyDescp   = "(";
            string strSpaceDescp    = "(";
            string strMaxSpaceDescp = "(";
            int    i = 1;

            if (null == m_formCIMCWorker)
            {
                m_formCIMCWorker = new CFormCIMCWorker();
            }

            foreach (Panel tabPage in m_ltpWareHouse)
            {
                CWareHousePanel wareHouseTabPage = (CWareHousePanel)tabPage;
                wareHouseTabPage.UpdateCarLocationStatus();
                wareHouseTabPage.UpdateDeviceStatus();
                // 初始化车厅流程图
                List <CDeviceStatusDto> lstDeviceStatus = wareHouseTabPage.UpdateDeviceFault();
                foreach (CDeviceStatusDto deviceStatus in lstDeviceStatus)
                {
                    m_formCIMCWorker.UpdateFlowChart(CStaticClass.ConvertDeviceStatus(deviceStatus));
                }

                nSum      += wareHouseTabPage.RectVehCount.X;
                nOccupy   += wareHouseTabPage.RectVehCount.Y;
                nSpace    += wareHouseTabPage.RectVehCount.Width;
                nMaxSpace += wareHouseTabPage.RectVehCount.Height;

                string strFlag = ";";
                if (i++ == m_ltpWareHouse.Count)
                {
                    strFlag = ")";
                }
                strSumDescp      += wareHouseTabPage.Text + ":" + wareHouseTabPage.RectVehCount.X + strFlag;
                strOccupyDescp   += wareHouseTabPage.Text + ":" + wareHouseTabPage.RectVehCount.Y + strFlag;
                strSpaceDescp    += wareHouseTabPage.Text + ":" + wareHouseTabPage.RectVehCount.Width + strFlag;
                strMaxSpaceDescp += wareHouseTabPage.Text + ":" + wareHouseTabPage.RectVehCount.Height + strFlag;
            }

            if (2 > m_ltpWareHouse.Count)
            {// 只有一个库时
                strSumDescp      = string.Empty;
                strOccupyDescp   = string.Empty;
                strSpaceDescp    = string.Empty;
                strMaxSpaceDescp = string.Empty;
            }
            //this.TsslSumTxt.Text = nSum.ToString() + strSumDescp;
            //this.TsslOccupyTxt.Text = nOccupy.ToString() + strOccupyDescp;
            //this.TsslSpaceTxt.Text = nSpace.ToString() + strSpaceDescp;
            //this.TsslSpaceMaxTxt.Text = nMaxSpace.ToString() + strMaxSpaceDescp;
            SetStatusStripValue();
        }
예제 #3
0
        /// <summary>
        ///WCF回调子函数
        /// </summary>
        /// <param name="e"></param>
        private void CallBackSubFunction(object e)
        {
            if (e.GetType() == typeof(CarLocationPanelLib.PushService.CCarLocationDto))
            {// 更新当前某一车位状态
                CarLocationPanelLib.PushService.CCarLocationDto carLocation = (CarLocationPanelLib.PushService.CCarLocationDto)e;
                string          strName          = carLocation.warehouse.ToString();
                CWareHousePanel wareHouseTabPage = (CWareHousePanel)m_ltpWareHouse.Find(a => a.Name == strName);
                wareHouseTabPage.UpdateCarLocationStatus(carLocation);
                SetStatusStripValue();
                //CLOGException.Trace("CallBackSubFunction, carLocation.carlocaddr:" + carLocation.carlocaddr);
                //SetStatusStripValue(e);
            }
            else if (e.GetType() == typeof(CarLocationPanelLib.PushService.CDeviceStatusDto))
            {// 更新当前某一设备状态
                CarLocationPanelLib.PushService.CDeviceStatusDto deviceStatus = (CarLocationPanelLib.PushService.CDeviceStatusDto)e;
                CLOGException.Trace(0, "callback_CallbackEvent, e:", string.Format("deviceStatus.warehouse-{0} deviceStatus.devicecode-{1}", deviceStatus.warehouse, deviceStatus.devicecode));
                if ((int)EnmSMGType.ETV == deviceStatus.devicetype)
                {
                    // 客户端界面ETV位置更新
                    string          strName          = deviceStatus.warehouse.ToString();
                    CWareHousePanel wareHouseTabPage = (CWareHousePanel)m_ltpWareHouse.Find(a => a.Name == strName);
                    wareHouseTabPage.UpdateDeviceStatus(deviceStatus);
                    if (m_formETV.Visible && null != m_formETV.EquipDeviceStatus &&
                        m_formETV.EquipDeviceStatus.warehouse == deviceStatus.warehouse &&
                        m_formETV.EquipDeviceStatus.devicecode == deviceStatus.devicecode)
                    {// 更新ETV设备信息界面
                        m_formETV.FillFormEquip(CStaticClass.ConvertDeviceStatus(deviceStatus));
                    }
                }
                else if (m_formHall.Visible && null != m_formHall.EquipDeviceStatus &&
                         m_formHall.EquipDeviceStatus.warehouse == deviceStatus.warehouse &&
                         m_formHall.EquipDeviceStatus.devicecode == deviceStatus.devicecode)
                {// 更新车厅设备信息界面
                    m_formHall.FillFormHall(CStaticClass.ConvertDeviceStatus(deviceStatus));
                }

                List <object> lstETV = CStaticClass.ConfigLstETVOrTVDeviceID(deviceStatus.warehouse);
                if (null != lstETV && 1 > lstETV.Count)
                {
                    // 无ETV时,客户端界面ETV颜色更新
                    string          strName          = deviceStatus.warehouse.ToString();
                    CWareHousePanel wareHouseTabPage = (CWareHousePanel)m_ltpWareHouse.Find(a => a.Name == strName);
                    wareHouseTabPage.UpdateDeviceStatus(deviceStatus);
                }

                if (null != m_formSystemConfig)
                {
                    m_formSystemConfig.UpdateDeviceIsable(deviceStatus);
                }

                if (null == m_formCIMCWorker)
                {
                    m_formCIMCWorker = new CFormCIMCWorker();
                }

                m_formCIMCWorker.UpdateFlowChart(deviceStatus);
            }
            else if (e.GetType() == typeof(CarLocationPanelLib.PushService.CDeviceFaultDto))
            {// 更新当前某一label设备故障
                CarLocationPanelLib.PushService.CDeviceFaultDto deviceFault = (CarLocationPanelLib.PushService.CDeviceFaultDto)e;

                // 客户端界面设备故障状态更新
                string          strName          = deviceFault.warehouse.ToString();
                CWareHousePanel wareHouseTabPage = (CWareHousePanel)m_ltpWareHouse.Find(a => a.Name == strName);
                string          str = wareHouseTabPage.UpdateDeviceFault(deviceFault);

                if (!this.TsslPLC.Text.Contains(str))
                {// 获取当前故障设备
                    this.TsslPLC.Text += str;
                }

                // 客户端设备故障界面更新
                if (null != m_formDeviceFault)
                {
                    m_formDeviceFault.UpdateDeviceFault(deviceFault);
                }
            }
        }