-
Notifications
You must be signed in to change notification settings - Fork 0
/
QRZDetailForm.cs
70 lines (58 loc) · 1.73 KB
/
QRZDetailForm.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
using System.Linq;
using System.Windows.Forms;
using W6OP.CallParser;
namespace W6OP
{
public partial class QRZDetailForm : Form
{
private readonly Hit hit;
public QRZDetailForm(Hit prefixData)
{
hit = prefixData;
InitializeComponent();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void QRZDetailForm_Load(object sender, System.EventArgs e)
{
UpdateDisplayPanel();
}
/// <summary>
///
/// </summary>
private void UpdateDisplayPanel()
{
ClearAllLabels();
LabelCall.Text = hit.CallSign;
LabelName.Text = hit.FirstName + " " + hit.LastName;
LabelCountry.Text = hit.Country;
LabelProvince.Text = hit.Province;
LabelCounty.Text = hit.County;
LabelLatitude.Text = hit.Latitude;
LabelLongitude.Text = hit.Longitude;
LabelGrid.Text = hit.Grid;
if (hit.CQ.Count > 0)
{
LabelCQZone.Text = "CQ Zone: " + hit.CQ.First().ToString();
}
if (hit.ITU.Count > 0)
{
LabelITUZone.Text = "ITU Zone: " + hit.ITU.First().ToString();
}
LabelLotw.Text = hit.LotW ? "LoTW: Yes" : "LoTW: No";
}
/// <summary>
/// Clear all the labels on the QRZ display panel.
/// </summary>
private void ClearAllLabels()
{
foreach (Label label in PanelQRZDisplay.Controls)
{
label.Text = "";
}
}
} // end class
}