Skip to content

Commit 7dc3fa7

Browse files
committed
Update version Net 6 -> Net 9
1 parent 580ef86 commit 7dc3fa7

6 files changed

Lines changed: 35 additions & 9 deletions

File tree

Bloxstrap/Bloxstrap.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net6.0-windows</TargetFramework>
5+
<TargetFramework>net9.0-windows</TargetFramework>
66
<Nullable>enable</Nullable>
77
<UseWPF>true</UseWPF>
88
<UseWindowsForms>True</UseWindowsForms>
99
<ApplicationIcon>BoneFish.ico</ApplicationIcon>
10-
<Version>3.2.0</Version>
11-
<FileVersion>3.2.0</FileVersion>
10+
<Version>3.2.2</Version>
11+
<FileVersion>3.2.2</FileVersion>
1212
<ApplicationManifest>app.manifest</ApplicationManifest>
1313
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1414
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>

Bloxstrap/Integrations/WindowManipulation.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public void FakeBorderless()
4646
style &= ~WS_MAXIMIZEBOX;
4747
style &= ~WS_SYSMENU;
4848

49-
Rectangle resolution = Screen.PrimaryScreen.Bounds;
49+
var screen = Screen.PrimaryScreen;
50+
Rectangle resolution = screen?.Bounds ?? Rectangle.Empty;
5051

5152
PInvoke.SetWindowLong((HWND)_hWnd, (WINDOW_LONG_PTR_INDEX)GWLSTYLE, style);
5253

@@ -63,7 +64,8 @@ public void ApplyWindowModifications()
6364

6465
App.Logger.WriteLine(LOG_IDENT, "Applying window modifications");
6566

66-
_setTitleHook = new(SetWindowTitleHook);
67+
var setTitleHook = new WINEVENTPROC(SetWindowTitleHook);
68+
_setTitleHook = setTitleHook;
6769

6870
// icon
6971
App.Logger.WriteLine(LOG_IDENT, "Setting Roblox icon");
@@ -84,7 +86,7 @@ public void ApplyWindowModifications()
8486
PInvoke.SetWindowText(_hWnd, robloxTitle);
8587

8688
// because (Internal) exists Roblox will reset the title after couple of seconds
87-
App.Current.Dispatcher.Invoke(() => PInvoke.SetWinEventHook(EVENT_OBJECT_NAMECHANGE, EVENT_OBJECT_NAMECHANGE, null, _setTitleHook, _robloxPID, 0, WINEVENT_OUTOFCONTEXT));
89+
App.Current.Dispatcher.Invoke(() => PInvoke.SetWinEventHook(EVENT_OBJECT_NAMECHANGE, EVENT_OBJECT_NAMECHANGE, null, setTitleHook, _robloxPID, 0, WINEVENT_OUTOFCONTEXT));
8890
}
8991
}
9092

Bloxstrap/UI/Elements/Bootstrapper/Base/WinFormsDialogBase.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Windows.Forms;
1+
using System.ComponentModel;
2+
using System.Windows.Forms;
23
using System.Windows.Shell;
34

45
using Bloxstrap.UI.Utility;
@@ -9,6 +10,8 @@ public class WinFormsDialogBase : Form, IBootstrapperDialog
910
{
1011
public const int TaskbarProgressMaximum = 100;
1112

13+
[Browsable(false)]
14+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
1215
public Bloxstrap.Bootstrapper? Bootstrapper { get; set; }
1316

1417
private bool _isClosing;
@@ -22,6 +25,8 @@ public class WinFormsDialogBase : Form, IBootstrapperDialog
2225
protected virtual double _taskbarProgressValue { get; set; }
2326
protected virtual bool _cancelEnabled { get; set; }
2427

28+
[Browsable(false)]
29+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
2530
public string Message
2631
{
2732
get => _message;
@@ -34,6 +39,8 @@ public string Message
3439
}
3540
}
3641

42+
[Browsable(false)]
43+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
3744
public ProgressBarStyle ProgressStyle
3845
{
3946
get => _progressStyle;
@@ -46,6 +53,8 @@ public ProgressBarStyle ProgressStyle
4653
}
4754
}
4855

56+
[Browsable(false)]
57+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
4958
public int ProgressMaximum
5059
{
5160
get => _progressMaximum;
@@ -58,6 +67,8 @@ public int ProgressMaximum
5867
}
5968
}
6069

70+
[Browsable(false)]
71+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
6172
public int ProgressValue
6273
{
6374
get => _progressValue;
@@ -70,6 +81,8 @@ public int ProgressValue
7081
}
7182
}
7283

84+
[Browsable(false)]
85+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
7386
public TaskbarItemProgressState TaskbarProgressState
7487
{
7588
get => _taskbarProgressState;
@@ -80,6 +93,8 @@ public TaskbarItemProgressState TaskbarProgressState
8093
}
8194
}
8295

96+
[Browsable(false)]
97+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
8398
public double TaskbarProgressValue
8499
{
85100
get => _taskbarProgressValue;
@@ -90,6 +105,8 @@ public double TaskbarProgressValue
90105
}
91106
}
92107

108+
[Browsable(false)]
109+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
93110
public bool CancelEnabled
94111
{
95112
get => _cancelEnabled;

Bloxstrap/UI/Utility/WindowScaling.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ namespace Bloxstrap.UI.Utility
55
{
66
public static class WindowScaling
77
{
8-
public static double ScaleFactor => Screen.PrimaryScreen.Bounds.Width / SystemParameters.PrimaryScreenWidth;
8+
public static double ScaleFactor
9+
{
10+
get
11+
{
12+
var screen = Screen.PrimaryScreen;
13+
return (screen?.Bounds.Width ?? SystemParameters.PrimaryScreenWidth) / SystemParameters.PrimaryScreenWidth;
14+
}
15+
}
916

1017
public static int GetScaledNumber(int number)
1118
{

Images/BoneFish.ico

9.38 KB
Binary file not shown.

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "6.0.0",
3+
"version": "9.0.100",
44
"rollForward": "latestMajor"
55
}
66
}

0 commit comments

Comments
 (0)