Skip to content

Commit

Permalink
Made UpdateNotifier responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
Stelusteee committed Nov 13, 2024
1 parent 088cf22 commit 9c76fab
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 23 deletions.
Binary file modified .vs/BombTimer/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file modified .vs/BombTimer/v17/.futdcache.v2
Binary file not shown.
Binary file modified .vs/BombTimer/v17/.suo
Binary file not shown.
43 changes: 21 additions & 22 deletions .vs/BombTimer/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
"RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\wnd.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|C:\\Users\\stelu\\source\\repos\\BombTimer\\bombtimer\\updatenotifier.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
"RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\updatenotifier.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
"AbsoluteMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|c:\\users\\stelu\\source\\repos\\bombtimer\\bombtimer\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|c:\\users\\stelu\\source\\repos\\bombtimer\\bombtimer\\updatenotifier.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\updatenotifier.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
"AbsoluteMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|c:\\users\\stelu\\source\\repos\\bombtimer\\bombtimer\\updatenotifier.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\updatenotifier.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|c:\\users\\stelu\\source\\repos\\bombtimer\\bombtimer\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
"AbsoluteMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|c:\\users\\stelu\\source\\repos\\bombtimer\\bombtimer\\updatenotifier.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\updatenotifier.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|c:\\users\\stelu\\source\\repos\\bombtimer\\bombtimer\\countdowntimer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
Expand All @@ -42,28 +42,27 @@
},
{
"$type": "Document",
"DocumentIndex": 2,
"DocumentIndex": 3,
"Title": "UpdateNotifier.cs",
"DocumentMoniker": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\UpdateNotifier.cs",
"RelativeDocumentMoniker": "BombTimer\\UpdateNotifier.cs",
"ToolTip": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\UpdateNotifier.cs",
"RelativeToolTip": "BombTimer\\UpdateNotifier.cs",
"ViewState": "AgIAAAMAAAAAAAAAAAAAAA0AAAAUAAAAAAAAAA==",
"ViewState": "AgIAAAMAAAAAAAAAAAAAAA4AAABzAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-13T10:14:44.198Z",
"EditorCaption": ""
"WhenOpened": "2024-11-13T13:40:21.011Z"
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "UpdateNotifier.cs [Design]",
"DocumentMoniker": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\UpdateNotifier.cs",
"RelativeDocumentMoniker": "BombTimer\\UpdateNotifier.cs",
"ToolTip": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\UpdateNotifier.cs [Design]",
"RelativeToolTip": "BombTimer\\UpdateNotifier.cs [Design]",
"DocumentIndex": 2,
"Title": "UpdateNotifier.Designer.cs",
"DocumentMoniker": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\UpdateNotifier.Designer.cs",
"RelativeDocumentMoniker": "BombTimer\\UpdateNotifier.Designer.cs",
"ToolTip": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\UpdateNotifier.Designer.cs",
"RelativeToolTip": "BombTimer\\UpdateNotifier.Designer.cs",
"ViewState": "AgIAADoAAAAAAAAAAAAAAEkAAAAuAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-13T09:01:51.18Z",
"EditorCaption": " [Design]"
"WhenOpened": "2024-11-13T13:53:19.208Z"
},
{
"$type": "Document",
Expand All @@ -73,20 +72,20 @@
"RelativeDocumentMoniker": "BombTimer\\Wnd.cs",
"ToolTip": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\Wnd.cs",
"RelativeToolTip": "BombTimer\\Wnd.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAA==",
"ViewState": "AgIAAAYAAAAAAAAAAAAAAAsAAAApAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-10T12:59:25.274Z",
"WhenOpened": "2024-11-13T17:17:34.604Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"DocumentIndex": 1,
"Title": "Program.cs",
"DocumentMoniker": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\Program.cs",
"RelativeDocumentMoniker": "BombTimer\\Program.cs",
"ToolTip": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\Program.cs",
"RelativeToolTip": "BombTimer\\Program.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAAAOAAAAAAAAAA==",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAUAAAAWAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-10T12:57:59.784Z"
},
Expand Down
15 changes: 15 additions & 0 deletions BombTimer/UpdateNotifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ public partial class UpdateNotifier : Form
public UpdateNotifier()
{
InitializeComponent();

float dpiScale = 144f / DeviceDpi;
PointF scaleFactor = new PointF((float)Width / 500, (float)Height / 200);

label1.Location = new Point((int)(12 * scaleFactor.X), (int)(9 * scaleFactor.Y));
label1.Font = new Font("Arial", 10F * dpiScale * scaleFactor.X, FontStyle.Bold, GraphicsUnit.Point, 0);

label2.Location = new Point((int)(51 * scaleFactor.X), (int)(88 * scaleFactor.Y));
label2.Font = new Font("Arial", 10F * dpiScale * scaleFactor.X, FontStyle.Regular, GraphicsUnit.Point, 0);

declineBtn.Location = new Point((int)(12 * scaleFactor.X), (int)(154 * scaleFactor.Y));
declineBtn.Font = new Font("Arial", 10F * dpiScale * scaleFactor.X, FontStyle.Regular, GraphicsUnit.Point, 0);

updateBtn.Location = new Point((int)(376 * scaleFactor.X), (int)(154 * scaleFactor.Y));
updateBtn.Font = new Font("Arial", 10F * dpiScale * scaleFactor.X, FontStyle.Regular, GraphicsUnit.Point, 0);
}

private void declineBtn_Click(object sender, EventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion BombTimer/Wnd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public partial class Wnd : Form
{
UpdateNotifier updateNotifier = new UpdateNotifier();

string currentVersion = "v1.2.5";
string currentVersion = "v1.2.6";
string workspaceName = "Stelusteee";
string repositoryName = "BombTimer";
public async void CheckForUpdate()
Expand Down

0 comments on commit 9c76fab

Please sign in to comment.