Beispiel #1
0
 private void GetFormPaymentSettings()
 {
     Utilites.WriteToLog("GetFormPaymentSettings entered");
     this.m_PaymentAmountAsString = this._parkingPermitInfo.Amount.ToString("N2");
     this.amountLabel.Text        = "£" + this.m_PaymentAmountAsString;
     Utilites.WriteToLog("GetFormPaymentSettings Exited");
 }
Beispiel #2
0
        private void displayTravelodge()
        {
            Utilites.WriteToLog("displayTravelodge entered");
            string str    = this.FormatThankYouMessage();
            int    width1 = this.Width;
            int    width2 = this.lblThankYou.Width;

            this.lblThankYou.Location = new Point((width1 - width2) / 2, 40);
            this.lblForParking.Text   = str;
            int width3 = this.lblForParking.Width;

            this.lblForParking.Location = new Point((width1 - width3) / 2, 95);
            int width4 = this.lblVehicleAdded.Width;

            this.lblVehicleAdded.Location = new Point((width1 - width4) / 2, 130);
            this.lblDate.Text             = "FROM " + this.m_ParkingPermit.StartDate.ToString("dd/MM/yyyy") + " TO " + this.m_ParkingPermit.EndDate.ToString("dd/MM/yyyy") + " (inclusive)";
            int width5 = this.lblDate.Width;

            this.lblDate.Location = new Point((width1 - width5) / 2, 165);
            this.PlaceWarningMessageOnScreen();
            this.cmdClose.Location       = new Point((width1 - this.cmdClose.Width) / 2, 300);
            this.lblThankYou.Visible     = true;
            this.lblVehicleAdded.Visible = true;
            this.cmdClose.Visible        = true;
            this.lblDate.Visible         = true;
            this.lblForParking.Visible   = true;
            this.m_PaidInFullDisplayed   = true;
            this.PaidInFullTimer.Enabled = true;
            Utilites.WriteToLog("displayTravelodge exited");
        }
Beispiel #3
0
        private void displayNormal()
        {
            Utilites.WriteToLog("displayNormal entered");
            string str    = this.FormatThankYouMessage();
            int    width1 = this.Width;
            int    width2 = this.lblThankYou.Width;

            this.lblThankYou.Location = new Point((width1 - width2) / 2, 40);
            this.lblForParking.Text   = str;
            int width3 = this.lblForParking.Width;

            this.lblForParking.Location = new Point((width1 - width3) / 2, 110);
            int width4 = this.cmdPrint.Width;

            this.cmdPrint.Location     = new Point((width1 - width4) / 2, 250);
            this.cmdClose.Location     = new Point((width1 - this.cmdClose.Width) / 2, 150);
            this.lblThankYou.Visible   = true;
            this.lblForParking.Visible = true;
            this.cmdClose.Visible      = true;
            if (this.m_ApplicationType.ToUpper() == "TOUCHPARK")
            {
                this.cmdPrint.Visible = true;
            }
            this.m_PaidInFullDisplayed   = true;
            this.PaidInFullTimer.Enabled = true;
            Utilites.WriteToLog("displayNormal exited");
        }
Beispiel #4
0
 private void PaidInFullTimer_Tick(object sender, EventArgs e)
 {
     Utilites.WriteToLog("PaidInFullTimer_Tick entered");
     if (this.m_PaidInFullDisplayed)
     {
         this.Close();
     }
     Utilites.WriteToLog("PaidInFullTimer_Tick exited");
 }
Beispiel #5
0
 public PaymentForm(ParkingPermitInfo parkingPermit, string displayOption)
 {
     Utilites.WriteToLog("frmPayment entered");
     this.InitializeComponent();
     this.SetFormRegion();
     this._parkingPermitInfo.copy(parkingPermit);
     this.m_DisplayOption      = displayOption;
     this.stayExpiryLabel.Text = string.Format("Stay Expires\nAt {0}", (object)this._parkingPermitInfo.EndDate.ToShortTimeString());
     this.CoinMechanismSetup();
     Utilites.WriteToLog("frmPayment Exited");
 }
Beispiel #6
0
 private void WriteGuestParkPermit()
 {
     Utilites.WriteToLog("WriteGuestParkPermit entered");
     this._parkingPermitInfo.MachineName = Environment.MachineName;
     this._parkingPermitInfo.PermitType  = "VALIDATE";
     this._parkingPermitInfo.PaymentType = "";
     this._parkingPermitInfo.AuthCode    = "";
     this._parkingPermitInfo.Amount      = new Decimal(0);
     this._parkingPermitInfo.EndDate     = DateTime.MinValue;
     Utilites.WriteToLog("WriteGuestParkPermit Exited");
 }
