Beispiel #1
0
 private void ParkVacantRender(ParkInfo park)
 {
     try
     {
         if (AppSettings.CurrentSetting.ParkVacantLed == 0)
         {
             _ParkFullLed = new ZhongKuangLed(AppSettings.CurrentSetting.ParkFullLedCOMPort);
         }
         else if (AppSettings.CurrentSetting.ParkVacantLed == 1)
         {
             _ParkFullLed = new KeyTopVacantLed(AppSettings.CurrentSetting.ParkFullLedCOMPort);
         }
         if (_ParkFullLed != null)
         {
             _ParkFullLed.Open();
             if (_ParkFullLed is KeyTopVacantLed)
             {
                 _ParkFullLed.DisplayMsg(park.Vacant.ToString("D3"), int.MaxValue);
             }
             else
             {
                 _ParkFullLed.DisplayMsg(string.Format("{0}{1}", park.VacantText, park.Vacant), int.MaxValue);
             }
             _ParkFullLed.Close();
         }
     }
     catch (Exception ex)
     {
         ExceptionPolicy.HandleException(ex);
     }
 }
        private void ShowCardPaymentInfo(CardPaymentInfo cardPayment)
        {
            this.txtCardID.Text = cardPayment.CardID;
            this.txtCardID.SelectAll();
            this.lblOwnerName.Text     = cardPayment.OwnerName;
            this.lblCarNum.Text        = cardPayment.CarPlate;
            this.lblEnterDateTime.Text = cardPayment.EnterDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
            this.lblExitDateTime.Text  = cardPayment.ChargeDateTime.ToString("yyyy-MM-dd HH:mm:ss");
            this.lblParkingTime.Text   = cardPayment.TimeInterval;
            this.lblCardType.Text      = cardPayment.CardType.ToString();
            this.lblTariffType.Text    = Ralid.Park.BusinessModel.Resouce.TariffTypeDescription.GetDescription(cardPayment.TariffType);
            //this.lblLastTotalPaid.Text = cardPayment.LastTotalPaid.ToString();
            this.lblLastTotalPaid.Text = _cardInfo.TotalPaidFee.ToString();
            //this.lblLastTotalDiscount.Text = cardPayment.LastTotalDiscount.ToString();
            this.lblAccounts.Text        = cardPayment.Accounts.ToString();
            this.lblLastWorkstation.Text = cardPayment.LastStationID;
            this.txtPaid.DecimalValue    = cardPayment.Accounts - cardPayment.Discount;
            this.lblDiscount.Text        = cardPayment.Discount.ToString();
            this.txtMemo.Text            = string.Empty;

            this.picIn.Clear();
            List <SnapShot> imgs = _SnapShotBll.GetSnapShots(cardPayment.EnterDateTime.Value, cardPayment.CardID);

            if (imgs != null && imgs.Count > 0)
            {
                this.picIn.ShowSnapShots(imgs);
            }

            string msg = string.Format(Resource1.FrmCardPaying_PayingSpeech, TariffSetting.Current.TariffOption.StrMoney(cardPayment.Accounts));

            this.carTypePanel1.SelectedCarType = cardPayment.CarType;
            this.btnCash.Enabled = true;
            this.btnCash.Focus();
            this.btnYCT.Enabled    = (_YCTReader != null) ? true : false;
            this.btnCancel.Enabled = true;
            this.btnRepay.Enabled  = _cardInfo.LastPayment != null || _cardInfo.IsCompletedPaid;

            if (_cardInfo.IsCompletedPaid && TariffSetting.Current.IsInFreeTime(_cardInfo.PaidDateTime.Value, cardPayment.ChargeDateTime))
            {
                //已缴费,并且未过免费时间
                msg = string.Format(Resource1.FrmCardCenterCharge_FreeRemain, TariffSetting.Current.FreeTimeRemaining(_cardInfo.PaidDateTime.Value, cardPayment.ChargeDateTime));
                this.eventList.InsertMessage(msg);
                this.txtMemo.Text = msg;
                //不允许缴费
                this.btnCash.Enabled = false;
                this.btnYCT.Enabled  = false;
            }

            if (_ChargeLed != null)
            {
                _ChargeLed.DisplayMsg(msg);
            }
            if (AppSettings.CurrentSetting.EnableTTS)
            {
                TTSSpeech.Instance.Speek(msg);
            }

            CardReaderManager.GetInstance(UserSetting.Current.WegenType).StopReadCard();
        }
