コード例 #1
0
        private void ticketForm2_2BackBtn_Click(object sender, EventArgs e)
        {
            TicketForm tf = new TicketForm();

            tf.ShowDialog();
            Close();
        }
        private async void confirmBtn_Click(object sender, EventArgs e)
        {
            var values = new Dictionary <string, string>
            {
                { "studentNumber", "" }
            };
            var content  = new FormUrlEncodedContent(values);
            var response = await client.PostAsync("http://dlslqueueingapp-merwincastromjc253154.codeanyapp.com/v1/userLogoutDesktop.php", content);

            TicketForm tf = new TicketForm();

            tf.ShowDialog();
            Close();
        }
        private void confirmBtn_Click(object sender, EventArgs e)
        {
            printDocument1.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("custom", 200, 200);
            printPreviewDialog1.Document = printDocument1;
            printDocument1.Print();

            //printPreviewDialog1.ShowDialog();


            TicketForm tf = new TicketForm();

            tf.ShowDialog();
            Close();
        }
        //private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
        //{
        //    e.Graphics.DrawString(queueNumber.Text, new Font("Times New Roman", 40, FontStyle.Regular), Brushes.Black, new Point(60, 80));
        //    e.Graphics.DrawString(studentNumber.Text, new Font("Times New Roman", 12, FontStyle.Regular), Brushes.Black, new Point(55, 65));
        //    e.Graphics.DrawString("Cashier " + cashierNumber.Text, new Font("Times New Roman", 12, FontStyle.Regular), Brushes.Black, new Point(65, 10));
        //    e.Graphics.DrawString(serviceLane.Text, new Font("Times New Roman", 12, FontStyle.Regular), Brushes.Black, new Point(0, 40));
        //    e.Graphics.DrawString(serviceType.Text, new Font("Times New Roman", 12, FontStyle.Regular), Brushes.Black, new Point(110, 40));
        //    e.Graphics.DrawString(dateLbl.Text, new Font("Times New Roman", 12, FontStyle.Regular), Brushes.Black, new Point(35, 160));
        //    e.Graphics.DrawString(timeLbl.Text, new Font("Times New Roman", 12, FontStyle.Regular), Brushes.Black, new Point(65, 140));
        //}

        private async void confirmBtn_Click(object sender, EventArgs e)
        {
            var values = new Dictionary <string, string>
            {
                { "studentNumber", "" }
            };
            var content  = new FormUrlEncodedContent(values);
            var response = await client.PostAsync("http://dlslqueueingapp-merwincastromjc253154.codeanyapp.com/v1/userLogoutDesktop.php", content);


            //printDocument1.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("custom", 200, 200);
            //printPreviewDialog1.Document = printDocument1;
            //printDocument1.Print();
            TicketForm tf = new TicketForm();

            tf.ShowDialog();
            Close();
        }