-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfig.cs
51 lines (44 loc) · 1.63 KB
/
Config.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
49
50
51
using System;
using System.ComponentModel;
using System.Globalization;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace eQSL_Downloader
{
public partial class frmConfig : Form
{
public int sliderValue;
ComponentResourceManager rm;
public frmConfig(int SliderValue = 5, string lang = null)
{
if (!string.IsNullOrEmpty(lang))
{
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfoByIetfLanguageTag(lang);
}
else
{
Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;
}
InitializeComponent();
slider.Value = SliderValue;
rm = new ComponentResourceManager(this.GetType());
}
private void frmConfig_Load(object sender, EventArgs e)
{
lblSlider.Text = new StringBuilder().AppendFormat("{0} {1} {2}", rm.GetString("Config.Opoznienie_w_pobieraniu_eQSL"), slider.Value, rm.GetString("Config.Sekund")).ToString();
this.Text = rm.GetString("$this.Text");
btnOK.Text = rm.GetString("Config.btnOK.Text");
this.Show();
}
private void slider_Scroll(object sender, EventArgs e)
{
lblSlider.Text = new StringBuilder().AppendFormat("{0} {1} {2}", rm.GetString("Config.Opoznienie_w_pobieraniu_eQSL"), slider.Value, rm.GetString("Config.Sekund")).ToString();
}
private void btnOK_Click(object sender, EventArgs e)
{
sliderValue = slider.Value;
this.Close();
}
}
}