Beispiel #3
0
        private ParkFullLed _DixiaKongjian;  //地下空间用
        #endregion

        #region 私有方法
        private void InitLED()
        {
            try
            {
                //满位显示屏
                if (AppSettings.CurrentSetting.ParkFullLedCOMPort > 0)
                {
                    _ParkFullLed = new ZhongKuangLed(AppSettings.CurrentSetting.ParkFullLedCOMPort);
                    _ParkFullLed.Open();
                    if (ParkBuffer.Current.Parks.Count == 1)  //显示车位余数
                    {
                        ParkInfo park = ParkBuffer.Current.Parks[0];
                        _ParkFullLed.DisplayMsg(string.Format("{0}{1}", park.VacantText, park.Vacant), int.MaxValue);
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionPolicy.HandleException(ex);
            }

            try
            {
                string filePath = System.IO.Path.Combine(Application.StartupPath, "ParkFullLed.xml");
                if (System.IO.File.Exists(filePath))  //显示在地下空间满位显示屏上
                {
                    _DixiaKongjian = ParkFullLed.Create(filePath);
                    _DixiaKongjian.Open();
                }
            }
            catch (Exception ex)
            {
                ExceptionPolicy.HandleException(ex);
            }
        }
Beispiel #4
0
        public void ProcessReport(ReportBase report)
        {
            if (report is ParkVacantReport)
            {
                ParkVacantReport r    = report as ParkVacantReport;
                ParkInfo         park = ParkBuffer.Current.GetPark(r.ParkID);
                if (park != null)
                {
                    if (_ParkFullLed != null)
                    {
                        _ParkFullLed.DisplayMsg(string.Format("{0}{1}", park.VacantText, r.ParkVacant), int.MaxValue);
                    }

                    if (_DixiaKongjian != null)
                    {
                        _DixiaKongjian.DisplayVacantInfo(r.ParkVacant);
                    }
                }
            }
        }
 private void btnShow_Click(object sender, EventArgs e)
 {
     if (_LED != null)
     {
         _LED.Close();
     }
     if (this.comPortComboBox1.ComPort > 0 && this.comboBox1.SelectedIndex >= 0)
     {
         if (this.comboBox1.SelectedIndex == 0)
         {
             _LED = new ZhongKuangLed(this.comPortComboBox1.ComPort);
         }
         else
         {
             _LED = new YanseDesktopLed(this.comPortComboBox1.ComPort);
         }
         _LED.Open();
         _LED.PermanentSentence = txtStorage.Text;
         _LED.DisplayMsg(txtTemp.Text);
     }
 }
Beispiel #6
0
        private void ShowCardChargeInfo(CardPaymentInfo cardPayment)
        {
            this.txtCardID.Text = cardPayment.CardID;
            this.txtCardID.SelectAll();
            this.lblOwnerName.Text       = cardPayment.OwnerName;
            this.lblCarNum.Text          = cardPayment.CarPlate;
            this.lblEnterDateTime.Text   = cardPayment.EnterDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
            this.lblExitDateTime.Text    = cardPayment.ChargeDateTime.ToString("yyyy-MM-dd HH:mm:ss");
            this.lblParkingTime.Text     = cardPayment.TimeInterval;
            this.lblCardType.Text        = cardPayment.CardType.ToString();
            this.lblTariffType.Text      = Ralid.Park.BusinessModel.Resouce.TariffTypeDescription.GetDescription(cardPayment.TariffType);
            this.lblLastTotalPaid.Text   = (cardPayment.LastTotalPaid + cardPayment.LastTotalDiscount).ToString();
            this.lblLastWorkstation.Text = cardPayment.LastStationID;
            this.lblAccounts.Text        = cardPayment.Accounts.ToString();
            this.txtPaid.DecimalValue    = cardPayment.Accounts - cardPayment.Discount;
            this.lblDiscount.Text        = cardPayment.Discount.ToString();
            this.txtMemo.Text            = string.Empty;

            this.carTypePanel1.SelectedCarType = cardPayment.CarType;

            string msg = string.Format(Resource1.FrmCardPaying_PayingSpeech, TariffSetting.Current.TariffOption.StrMoney(cardPayment.Accounts));

            if (_ChargeLed != null)
            {
                _ChargeLed.DisplayMsg(msg);
            }
            if (AppSettings.CurrentSetting.EnableTTS)
            {
                TTSSpeech.Instance.Speek(msg);
            }

            //长隆转会员卡功能
            if (cardPayment.CardID == _TempCardID && CarTypeSetting.Current.GetDescription(cardPayment.CarType) == _ToVipCard)
            {
                this.txtMemo.Text = _ToVipCard + _VipCardID;
            }
        }
Beispiel #7
0
        private CardInfo _cardInfo;//当前读到的卡片,用于写卡模式
        #endregion

        #region 私有方法

        private void ShowCardPaymentInfo(CardPaymentInfo cardPayment)
        {
            this.txtCardID.Text = cardPayment.CardID;
            this.txtCardID.SelectAll();
            this.lblOwnerName.Text     = cardPayment.OwnerName;
            this.lblCarNum.Text        = cardPayment.CarPlate;
            this.lblEnterDateTime.Text = cardPayment.EnterDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
            this.lblExitDateTime.Text  = cardPayment.ChargeDateTime.ToString("yyyy-MM-dd HH:mm:ss");
            this.lblParkingTime.Text   = cardPayment.TimeInterval;
            this.lblCardType.Text      = cardPayment.CardType.ToString();
            this.lblBalance.Text       = _cardInfo.Balance.ToString("F2");
            //this.lblLastTotalPaid.Text = cardPayment.LastTotalPaid.ToString();
            this.lblLastTotalPaid.Text = _cardInfo.TotalPaidFee.ToString();
            //this.lblLastTotalDiscount.Text = cardPayment.LastTotalDiscount.ToString();
            this.lblAccounts.Text        = cardPayment.Accounts.ToString();
            this.lblLastWorkstation.Text = cardPayment.LastStationID;
            this.txtPaid.DecimalValue    = cardPayment.Accounts - cardPayment.Discount;
            this.lblDiscount.Text        = cardPayment.Discount.ToString();
            this.txtMemo.Text            = string.Empty;

            if (_cardInfo.CardType.IsPrepayCard && _cardInfo.Balance >= cardPayment.Accounts)
            {
                this.btnCash.Text = "储值扣费[F9]";
            }
            else
            {
                this.btnCash.Text = "现金收费[F9]";
            }

            string msg = string.Format(Resource1.FrmCardPaying_PayingSpeech, TariffSetting.Current.TariffOption.StrMoney(cardPayment.Accounts));

            this.carTypePanel1.SelectedCarType = cardPayment.CarType;
            this.btnCash.Enabled = true;
            this.btnCash.Focus();
            if (cardPayment.CardType.Name.Contains("中山通") &&
                AppSettings.CurrentSetting.EnableZST && !string.IsNullOrEmpty(AppSettings.CurrentSetting.ZSTReaderIP))
            {
                this.btnYCT.Text    = "中山通[&F10]";
                this.btnYCT.Enabled = true;
            }
            else
            {
                this.btnYCT.Enabled = (_YCTReader != null) ? true : false;
            }
            this.btnCancel.Enabled = true;

            if (_cardInfo.IsCompletedPaid && TariffSetting.Current.IsInFreeTime(_cardInfo.PaidDateTime.Value, cardPayment.ChargeDateTime))
            {
                //已缴费,并且未过免费时间
                msg = string.Format(Resource1.FrmCardCenterCharge_FreeRemain, TariffSetting.Current.FreeTimeRemaining(_cardInfo.PaidDateTime.Value, cardPayment.ChargeDateTime));
                this.eventList.InsertMessage(msg);
                this.txtMemo.Text = msg;
                //不允许缴费
                this.btnCash.Enabled = false;
                this.btnYCT.Enabled  = false;
            }

            if (_ChargeLed != null)
            {
                _ChargeLed.DisplayMsg(msg);
            }
            if (AppSettings.CurrentSetting.EnableTTS)
            {
                TTSSpeech.Instance.Speek(msg);
            }

            CardReaderManager.GetInstance(UserSetting.Current.WegenType).StopReadCard();
        }