コード例 #1
0
        /// <summary>
        /// 控件接收焦点
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CCustomTextBox_GotFocus(object sender, EventArgs e)
        {
            try
            {
                this.ForeColor = System.Drawing.Color.Black;
                if (m_strToolTip == this.Text)
                {
                    this.Text = "";
                }

                //if (m_strToolTip == this.Text)
                //{// 将光标定位到文本框的起点
                //    m_isStart = true;
                //    this.SelectionStart = 0;
                //    this.ForeColor = System.Drawing.Color.Gray;
                //}
                //else if (m_isStart)
                //{
                //    m_isStart = false;
                //    this.Text = this.Text.Substring(0, 1);
                //    this.ForeColor = System.Drawing.Color.Black;
                //}
                //else
                //{
                //    this.ForeColor = System.Drawing.Color.Black;
                //}
            }
            catch (Exception exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
        /// <summary>
        /// 登陆界面时-绑定数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void CUserCustomerInfoPanel_Load(object sender, EventArgs e)
        {
            if (!CStaticClass.CheckPushService())
            {// 检查服务
                return;
            }

            QueryServiceClient proxy = new QueryServiceClient();

            try
            {
                // 查询所有车主信息
                List <struCustomerInfo> lstStruCUSTInfo = new List <struCustomerInfo>();
                proxy.QueryCUSTInfo(ref lstStruCUSTInfo);
                // 添加列表信息
                this.DgvCustomer.DataSource = new BindingList <struCustomerInfo>(lstStruCUSTInfo);
            }
            catch (TimeoutException)
            {
                MessageBox.Show("The service operation timed out. ", "超时", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (FaultException exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "SOAP错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (CommunicationException exception)
            {
                MessageBox.Show("There was a communication problem. " + CStaticClass.GetExceptionInfo(exception), "通信错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (Exception exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "应用程序异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            proxy.Close();
        }
コード例 #3
0
        /// <summary>
        /// 查询报文列表处理
        /// </summary>
        /// <param name="proxy"></param>
        private List <CWorkQueueDto> GetFindQueueLst(QueryServiceClient proxy)
        {
            List <CWorkQueueDto> lstWorkQueue = null;

            if (string.IsNullOrEmpty(this.CboWareHouseTask.Text) || string.IsNullOrEmpty(this.CboDeviceCode.Text))
            {// 查询所有队列报文
                lstWorkQueue = proxy.GetSendTelegramQueue();
            }
            else
            {
                int nWareHouse  = CStaticClass.ConvertWareHouse(this.CboWareHouseTask.Text);
                int nDeviceCode = 0;
                if (this.CboDeviceCode.Text.Contains("ETV"))
                {
                    nDeviceCode = CStaticClass.ConvertETVDescp(this.CboDeviceCode.Text);
                }
                else
                {
                    nDeviceCode = CStaticClass.ConvertHallDescp(nWareHouse, this.CboDeviceCode.Text);
                }
                lstWorkQueue = proxy.GetSendTelegramQueueByEquipID(nWareHouse, nDeviceCode);
            }

            this.DgvQueue.DataSource = new BindingList <CWorkQueueDto>(lstWorkQueue);
            return(lstWorkQueue);
        }
コード例 #4
0
        /// <summary>
        /// 车主信息修改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnCustomerModify_Click(object sender, EventArgs e)
        {
            try
            {
                if (null == sender)
                {
                    if (null == m_formCustomer)
                    {
                        m_formCustomer = new CFormCustomer();
                    }
                    m_formCustomer.ClearCoutomerControls();
                    m_formCustomer.ShowDialog(this);
                    //formCustomer.Tag = this.CucipCustomer;
                    //formCustomer.ShowDialog(this);
                }
                else if (typeof(struCustomerInfo) == sender.GetType())
                {
                    struCustomerInfo Customer = (struCustomerInfo)sender;
                    if (null == m_formCustomer)
                    {
                        m_formCustomer = new CFormCustomer();
                    }

                    //m_formCustomer.Tag = this.CucipCustomer;
                    m_formCustomer.FillCustomerInfo(Customer);
                    m_formCustomer.ShowDialog(this);
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #5
0
 /// <summary>
 /// 挪移指令选择改变事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void RbtnInJog_CheckedChanged(object sender, EventArgs e)
 {
     if (this.RbtnInJog.Checked)
     {
         this.LblSrc.Text             = "源地址";
         this.LblDest.Text            = "目的地址";
         this.CboDeviceID.Visible     = false;
         this.CboHallID.Visible       = false;
         this.CTxtSrcLocAddr.Visible  = true;
         this.CTxtDestLocAddr.Visible = true;
         btnRdICCard.Enabled          = false;
         // 塔库无挪移
         List <object> lstObj = CStaticClass.ConfigLstWareHouseDescp();
         this.CboWareHouse.Items.Clear();
         foreach (object obj in lstObj)
         {
             if (obj.Equals("塔库"))
             {
                 continue;
             }
             this.CboWareHouse.Items.Add(obj);
         }
         this.CboWareHouse.SelectedIndex = 0;
     }
 }
コード例 #6
0
        /// <summary>
        /// 车厅状态故障汇总
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnDeviceFault_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(this.TxtWareHouse.Text) || string.IsNullOrEmpty(this.TxtEquipID.Text))
                {
                    MessageBox.Show("库区,设备为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                int nWareHouse = CStaticClass.ConvertWareHouse(this.TxtWareHouse.Text);
                int nHallID    = CStaticClass.ConvertHallDescp(nWareHouse, this.TxtEquipID.Text);
                m_formDeviceFault.UpdateDeviceFault(nWareHouse, nHallID);
                m_formDeviceFault.ShowDialog();
            }
            catch (TimeoutException)
            {
                MessageBox.Show("The service operation timed out. ", "超时", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (FaultException exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "SOAP错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (CommunicationException exception)
            {
                MessageBox.Show("There was a communication problem. " + CStaticClass.GetExceptionInfo(exception), "通信错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (Exception exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "应用程序异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #7
0
        /// <summary>
        /// 查询条件值改变事件(“所有”条件处理)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CboStatusCondition_SelectedIndexChanged(object sender, EventArgs e)
        {
            int nSelectedIndex = this.CboStatusCondition.SelectedIndex;

            if (nSelectedIndex + 1 == this.CboStatusCondition.Items.Count)
            {
                this.CboStatusContent.Visible = false;
                this.TxtStatusContent.Visible = true;
                this.TxtStatusContent.Text    = "";
                this.TxtStatusContent.Enabled = false;
            }
            else
            {
                switch (nSelectedIndex)
                {
                case 0:    // 库区
                {
                    this.TxtStatusContent.Visible = false;
                    this.CboStatusContent.Visible = true;
                    this.CboStatusContent.Items.Clear();
                    this.CboStatusContent.Items.AddRange(CStaticClass.ConfigLstWareHouseDescp().ToArray());
                    this.CboStatusContent.SelectedIndex = 0;
                    break;
                }

                default:
                {
                    this.CboStatusContent.Visible = false;
                    this.TxtStatusContent.Visible = true;
                    this.TxtStatusContent.Enabled = true;
                    break;
                }
                }
            }
        }
コード例 #8
0
        /// <summary>
        /// 计费类型文本改变触发
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CboFeeTypeTariff_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                EnmFeeType eType = (EnmFeeType)CStaticClass.ConvertFeeType(this.CboFeeTypeTariff.Text);

                if (EnmFeeType.Hour == eType)
                {
                    SetTempHourControl(true);
                }
                else
                {
                    SetTempHourControl(false);
                }
            }
            catch (TimeoutException)
            {
                MessageBox.Show("The service operation timed out. ", "超时", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (FaultException exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "SOAP错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (CommunicationException exception)
            {
                MessageBox.Show("There was a communication problem. " + CStaticClass.GetExceptionInfo(exception), "通信错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (Exception exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "应用程序异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #9
0
        /// <summary>
        /// 获取收费标准实例
        /// </summary>
        /// <returns></returns>
        private CTariffDto GetTariffInfo()
        {
            CTariffDto tariff = new CTariffDto();

            //if (null != this.Tag && typeof(int) == this.Tag.GetType())
            //{
            //    tariff.id = (int)this.Tag;
            //}
            tariff.iccardtype  = (int)CStaticClass.ConvertICCardType(this.CboCardType.Text);
            tariff.feetype     = (int)CStaticClass.ConvertFeeType(this.CboFeeTypeTariff.Text);
            tariff.tariffdescp = this.TxtTariffDescp.Text;
            float fee;

            if (this.TxtFee.Visible)
            {
                float.TryParse(this.TxtFee.Text.Trim(), out fee);
                tariff.fee = fee;// 固定卡总费用
                return(tariff);
            }

            if (CuttpHour.Visible)
            {
                CuttpHour.GetTariffInfo(ref tariff);
            }
            return(tariff);
        }
コード例 #10
0
        /// <summary>
        /// 设置固定卡起始日期和截止日期可见否
        /// </summary>
        /// <param name="flag"></param>
        public void SetFixVisable(bool flag)
        {
            this.LblICCardStart.Visible = flag;
            this.DtpICCardStart.Visible = flag;
            this.LblICCardEnd.Visible   = flag;
            this.DtpICCardEnd.Visible   = flag;

            this.Enabled = flag;
            if (flag)
            {
                this.CboCardType.Enabled      = !flag;
                this.CboFeeTypeTariff.Enabled = !flag;
                this.TxtTariffDescp.Enabled   = !flag;
                this.BtnOK.Enabled            = !flag;
                this.TxtFee.Enabled           = !flag;
                this.DtpICCardStart.Value     = CStaticClass.CurruntDateTime();

                if (string.IsNullOrEmpty(this.CboFeeTypeTariff.Text))
                {
                    this.DtpICCardEnd.Value = CStaticClass.CurruntDateTime();
                }
                else if (this.CboFeeTypeTariff.Text.Contains("月"))
                {
                    this.DtpICCardEnd.Value = CStaticClass.CurruntDateTime().AddMonths(1);
                }
                else if (this.CboFeeTypeTariff.Text.Contains("季"))
                {
                    this.DtpICCardEnd.Value = CStaticClass.CurruntDateTime().AddMonths(3);
                }
                else if (this.CboFeeTypeTariff.Text.Contains("年"))
                {
                    this.DtpICCardEnd.Value = CStaticClass.CurruntDateTime().AddMonths(12);
                }
            }
        }
コード例 #11
0
        /// <summary>
        /// 卡类型文本改变触发
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CboCardType_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                this.CboFeeTypeTariff.Items.Clear();
                EnmICCardType eType = CStaticClass.ConvertICCardType(this.CboCardType.Text);

                if (EnmICCardType.Temp == eType)
                {
                    this.CboFeeTypeTariff.Items.AddRange(new object[] { "小时卡" });
                    SetTempHourControl(true);
                }
                else
                {
                    this.CboFeeTypeTariff.Items.AddRange(new object[] { "月卡", "季卡", "年卡" });
                    SetTempHourControl(false);
                }
            }
            catch (TimeoutException)
            {
                MessageBox.Show("The service operation timed out. ", "超时", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (FaultException exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "SOAP错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (CommunicationException exception)
            {
                MessageBox.Show("There was a communication problem. " + CStaticClass.GetExceptionInfo(exception), "通信错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (Exception exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "应用程序异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #12
0
        /// <summary>
        /// 设置收费标准实例
        /// </summary>
        /// <returns></returns>
        public void SetTariffInfo(CTariffDto tariff)
        {
            try
            {
                this.Tag = 0;
                this.CboCardType.SelectedIndex      = -1;
                this.CboFeeTypeTariff.SelectedIndex = -1;
                this.TxtFee.Text          = "";
                this.DtpICCardStart.Value = CStaticClass.DefDatetime;
                this.DtpICCardEnd.Value   = CStaticClass.DefDatetime;

                if (null == tariff)
                {
                    SetTempHourControl(false);
                    return;
                }

                CuttpHour.SetTariffInfo(tariff);
                this.Tag = tariff.id;
                this.CboCardType.Text      = CStaticClass.ConvertICCardType(tariff.iccardtype);
                this.CboFeeTypeTariff.Text = CStaticClass.ConvertFeeType(tariff.feetype);
                this.TxtFee.Text           = tariff.fee.ToString();
                this.TxtTariffDescp.Text   = tariff.tariffdescp;
            }
            catch (Exception exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #13
0
        /// <summary>
        /// 登陆界面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void CUserTariffPanel_Load(object sender, EventArgs e)
        {
            if (!CStaticClass.CheckPushService())
            {// 检查服务
                return;
            }

            QueryServiceClient proxy = new QueryServiceClient();

            try
            {
                // 查询所有标准收费信息
                List <CTariffDto> lstTariff = proxy.GetTariffList();
                this.CboTariff.Items.Clear();
                // 添加列表信息
                this.CboTariff.Items.AddRange(lstTariff.ToArray());
            }
            catch (TimeoutException)
            {
                MessageBox.Show("The service operation timed out. ", "超时", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (FaultException exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "SOAP错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (CommunicationException exception)
            {
                MessageBox.Show("There was a communication problem. " + CStaticClass.GetExceptionInfo(exception), "通信错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (Exception exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "应用程序异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            proxy.Close();
        }
コード例 #14
0
        /// <summary>
        /// 验收文本是否符合要求
        /// </summary>
        /// <returns>true:符合   false:不符合</returns>
        public bool IsValidatedSuccess()
        {
            try
            {
                if (string.IsNullOrEmpty(m_strRegularExpression) || m_strToolTip == this.Text)
                {
                    return(false);
                }

                Regex regex = new Regex(m_strRegularExpression);

                if (!regex.IsMatch(this.Text))
                {
                    MessageBox.Show("请输入正确的文本", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return(true);
                }

                return(false);
            }
            catch (Exception exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }
        }
コード例 #15
0
 /// <summary>
 /// 查询统计
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TabQueryStatistics_Click(object sender, EventArgs e)
 {
     try
     {
         if (null == m_formFindStatistics)
         {
             m_formFindStatistics = new CFormFindStatistics();
         }
         m_formFindStatistics.ShowDialog();
     }
     catch (TimeoutException)
     {
         MessageBox.Show("The service operation timed out. ", "超时", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (FaultException exception)
     {
         MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "SOAP错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (CommunicationException exception)
     {
         MessageBox.Show("There was a communication problem. " + CStaticClass.GetExceptionInfo(exception), "通信错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (Exception exception)
     {
         MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "应用程序异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #16
0
        /// <summary>
        /// 填充操作员信息
        /// </summary>
        /// <param name="obj"></param>
        public void FillOperatorInfo(COperatorDto operatorDto)
        {
            //this.TxtPassWord.Text = "******";// 2
            this.CTxtCode.Text        = operatorDto.optcode;
            this.CTxtName.Text        = operatorDto.optname;
            this.CTxtPassWord.Text    = operatorDto.optpassword;
            this.CTxtNewPassWord.Text = operatorDto.optpassword;
            this.CTxtPhone.Text       = operatorDto.optphone;
            this.TxtAddr.Text         = operatorDto.optaddr;
            this.CboType.Enabled      = false;
            this.CboType.Text         = CStaticClass.ConvertOperatorType(operatorDto.opttype);

            this.LtbAssignedPermission.Items.Clear();
            this.LtbAssignedPermission.Items.AddRange(CStaticClass.ConvertOptPermission(operatorDto.optpermission));

            if (string.IsNullOrEmpty(this.CTxtCode.Text))
            {
                this.CTxtCode.Enabled  = true;
                this.BtnSave.Enabled   = true;
                this.BtnModify.Enabled = false;
                this.BtnDelete.Enabled = false;
            }
            else
            {
                this.CTxtCode.Enabled  = false;
                this.BtnSave.Enabled   = false;
                this.BtnModify.Enabled = true;
                this.BtnDelete.Enabled = true;
            }
        }
コード例 #17
0
 public CFormMain()
 {
     try
     {
         m_strTitle  = CStaticClass.ConfigMainTitle();
         m_formLogin = new CFormLogin(m_strTitle);
         HandInitalizeComponent();
         this.FormClosing    += new FormClosingEventHandler(CFormMain_FormClosing);
         this.Tag             = false;
         this.timer1.Interval = 1000;//毫秒
         CStaticClass.myCallback.PushCallbackEvent += new Action <object>(callback_CallbackEvent);
         CStaticClass.myPushProxy.Register(Environment.MachineName);
         CStaticClass.myClient.UpdateCarLocCallbackEvent += new Action(UpdateCarLocationStatus);
     }
     catch (TimeoutException)
     {
         MessageBox.Show("The service operation timed out. ", "超时", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Application.Exit();
     }
     catch (FaultException exception)
     {
         MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "SOAP错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Application.Exit();
     }
     catch (CommunicationException exception)
     {
         MessageBox.Show("There was a communication problem. " + CStaticClass.GetExceptionInfo(exception), "通信错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Application.Exit();
     }
     catch (Exception exception)
     {
         MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "应用程序异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Application.Exit();
     }
 }
コード例 #18
0
        /// <summary>
        /// 车厅库区改变值时触发
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CboHallWareHouse_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (!CStaticClass.CheckPushService())
            {// 检查服务
                return;
            }

            QueryServiceClient proxy = new QueryServiceClient();

            try
            {
                this.CboHallID.Items.Clear();
                int           nCurWareHouse = CStaticClass.ConvertWareHouse(this.CboHallWareHouse.Text);
                List <object> lstHall       = CStaticClass.ConfigLstHallDeviceIDDescp(nCurWareHouse);// 根据库号获取对应所有车厅设备号
                this.CboHallID.Items.AddRange(lstHall.ToArray());
                this.CboHallID.SelectedIndex = 0;
            }
            catch (TimeoutException)
            {
                MessageBox.Show("The service operation timed out. ", "超时", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (FaultException exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "SOAP错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (CommunicationException exception)
            {
                MessageBox.Show("There was a communication problem. " + CStaticClass.GetExceptionInfo(exception), "通信错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (Exception exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "应用程序异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            proxy.Close();
        }
コード例 #19
0
        public CFormFindStatistics()
        {
            InitializeComponent();
            try
            {
                this.DgvICCard.AutoGenerateColumns   = false;
                this.DgvDo.AutoGenerateColumns       = false;
                this.DgvFault.AutoGenerateColumns    = false;
                this.DgvBusiness.AutoGenerateColumns = false;
                this.DgvStatus.AutoGenerateColumns   = false;
                this.DgvICCard.DataSourceChanged    += new EventHandler(this.CupttsICCard.UpdateLayout);
                this.DgvDo.DataSourceChanged        += new EventHandler(this.CupttsDo.UpdateLayout);
                this.DgvFault.DataSourceChanged     += new EventHandler(this.CupttsFault.UpdateLayout);
                this.DgvBusiness.DataSourceChanged  += new EventHandler(this.CupttsBusiness.UpdateLayout);
                this.DgvStatus.DataSourceChanged    += new EventHandler(this.CupttsStatus.UpdateLayout);
                this.CboICCardCondition.Text         = "所有";
                this.CboDoCondition.Text             = "所有";
                this.CboFaultCondition.Text          = "所有";
                this.CboBusinessCondition.Text       = "所有";
                this.CboStatusCondition.Text         = "所有";

                // 设置键盘“Esc”按钮
                Button BtnCancel = new Button();
                this.CancelButton = BtnCancel;
                BtnCancel.Click  += new EventHandler(BtnCancel_Click);

                if (!CStaticClass.ConfigBillingFlag())
                {// 没有收费管理系统,  删除IC卡缴费日志查询
                    this.tabControl1.Controls.Remove(this.tabPage1);
                }
                CFormFindStatistics_Load(null, null);
            }
            catch { }
        }
コード例 #20
0
 /// <summary>
 /// 允许厅外刷卡取车否
 /// </summary>
 private void InitGetCarOutStatus()
 {
     try
     {
         if (!CStaticClass.CheckPushService())
         {// 检查服务
             return;
         }
         QueryServiceClient proxy  = new QueryServiceClient();
         string             status = proxy.GetUserSetFixCardOutLimit();
         proxy.Close();
         if (status == "1")
         {
             lblAllow.Text = "允许";
         }
         else if (status == "0")
         {
             lblAllow.Text = "禁止";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
コード例 #21
0
        public CFormCustomerManage()
        {
            InitializeComponent();

            try
            {
                iccdCom = CReadIniFile.ReadSectionData("刷卡器", "ICCardCom");
            }
            catch (Exception ex)
            {
                CLOGException.Trace(ex.ToString());
            }

            m_formCustomer     = new CFormCustomer();
            m_formCustomer.Tag = this.CucipCustomer;
            // 设置键盘“Esc”按钮
            Button BtnCancel = new Button();

            this.CancelButton = BtnCancel;
            BtnCancel.Click  += new EventHandler(BtnCustomerClose_Click);
            // 设置键盘“Enter”按钮
            this.AcceptButton = this.CucipCustomer.BtnFind;

            if (CStaticClass.ConfigBillingFlag())
            {// 有收费管理系统,  删除车主信息tab
                this.TctlCustomer.Controls.Remove(this.TpCustomer);
            }
            this.CucipCustomer.CUserCustomerInfoPanel_Load(null, null);
            // 修改用户卡号的物理号时不需要
            if (CStaticClass.myPara.ReplacePhyCardIDFlag)
            {
                this.LblICCardIDOld.Visible  = false;
                this.CTxtICCardIDOld.Visible = false;
            }
        }
コード例 #22
0
        /// <summary>
        /// 更新单个label设备故障
        /// </summary>
        /// <param name="deviceFault"></param>
        public void UpdateDeviceFault(CarLocationPanelLib.PushService.CDeviceFaultDto deviceFault)
        {
            int     nWareHouse = (int)deviceFault.warehouse;
            int     nDeviceID  = (int)deviceFault.devicecode;
            string  strName    = CStaticClass.ConvertWareHouse(nWareHouse) + nDeviceID + "#";// nWareHouse + "#库" + nDeviceID + "#";
            TabPage selectTab  = m_ltpWareHouse.Find(a => a.Name.Contains(strName));

            if (null == selectTab)
            {
                TabPage tp = new TabPage();
                tp.AutoScroll = true;
                tp.Font       = new System.Drawing.Font("宋体", 9F);
                tp.Name       = strName;
                if (0 < nDeviceID && 10 > nDeviceID)
                {
                    tp.Text = strName + "ETV";
                }
                else if (10 < nDeviceID && 20 > nDeviceID)
                {
                    tp.Text = strName + "车厅";
                }
                else if (20 < nDeviceID && 30 > nDeviceID)
                {
                    tp.Text = strName + "TV";
                }

                SetTabPageLayout(tp, nWareHouse, nDeviceID);
                m_ltpWareHouse.Add(tp);
                this.TabDeviceFault.Controls.Add(tp);
                selectTab = tp;
                //this.TabDeviceFault.SelectTab(tp);
            }

            UpdateFaultColor(selectTab, deviceFault);
        }
コード例 #23
0
        public CFormHandOrder()
        {
            InitializeComponent();
            this.CboWareHouse.Items.AddRange(CStaticClass.ConfigLstWareHouseDescp().ToArray());
            this.CboWareHouse.SelectedIndex = 0;

            // 设置键盘“Esc”按钮
            Button BtnCancel = new Button();

            this.CancelButton = BtnCancel;
            BtnCancel.Click  += new EventHandler(BtnCancel_Click);
            m_formCarLocationStatus.ClientSize      = new System.Drawing.Size(CStaticClass.ConfigMinWidth(), CStaticClass.ConfigMinHeight());
            m_formCarLocationStatus.FormBorderStyle = FormBorderStyle.FixedDialog;
            m_formCarLocationStatus.StartPosition   = FormStartPosition.CenterScreen;

            btnRdICCard.Enabled = false;
            try
            {
                iccdCom = CReadIniFile.ReadSectionData("刷卡器", "ICCardCom");
            }
            catch (Exception ex)
            {
                CLOGException.Trace(ex.ToString());
            }
        }
コード例 #24
0
        /// <summary>
        /// 窗体首次显示时触发(窗体大小改变触发 OnResize  OnShown)
        /// </summary>
        /// <param name="e"></param>
        protected override void OnResize(EventArgs e)
        {
            //if (this.WindowState == FormWindowState.Maximized)
            //{// 最大化状态时
            int minGap      = CStaticClass.ConfigMinGap();
            int nGap        = 4 * minGap;
            int nLabelWidth = CStaticClass.ConfigFaultLabelWidth();
            int nLabelHight = CStaticClass.ConfigFaultLabelHeight();
            int gap         = CStaticClass.ConfigMinGap();

            //int nWidth = Math.Max(this.TabDeviceFault.Width, this.Width - nGap);
            //int nHeight = Math.Max(this.TabDeviceFault.Height, this.Height - 2 * nGap);
            //int nTabHeight = Math.Max(this.TabDeviceFault.Height - 3 * nGap, this.Height - 3 * nGap);
            this.TabDeviceFault.Size = new Size(this.Width - nGap, this.Height - 2 * nGap);
            Size sTabSize = new Size(this.Width - nGap, this.Height - 3 * nGap);

            foreach (TabPage tp in this.TabDeviceFault.Controls)
            {
                tp.Size = sTabSize;
                //int nIndex = 0;
                //foreach (Label label in tp.Controls)
                //{
                //    int nRowCount = (this.TabDeviceFault.Height - 2 * gap) / (nLabelHight + gap) - 1;
                //    int row = (nIndex) % nRowCount;
                //    int column = (nIndex++) / nRowCount;
                //    int nx = column == 0 ? gap : column * nLabelWidth + (column + 1) * gap;
                //    int ny = row == 0 ? gap : row * nLabelHight + (row + 1) * gap;
                //    label.Location = new System.Drawing.Point(nx, ny);
                //}
            }
            //}
        }
コード例 #25
0
        /// <summary>
        /// 窗体首次显示时触发(窗体大小改变触发 OnShown-OnResize)
        /// </summary>
        /// <param name="e"></param>
        public virtual void OnResize()
        {
            int width  = this.ClientSize.Width > CStaticClass.ConfigMinWidth() ? this.ClientSize.Width : CStaticClass.ConfigMinWidth();
            int height = this.ClientSize.Height > CStaticClass.ConfigMinHeight() ? this.ClientSize.Height : CStaticClass.ConfigMinHeight();
            int gap    = CStaticClass.ConfigMainGap();
            int minGap = CStaticClass.ConfigMinGap();

            // 车主查找
            int nFindHeight = this.GbxCustomerFind.Height;

            this.GbxCustomerFind.Size = new System.Drawing.Size(width, nFindHeight);
            int nWithLen = this.LblCustomerCondition.Width + this.CboCustomerCondition.Width + this.BtnCustomerFind.Width + this.BtnCustomerModify.Width + 6 * gap;
            int nLeft    = Math.Max((width - nWithLen) / 2, minGap);
            int nTop     = this.LblCustomerCondition.Location.Y;

            this.LblCustomerCondition.Location = new Point(nLeft, nTop);
            this.CboCustomerCondition.Location = new Point(LblCustomerCondition.Location.X + LblCustomerCondition.Width, nTop);
            this.BtnCustomerFind.Location      = new Point(CboCustomerCondition.Location.X + CboCustomerCondition.Width + 3 * gap, nTop);
            this.BtnCustomerModify.Location    = new Point(BtnCustomerFind.Location.X + BtnCustomerFind.Width + 3 * gap, nTop);
            nTop = this.LblCustomerData.Location.Y;
            this.LblCustomerData.Location   = new Point(nLeft, nTop);
            this.CTxtCustomerData.Location  = new Point(LblCustomerCondition.Location.X + LblCustomerCondition.Width, nTop);
            this.CboCustomerData.Location   = new Point(LblCustomerCondition.Location.X + LblCustomerCondition.Width, nTop);
            this.BtnCustomerAdd.Location    = new Point(CboCustomerCondition.Location.X + CboCustomerCondition.Width + 3 * gap, nTop);
            this.BtnCustomerDelete.Location = new Point(BtnCustomerFind.Location.X + BtnCustomerFind.Width + 3 * gap, nTop);

            // 车主列表
            nTop = this.GbxCustomerList.Location.Y;
            this.GbxCustomerList.Size = new System.Drawing.Size(width, height - nTop);
            this.DgvCustomer.Size     = new System.Drawing.Size(width, this.GbxCustomerList.Height - this.DgvCustomer.Location.Y - this.CupttsUers.Height - minGap);
            this.CupttsUers.Location  = new Point(4, this.DgvCustomer.Location.Y + this.DgvCustomer.Height + minGap);// 翻页
        }
コード例 #26
0
        /// <summary>
        /// 填充车位信息界面
        /// </summary>
        /// <param name="carLocation"></param>
        public void FillFormCarLocation(CCarLocationDto carLocation, int nICType)
        {
            try
            {
                this.TxtWareHouse.Text    = CStaticClass.ConvertWareHouse(carLocation.warehouse);
                this.TxtAddress.Text      = carLocation.carlocside + "边," + carLocation.carloccolumn + "列," + carLocation.carloclayer + "层";
                this.TxtCarLocStatus.Text = CStaticClass.ConvertCarLocStatus(carLocation.carlocstatus);
                this.TxtUserID.Text       = carLocation.iccode;
                this.TxtUserType.Text     = CStaticClass.ConvertICCardType(nICType);
                this.TxtInTime.Text       = carLocation.carintime.ToString();
                this.TxtCarLocSize.Text   = carLocation.carlocsize;

                this.TxtCarSize.Text      = carLocation.carsize;
                this.TxtCarWheelBase.Text = carLocation.carwheelbase == null ? "0" : carLocation.carwheelbase.ToString();
                this.txtCarLG.Text        = carLocation.overallLg == null?"0":carLocation.overallLg.ToString();
                this.txtOverhang.Text     = carLocation.overhang == null?"0":carLocation.overhang.ToString();
                this.txtWeight.Text       = carLocation.carweight == null ? "0" : carLocation.carweight.ToString();
                this.txtOffCenter.Text    = carLocation.offcenter == null ? "0" : carLocation.offcenter.ToString();
                this.txtRearwheel.Text    = carLocation.rearwheeldis == null ? "0" : carLocation.rearwheeldis.ToString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
コード例 #27
0
        public CFormCIMCWorker()
        {
            InitializeComponent();
            // tabPage1-车厅运行流程架构
            InitializeGbHall();
            // tabPage3-语音配置
            this.DgvSound.AutoGenerateColumns = false;
            this.DgvSound.DataSourceChanged  += new EventHandler(this.CupttsSound.UpdateLayout);
            this.CupttsSound.Tag = this.DgvSound;
            // tabPage2-Led配置
            this.DgvLed.AutoGenerateColumns = false;
            this.DgvLed.DataSourceChanged  += new EventHandler(this.CupttsLed.UpdateLayout);
            this.CupttsLed.Tag = this.DgvLed;
            // tabPage4-LED内容修改
            this.tabControl1.Controls.Remove(this.tabPage4);
            // tabPage6-报文队列
            this.DgvQueue.AutoGenerateColumns = false;
            this.CboWareHouseTask.Items.Add("");
            this.CboWareHouseTask.Items.AddRange(CStaticClass.ConfigLstWareHouseDescp().ToArray());

            // 设置键盘“Esc”按钮
            Button BtnCancel = new Button();

            this.CancelButton = BtnCancel;
            BtnCancel.Click  += new EventHandler(BtnClose_Click);
        }
コード例 #28
0
        /// <summary>
        /// 计时器在任务栏显示当前时间
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                this.TsslCurTime.Text = CStaticClass.CurruntDateTime().ToString("yyyy-MM-dd HH:mm:ss");

                // 状态栏显示服务器连接状态处理
                if (CStaticClass.GetPushServiceConnectFlag())
                {
                    if (this.TsslConnected.Name != "connected")
                    {
                        this.TsslConnected.Name  = "connected";
                        this.TsslConnected.Image = global::WindowsFormLib.Properties.Resources.connected;
                        // 服务器重新连接上需要初始化
                        InitializeInfo();
                    }
                }
                else
                {
                    if (this.TsslConnected.Name != "disconnceted")
                    {
                        this.TsslConnected.Name  = "disconnceted";
                        this.TsslConnected.Image = global::WindowsFormLib.Properties.Resources.disconnceted;
                    }
                }
            }
            catch (Exception)
            {
            }
        }
コード例 #29
0
 /// <summary>
 /// 单击源地址文本框根据当前库车位状态选择源地址
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TxtSrcLocAddr_Click(object sender, EventArgs e)
 {
     try
     {
         EnmTxtCarLocationAddr enmCarLocAddr = EnmTxtCarLocationAddr.HandOrderSrc;
         // 显示当前车库车位状态对话框
         CStaticClass.showFormCarLocationStatus(this, m_formCarLocationStatus, CStaticClass.ConvertWareHouse(m_nWareHouse), enmCarLocAddr);
     }
     catch (TimeoutException)
     {
         MessageBox.Show("The service operation timed out. ", "超时", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (FaultException exception)
     {
         MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "SOAP错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (CommunicationException exception)
     {
         MessageBox.Show("There was a communication problem. " + CStaticClass.GetExceptionInfo(exception), "通信错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (Exception exception)
     {
         MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "应用程序异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #30
0
        /*
         * /// <summary>
         * /// 输入格式限制提示文本
         * /// </summary>
         * public string StrToolTip
         * {
         *  get
         *  {
         *      return m_strToolTip;
         *  }
         *  set
         *  {
         *      m_strToolTip = value;
         *      m_toolTip.SetToolTip(this, m_strToolTip);
         *      CCustomTextBox_LostFocus(this, null);
         *  }
         * }
         *
         * /// <summary>
         * /// 输入格式限制正则表达式
         * /// </summary>
         * public string StrRegularExpression
         * {
         *  get
         *  {
         *      return m_strRegularExpression;
         *  }
         *  set
         *  {
         *      m_strRegularExpression = value;
         *  }
         * }*/
        #endregion

        #region 事件处理
        /// <summary>
        /// 控件失去焦点
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CCustomTextBox_LostFocus(object sender, EventArgs e)
        {
            try
            {
                if (EnmTxtBoxType.PassWord == m_enmtxtType)
                {
                    return;
                }
                else if (string.IsNullOrEmpty(this.Text) || m_strToolTip == this.Text)
                {
                    this.Text      = m_strToolTip;
                    this.ForeColor = System.Drawing.Color.Gray;
                }
                //else if (m_isStart)
                //{
                //    m_isStart = false;
                //    this.Text = this.Text.Substring(0, 1);
                //    this.ForeColor = System.Drawing.Color.Black;
                //}
                else
                {
                    this.ForeColor = System.Drawing.Color.Black;
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }