Skip to content

Commit e8f40a9

Browse files
committed
nuget dependencies fix
1 parent 3f7ecd3 commit e8f40a9

6 files changed

Lines changed: 33 additions & 147 deletions

File tree

LibTest/LibTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
88
</PropertyGroup>
99
<ItemGroup>
10-
<PackageReference Include="OpenHardwareMonitorLib" Version="1.0.9300" />
10+
<PackageReference Include="OpenHardwareMonitorLib" Version="1.*" />
1111
</ItemGroup>
1212
</Project>

OpenHardwareMonitor/OpenHardwareMonitor.csproj

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<DebugType>none</DebugType>
2222
</PropertyGroup>
2323
<ItemGroup>
24+
<PackageReference Include="sergiye.Common.UI" Version="1.*" />
2425
<PackageReference Include="Costura.Fody" Version="4.1.0">
2526
<PrivateAssets>all</PrivateAssets>
2627
</PackageReference>
@@ -81,19 +82,6 @@
8182
</ItemGroup>
8283
<ItemGroup>
8384
<EmbeddedResource Include="Resources\**" />
84-
<Compile Include="..\..\common\sergiye.Common\SerializerHelper.cs" Link="common\SerializerHelper.cs" />
85-
<Compile Include="..\..\common\sergiye.Common\Updater.cs" Link="common\Updater.cs" />
86-
<Compile Include="..\..\common\sergiye.Common\Crasher.cs" Link="common\Crasher.cs" />
87-
<Compile Include="..\..\common\sergiye.Common\WinApiHelper.cs" Link="common\WinApiHelper.cs" />
88-
<Compile Include="..\..\common\sergiye.Common.UI\PersistentSettings.cs" Link="common\PersistentSettings.cs" />
89-
<Compile Include="..\..\common\sergiye.Common.UI\Themes\CustomTheme.cs" Link="common\Themes\CustomTheme.cs" />
90-
<Compile Include="..\..\common\sergiye.Common.UI\Themes\DarkTheme.cs" Link="common\Themes\DarkTheme.cs" />
91-
<Compile Include="..\..\common\sergiye.Common.UI\Themes\LightTheme.cs" Link="common\Themes\LightTheme.cs" />
92-
<Compile Include="..\..\common\sergiye.Common.UI\Themes\Theme.cs" Link="common\Themes\Theme.cs" />
93-
<Compile Include="..\..\common\sergiye.Common.UI\Themes\ThemedHScrollIndicator.cs" Link="common\Themes\ThemedHScrollIndicator.cs" />
94-
<Compile Include="..\..\common\sergiye.Common.UI\Themes\ThemedToolStripRenderer.cs" Link="common\Themes\ThemedToolStripRenderer.cs" />
95-
<Compile Include="..\..\common\sergiye.Common.UI\Themes\ThemedVScrollIndicator.cs" Link="common\Themes\ThemedVScrollIndicator.cs" />
96-
<Compile Include="..\..\common\sergiye.Common.UI\ToolStripRadioButtonMenuItem.cs" Link="common\ToolStripRadioButtonMenuItem.cs" />
9785
<None Include="Resources\app.manifest" />
9886
<None Include="Resources\icon.ico" />
9987
</ItemGroup>

OpenHardwareMonitor/UI/MainForm.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using OpenHardwareMonitor.Hardware.Storage;
1212
using OpenHardwareMonitor.Utilities;
1313
using OpenHardwareMonitor.WMI;
14+
using Logger = OpenHardwareMonitor.Utilities.Logger;
1415

1516
namespace OpenHardwareMonitor.UI;
1617

OpenHardwareMonitor/UI/SplitContainerAdv.cs

Lines changed: 0 additions & 114 deletions
This file was deleted.