Beispiel #7
0
        private void printDocumentReceipt_PrintPage(object sender, PrintPageEventArgs e)
        {
            Utilites.WriteToLog("printDocumentReceipt_PrintPage entered");
            Graphics graphics                = e.Graphics;
            Font     font                    = this.printLabel.Font;
            float    right                   = (float)e.MarginBounds.Right;
            float    lineHeight              = font.GetHeight(graphics) + 2f;
            float    middleOfPage            = (float)(e.PageBounds.Width / 2);
            float    middleOfPageLogoSection = (float)((e.PageBounds.Width - 49) / 2 + 49);
            int      width                   = e.PageBounds.Width;

            this.DrawReceiptToGraphic(graphics, font, right, lineHeight, middleOfPage, middleOfPageLogoSection, width);
            Utilites.WriteToLog("printDocumentReceipt_PrintPage exited");
        }
Beispiel #8
0
        private void PaidInFullOpenThankyouForm()
        {
            Utilites.WriteToLog("GetFormPaidInFullSettings entered");
            bool xml = Utilites.WriteParkingPermitToXML(this._parkingPermitInfo);

            this.Hide();
            frmThankYou frmThankYou = new frmThankYou(this._parkingPermitInfo, this.m_DisplayOption, xml, this._cardDeviceResponse);
            int         num         = (int)frmThankYou.ShowDialog();

            frmThankYou.Close();
            frmThankYou.Dispose();
            this.Close();
            Utilites.WriteToLog("GetFormPaidInFullSettings Exited");
        }
Beispiel #9
0
 private void WaitForCashPayment()
 {
     Utilites.WriteToLog("cashPayment entered");
     try
     {
         this.messageLabel.Text = "PLEASE INSERT THE CORRECT CASH\n\rNO CHANGE OR REFUND IS GIVEN";
         this.amountLabel.Text  = this._parkingPermitInfo.Amount.ToString("C");
         this._cancel           = false;
         Devices.CoinMechanism.WaitOnMoney();
     }
     catch (JammedCoinException ex)
     {
         Log.Write((Exception)ex);
         this.messageLabel.Text = "A coin appears to be jammed! Press the release button!";
         this.ResetCoinMechanism();
         this.Close();
     }
     Utilites.WriteToLog("cashPayment Exited");
 }
Beispiel #10
0
        private void displayTescoStaff()
        {
            Utilites.WriteToLog("displayTescoStaff entered");
            this.FormatThankYouMessage();
            int width1 = this.Width;
            int width2 = this.lblThankYou.Width;

            this.lblThankYou.Location = new Point((width1 - width2) / 2, 40);
            int width3 = this.lblVehicleAdded.Width;

            this.lblVehicleAdded.Location = new Point((width1 - width3) / 2, 95);
            int width4 = this.lblStaff.Width;

            this.lblStaff.Location       = new Point((width1 - width4) / 2, 130);
            this.cmdClose.Location       = new Point((width1 - this.cmdClose.Width) / 2, 260);
            this.lblThankYou.Visible     = true;
            this.lblVehicleAdded.Visible = true;
            this.cmdClose.Visible        = true;
            this.lblStaff.Visible        = true;
            this.m_PaidInFullDisplayed   = true;
            this.PaidInFullTimer.Enabled = true;
            Utilites.WriteToLog("displayTescoStaff exited");
        }
Beispiel #11
0
        private void displayTescoVistor()
        {
            Utilites.WriteToLog("displayTescoVistor entered");
            this.FormatThankYouMessage();
            int width1 = this.Width;
            int width2 = this.lblThankYou.Width;

            this.lblThankYou.Location = new Point((width1 - width2) / 2, 40);
            int width3 = this.lblVehicleAdded.Width;

            this.lblVehicleAdded.Location = new Point((width1 - width3) / 2, 95);
            this.lblDate.Text             = "FOR TODAY ONLY " + DateTime.Now.ToLongDateString();
            int width4 = this.lblDate.Width;

            this.lblDate.Location        = new Point((width1 - width3) / 2, 120);
            this.cmdClose.Location       = new Point((width1 - this.cmdClose.Width) / 2, 250);
            this.lblThankYou.Visible     = true;
            this.lblVehicleAdded.Visible = true;
            this.cmdClose.Visible        = true;
            this.lblDate.Visible         = true;
            this.m_PaidInFullDisplayed   = true;
            this.PaidInFullTimer.Enabled = true;
            Utilites.WriteToLog("displayTescoVistor exited");
        }
