root/Baza Reklam 2 - Faktury/PrintOptions.cs @ 680

Wersja 65, 1.8 KB (wprowadzona przez dorota, 17 years temu)
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Text;
7using System.Windows.Forms;
8
9namespace Baza_Reklam
10{
11    public partial class PrintOptions : Form
12    {
13        public PrintOptions()
14        {
15            InitializeComponent();
16        }
17        public PrintOptions(List<string> availableFields)
18        {
19            InitializeComponent();
20
21            foreach (string field in availableFields)
22                     chklst.Items.Add(field, true);
23        }
24
25        private void PrintOtions_Load(object sender, EventArgs e)
26        {
27            // Initialize some controls
28            rdoAllRows.Checked = true;
29            chkFitToPageWidth.Checked = true;
30        }
31
32        private void btnOK_Click(object sender, EventArgs e)
33        {
34            this.DialogResult = DialogResult.OK;
35            this.Close();
36        }
37
38        private void btnCancel_Click(object sender, EventArgs e)
39        {
40            this.DialogResult = DialogResult.Cancel;
41            this.Close();
42        }
43
44        public List<string> GetSelectedColumns()
45        {
46            List<string> lst = new List<string>();
47            foreach (object item in chklst.CheckedItems)
48                    lst.Add(item.ToString());
49            return lst;
50        }
51
52        public string PrintTitle
53        {
54            get { return txtTitle.Text; }
55        }
56
57        public bool PrintAllRows
58        {
59            get { return rdoAllRows.Checked; }
60        }
61
62        public bool FitToPageWidth
63        {
64            get { return chkFitToPageWidth.Checked; }
65        }
66
67        public bool Landscape
68        {
69            get { return poziomaRadioButton.Checked; }
70        }
71
72    }
73}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.