OpenHardwareMonitor/UI/TreeViewAdvThemeExtender.cs

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ namespace OpenHardwareMonitor.UI
66
{
77
internal static class TreeViewAdvThemeExtender
88
{
9+
private static Brush BackgroundBrush;
10+
private static Brush SelectedBackBrush;
11+
private static Pen ForegroundPen;
12+
private static Pen LinePen;
13+
914
internal static void SubscribeToThemes()
1015
{
1116
Theme.OnCurrentChanged += () => { AssignRendersTheme(); };
@@ -23,17 +28,26 @@ internal static void SubscribeToThemes()
2328

2429
internal static void AssignRendersTheme()
2530
{
31+
BackgroundBrush?.Dispose();
32+
BackgroundBrush = new SolidBrush(Theme.Current.BackgroundColor);
33+
SelectedBackBrush?.Dispose();
34+
SelectedBackBrush = new SolidBrush(Theme.Current.SelectedBackgroundColor);
35+
ForegroundPen?.Dispose();
36+
ForegroundPen = new Pen(Theme.Current.ForegroundColor);
37+
LinePen?.Dispose();
38+
LinePen = new Pen(Theme.Current.LineColor);
39+
2640
TreeViewAdv.CustomPlusMinusRenderFunc = (g, rect, isExpanded) =>
2741
{
2842
int x = rect.Left;
2943
int y = rect.Top + 5;
3044
int size = 8;
31-
g.FillRectangle(Theme.BackgroundBrush, x - 1, y - 1, size + 4, size + 4);
32-
g.DrawRectangle(Theme.ForegroundPen, x, y, size, size);
33-
g.DrawLine(Theme.ForegroundPen, x + 2, y + size / 2, x + size - 2, y + size / 2);
45+
g.FillRectangle(BackgroundBrush, x - 1, y - 1, size + 4, size + 4);
46+
g.DrawRectangle(ForegroundPen, x, y, size, size);
47+
g.DrawLine(ForegroundPen, x + 2, y + size / 2, x + size - 2, y + size / 2);
3448
if (!isExpanded)
3549
{
36-
g.DrawLine(Theme.ForegroundPen, x + size / 2, y + 2, x + size / 2, y + size - 2);
50+
g.DrawLine(ForegroundPen, x + size / 2, y + 2, x + size / 2, y + size - 2);
3751
}
3852
};
3953

@@ -42,33 +56,33 @@ internal static void AssignRendersTheme()
4256
int x = rect.Left;
4357
int y = rect.Top + 1;
4458
int size = 12;
45-
g.FillRectangle(Theme.BackgroundBrush, x - 1, y - 1, 12, 12);
46-
g.DrawRectangle(Theme.ForegroundPen, x, y, size, size);
59+
g.FillRectangle(BackgroundBrush, x - 1, y - 1, 12, 12);
60+
g.DrawRectangle(ForegroundPen, x, y, size, size);
4761
if (isChecked)
4862
{
4963
x += 3;
5064
y += 3;
51-
g.DrawLine(Theme.ForegroundPen, x, y + 3, x + 2, y + 5);
52-
g.DrawLine(Theme.ForegroundPen, x + 2, y + 5, x + 6, y + 1);
53-
g.DrawLine(Theme.ForegroundPen, x, y + 4, x + 2, y + 6);
54-
g.DrawLine(Theme.ForegroundPen, x + 2, y + 6, x + 6, y + 2);
65+
g.DrawLine(ForegroundPen, x, y + 3, x + 2, y + 5);
66+
g.DrawLine(ForegroundPen, x + 2, y + 5, x + 6, y + 1);
67+
g.DrawLine(ForegroundPen, x, y + 4, x + 2, y + 6);
68+
g.DrawLine(ForegroundPen, x + 2, y + 6, x + 6, y + 2);
5569
}
5670
};
5771

5872
TreeViewAdv.CustomColumnBackgroundRenderFunc = (g, rect, isPressed, isHot) =>
5973
{
60-
g.FillRectangle(Theme.BackgroundBrush, rect);
61-
g.DrawLine(Theme.LinePen, rect.Left, rect.Top, rect.Right, rect.Top);
62-
g.DrawLine(Theme.LinePen, rect.Left, rect.Top + 1, rect.Right, rect.Top + 1);
74+
g.FillRectangle(BackgroundBrush, rect);
75+
g.DrawLine(LinePen, rect.Left, rect.Top, rect.Right, rect.Top);
76+
g.DrawLine(LinePen, rect.Left, rect.Top + 1, rect.Right, rect.Top + 1);
6377
};
6478

6579
TreeViewAdv.CustomColumnTextRenderFunc = (g, rect, font, text) =>
6680
{
6781
TextRenderer.DrawText(g, text, font, rect, Theme.Current.ForegroundColor, TextFormatFlags.Left);
6882
};
6983

70-
TreeViewAdv.CustomHorizontalLinePen = Theme.LinePen;
71-
TreeViewAdv.CustomSelectedRowBrush = Theme.SelectedBackBrush;
84+
TreeViewAdv.CustomHorizontalLinePen = LinePen;
85+
TreeViewAdv.CustomSelectedRowBrush = SelectedBackBrush;
7286
TreeViewAdv.CustomSelectedTextColor = Theme.Current.SelectedForegroundColor;
7387
}
7488
}

OpenHardwareMonitorLib/OpenHardwareMonitorLib.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939
<PropertyGroup Condition="'$(Configuration)'=='Release'">
4040
<OutputPath>..\bin\</OutputPath>
4141
</PropertyGroup>
42-
<ItemGroup>
43-
<Compile Include="..\..\common\sergiye.Common\ISettings.cs" Link="common\ISettings.cs" />
44-
<Compile Include="..\..\common\sergiye.Common\OperatingSystemHelper.cs" Link="common\OperatingSystemHelper.cs" />
45-
</ItemGroup>
4642
<ItemGroup>
4743
<None Include="packageicon.png" Pack="true" PackagePath="" />
4844
<None Include="..\README.md" Pack="true" PackagePath="\" />
@@ -59,6 +55,7 @@
5955
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
6056
<PackageReference Include="System.Management" Version="9.0.6" />
6157
<PackageReference Include="RAMSPDToolkit-NDD" Version="1.1.4" />
58+
<PackageReference Include="sergiye.Common" Version="1.*" />
6259
</ItemGroup>
6360
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
6461
</ItemGroup>

0 commit comments

Comments
 (0)