Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 16a8b07

Browse files
author
skver0
committed
Fixed resolution change disorientation
1 parent 51023ad commit 16a8b07

File tree

2 files changed

+39
-16
lines changed

2 files changed

+39
-16
lines changed

Main.Designer.cs

Lines changed: 24 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Main.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,14 @@ private void t1_Tick(object sender, EventArgs e)
212212

213213
if (File.Exists(appdata + "/x1top"))
214214
{
215+
Width = Screen.PrimaryScreen.Bounds.Width;
215216
Location = new Point(0, 0);
216217
}
217218
else
218219
{
219220
if (!File.Exists(appdata + "/x1left"))
220221
{
222+
Width = Screen.PrimaryScreen.Bounds.Width;
221223
var ScreenHeight = Screen.PrimaryScreen.Bounds.Height;
222224
Location = new Point(0, ScreenHeight - 40);
223225
}
@@ -310,7 +312,12 @@ private void btry_MouseHover(object sender, EventArgs e)
310312
ttp.Show(battery.BatteryLifePercent.ToString("P0"), btry);
311313
}
312314

313-
private void label2_Click(object sender, EventArgs e)
315+
private void time_DoubleClick(object sender, EventArgs e)
316+
{
317+
Process.Start("timedate.cpl");
318+
}
319+
320+
private void startbutton_Click(object sender, EventArgs e)
314321
{
315322
byte ctrl = 17;
316323
byte esc = 27;
@@ -320,9 +327,14 @@ private void label2_Click(object sender, EventArgs e)
320327
keybd_event(esc, 0, 2, 0);
321328
}
322329

323-
private void time_DoubleClick(object sender, EventArgs e)
330+
private void x1logo_Click(object sender, EventArgs e)
324331
{
325-
Process.Start("timedate.cpl");
332+
byte ctrl = 17;
333+
byte esc = 27;
334+
keybd_event(ctrl, 0, 0, 0);
335+
keybd_event(esc, 0, 0, 0);
336+
keybd_event(ctrl, 0, 2, 0);
337+
keybd_event(esc, 0, 2, 0);
326338
}
327339
}
328340
}

0 commit comments

Comments
 (0)