-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmSettings.cs
48 lines (40 loc) · 1.4 KB
/
frmSettings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Ortoped.HelpClasses;
namespace Ortoped
{
public partial class frmSettings : Form
{
HandleConfig hc = new HandleConfig();
HandleConfig.Company company;
public frmSettings()
{
InitializeComponent();
}
private void frmSettings_Load(object sender, EventArgs e)
{
System.Configuration.UserScopedSettingAttribute userAttr = new System.Configuration.UserScopedSettingAttribute();
System.ComponentModel.AttributeCollection attrs = new System.ComponentModel.AttributeCollection(userAttr);
propertyGrid1.BrowsableAttributes = attrs;
propertyGrid1.SelectedObject = Properties.Settings.Default;
cboCompany.Items.AddRange(hc.getAllCompanies());
}
private void button1_Click(object sender, EventArgs e)
{
Properties.Settings.Default.Save();
}
private void cboCompany_SelectedIndexChanged(object sender, EventArgs e)
{
company = hc.getCompany(cboCompany.Text.Substring(0, 3));
txtDiagFile.Text = company.DiagFile;
chkAlwaysCapital.Checked = company.AlwaysCapitalLetters;
chkShowDetails.Checked = company.ShowDetails;
chkShowProductGroups.Checked = company.EA_UseProductGroups;
}
}
}