-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmHRDLOG.cs
76 lines (65 loc) · 1.98 KB
/
frmHRDLOG.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
using SQ7MRU.Utils.eQSL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Threading;
using System.Windows.Forms;
namespace eQSL_Downloader
{
public partial class frmHRDLOG : Form
{
private string lang;
public string error, callsign;
public List<string> Urls;
ComponentResourceManager rm;
public frmHRDLOG(string Callsing, string lang = null)
{
if (!string.IsNullOrEmpty(lang))
{
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfoByIetfLanguageTag(lang);
}
else
{
Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;
}
callsign = Callsing;
Urls = new List<string>();
rm = new ComponentResourceManager(this.GetType());
InitializeComponent();
this.txtCallsign.KeyPress += new System.Windows.Forms.KeyPressEventHandler(CheckKeys);
}
private void CheckKeys(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
{
btnGO_Click(sender, e);
}
}
private void frmHRDLOG_Load(object sender, EventArgs e)
{
txtCallsign.Text = callsign;
btnGO.Text = rm.GetString("str_btnGO");
error = "";
}
private void btnGO_Click(object sender, EventArgs e)
{
try
{
btnGO.Enabled = false;
iQSLHRDLOG iqsl = new iQSLHRDLOG(txtCallsign.Text);
Urls = iqsl.GetUrls();
callsign= txtCallsign.Text;
}
catch (Exception exc)
{
error += exc.Message;
}
finally
{
btnGO.Enabled = true;
this.Close();
}
}
}
}