Beispiel #12
0
 public frmThankYou(
     ParkingPermitInfo parkingPermit,
     string displayOption,
     bool updateSuccessful,
     CardDeviceResponse response)
 {
     Utilites.WriteToLog("frmThankYou entered");
     this.m_receiptID = "A" + DateTime.Now.ToString("MMHH") + Environment.GetEnvironmentVariable("RSSITECODE") + DateTime.Now.ToString("ddmmyy");
     if (string.IsNullOrEmpty(this.ThankYouCode))
     {
         this.ThankYouCode = Settings.Default.ThankYouCode;
     }
     this.InitializeComponent();
     this.Region = Region.FromHrgn(frmThankYou.CreateRoundRectRgn(0, 0, this.Width - 10, this.Height - 10, 20, 20));
     this.m_ParkingPermit.copy(parkingPermit);
     this.m_DisplayOption = displayOption;
     this.m_PaidInFull    = updateSuccessful;
     if (this.ThankYouCode == null)
     {
         this.ThankYouCode = "NONE";
     }
     this.m_responseFile = response;
     Utilites.WriteToLog("frmThankYou exited");
 }
Beispiel #13
0
        private void frmPayment_Load(object sender, EventArgs e)
        {
            Utilites.WriteToLog("frmPayment_Load entered");
            if (this.m_PaidInFull)
            {
                if (this.m_DisplayOption.ToUpper().Equals("PERMITPARK2"))
                {
                    switch (this.m_ParkingPermit.PermitType)
                    {
                    case "STAFF":
                        this.displayNormal();
                        break;

                    case "VISITOR":
                        this.displayTravelodge();
                        break;

                    default:
                        this.displayNormal();
                        break;
                    }
                }
                else if (this.ThankYouCode.ToString().ToUpper().Equals("TESCO"))
                {
                    switch (this.m_ParkingPermit.PermitType)
                    {
                    case "STAFF":
                        this.displayTescoStaff();
                        break;

                    case "VISITOR":
                        this.displayTescoVistor();
                        break;

                    default:
                        this.displayNormal();
                        break;
                    }
                }
                else if (this.ThankYouCode.ToUpper().Equals("TRAVELODGE"))
                {
                    this.displayTravelodge();
                }
                else if (this.ThankYouCode.ToString().ToUpper().Equals("TYNORMAL"))
                {
                    switch (this.m_ParkingPermit.PermitType)
                    {
                    case "STAFF":
                        this.displayNormal();
                        break;

                    case "VISITOR":
                        this.displayTescoVistor();
                        break;

                    default:
                        this.displayNormal();
                        break;
                    }
                }
                else
                {
                    this.displayNormal();
                }
            }
            else
            {
                int width1 = this.Width;
                this.lblLeavingMessage.Text = "There was a problem issusing a permit";
                int width2 = this.lblLeavingMessage.Width;
                this.lblLeavingMessage.Location = new Point((width1 - width2) / 2 - 10, 40);
                this.lblForParking.Text         = ConfigurationManager.AppSettings["PaymentErrorMessage"].ToString();
                int width3 = this.lblForParking.Width;
                this.lblForParking.Location    = new Point((width1 - width3) / 2 - 10, 120);
                this.cmdClose.Location         = new Point((width1 - this.cmdClose.Width) / 2 - 10, 150);
                this.lblLeavingMessage.Visible = true;
                this.lblForParking.Visible     = true;
                this.cmdClose.Visible          = true;
            }
            this.m_PaidInFull = false;
            Utilites.WriteToLog("frmPayment_Load exited");
        }
Beispiel #14
0
 internal static void WriteToLog(string message, TraceEventType severity)
 {
     Utilites.WriteToLog("Unspecified Log Entry", message, severity);
 }
Beispiel #15
0
 private void cardPayment_Click(object sender, EventArgs e)
 {
     Utilites.WriteToLog("cmdCCard_Click entered");
     this.StartCardPayment();
     Utilites.WriteToLog("cmdCCard_Click Exited");
 }
Beispiel #16
0
 private void cmdClose_Click(object sender, EventArgs e)
 {
     Utilites.WriteToLog("cmdClose_Click entered");
     this.Close();
     Utilites.WriteToLog("cmdClose_Click exited");
 }
Beispiel #17
0
 private void cmdPrint_Click(object sender, EventArgs e)
 {
     Utilites.WriteToLog("cmdPrint_Click entered");
     this.PrintReceipt();
     Utilites.WriteToLog("cmdPrint_Click exited");
 }
Beispiel #18
0
 internal static void WriteToLog(string message)
 {
     Utilites.WriteToLog(message, TraceEventType.Information);
 }