root/Baza Reklam 2 - Faktury/ExportOptions.cs @ 21

Wersja 2, 1.1 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 ExportOptions : Form
12    {
13        public ExportOptions()
14        {
15            InitializeComponent();
16        }
17
18        public ExportOptions(List<string> availableFields)
19        {
20            InitializeComponent();
21
22            foreach (string field in availableFields)
23                     chklst.Items.Add(field, true);
24        }
25
26        private void btnOK_Click(object sender, EventArgs e)
27        {
28            this.DialogResult = DialogResult.OK;
29            this.Close();
30        }
31
32        private void btnCancel_Click(object sender, EventArgs e)
33        {
34            this.DialogResult = DialogResult.Cancel;
35            this.Close();
36        }
37
38        public List<string> GetSelectedColumns()
39        {
40            List<string> lst = new List<string>();
41            foreach (object item in chklst.CheckedItems)
42                lst.Add(item.ToString());
43            return lst;
44        }
45    }
46}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.