示例#1
0
        private void registrationReports_Load(object sender, EventArgs e)
        {
            yearsLoad();
            opd opd = new opd();

            opd.registrationStats();
            label4.Text                                  = opd.count;
            label6.Text                                  = opd.token;
            label9.Text                                  = opd.opdMax;
            dateTimePicker1.Format                       = DateTimePickerFormat.Custom;
            dateTimePicker1.CustomFormat                 = "dd MMM, yyyy";
            dateTimePicker1.Value                        = DateTime.Today;
            monthCalendar1.SelectionRange.Start          = DateTime.Today;
            printPreviewDialog1.PrintPreviewControl.Zoom = 1.0;
            ((Form)printPreviewDialog1).StartPosition    = FormStartPosition.CenterScreen;
            ((Form)printPreviewDialog1).Width            = 880;
            ((Form)printPreviewDialog1).Height           = 680;
            comboBox1.SelectedItem                       = DateTime.Today.Year.ToString();
            foreach (string printer in PrinterSettings.InstalledPrinters)
            {
                comboBox3.Items.Add(printer);
            }
            PrinterSettings settings = new PrinterSettings();

            comboBox3.SelectedItem = settings.PrinterName;
        }