-
Notifications
You must be signed in to change notification settings - Fork 2
/
TransparencyForm.cs
44 lines (37 loc) · 1.09 KB
/
TransparencyForm.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
using OnTopper.Properties;
using System;
using System.Globalization;
using System.Threading;
using System.Windows.Forms;
namespace OnTopper
{
public partial class TransparencyForm : Form
{
public ushort Previous = 100;
public ushort Current = 100;
public TransparencyForm()
{
Thread.CurrentThread.CurrentUICulture = new CultureInfo(Settings.Default.LanguageAbbreviation.ToLower());
InitializeComponent();
}
public void ShowDialogWithTopMostState(bool topMost)
{
TopMost = topMost;
ShowDialog();
}
private void TrackBar_Scroll(object sender, EventArgs e)
{
numericUpDown.Value = trackBar.Value;
}
private void NumericUpDown_ValueChanged(object sender, EventArgs e)
{
trackBar.Value = (int)numericUpDown.Value;
}
private void ButtonApply_Click(object sender, EventArgs e)
{
Previous = Current;
Current = (ushort)trackBar.Value;
Close();
}
}
}