-
Notifications
You must be signed in to change notification settings - Fork 535
/
ConfigureTimestamp.cs
112 lines (97 loc) · 3.52 KB
/
ConfigureTimestamp.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
using System;
using System.Drawing;
using System.Windows.Forms;
using iSpyApplication.Controls;
namespace iSpyApplication
{
public partial class ConfigureTimestamp : Form
{
public int TimeStampLocation = 0;
public decimal Offset = 0;
public Color TimestampForeColor;
public Color TimestampBackColor;
public string TagsNV;
public bool TimestampShowBack;
public SerializableFont CustomFont;
public ConfigureTimestamp()
{
InitializeComponent();
RenderResources();
}
private void RenderResources()
{
Text = LocRm.GetString("Configure");
label1.Text = LocRm.GetString("Location");
label3.Text = LocRm.GetString("Offset");
label7.Text = LocRm.GetString("Font");
label2.Text = LocRm.GetString("ForeColor");
label6.Text = LocRm.GetString("BackColor");
button5.Text = LocRm.GetString("Edit");
chkTimestampBack.Text = LocRm.GetString("ShowBackground");
label5.Text = LocRm.GetString("Tags");
button1.Text = LocRm.GetString("OK");
}
private void ConfigureTimestamp_Load(object sender, EventArgs e)
{
ddlTimestampLocation.Items.AddRange(LocRm.GetString("TimeStampLocations").Split(','));
ddlTimestampLocation.SelectedIndex = TimeStampLocation;
numOffset.Value = Offset;
chkTimestampBack.Checked = TimestampShowBack;
}
private void button1_Click(object sender, EventArgs e)
{
TimeStampLocation = ddlTimestampLocation.SelectedIndex;
Offset = numOffset.Value;
TimestampShowBack = chkTimestampBack.Checked;
DialogResult = DialogResult.OK;
Close();
}
private void button3_Click(object sender, EventArgs e)
{
var cd = new ColorDialog { Color = TimestampBackColor, AllowFullOpen = true, SolidColorOnly = false };
if (cd.ShowDialog(this) == DialogResult.OK)
{
TimestampBackColor = cd.Color;
}
cd.Dispose();
}
private void button4_Click(object sender, EventArgs e)
{
var fd = new FontDialog {ShowColor = false, Font = CustomFont.FontValue,Color = TimestampForeColor, ShowEffects = true};
if (fd.ShowDialog() != DialogResult.Cancel)
{
CustomFont = new SerializableFont(fd.Font);
TimestampForeColor = fd.Color;
}
}
private void button2_Click(object sender, EventArgs e)
{
var cd = new ColorDialog { Color = TimestampForeColor, AllowFullOpen = true, SolidColorOnly = false };
if (cd.ShowDialog(this) == DialogResult.OK)
{
TimestampForeColor = cd.Color;
}
cd.Dispose();
}
private void button5_Click(object sender, EventArgs e)
{
}
private void button6_Click(object sender, EventArgs e)
{
using (TagConfigure tc = new TagConfigure {TagsNV = TagsNV, Owner = this})
{
if (tc.ShowDialog() == DialogResult.OK)
{
TagsNV = tc.TagsNV;
}
}
}
private void button5_Click_1(object sender, EventArgs e)
{
using (TagEditor te = new TagEditor())
{
te.ShowDialog(this);
}
}
}
}