Skip to content

Commit

Permalink
code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiye committed Nov 16, 2024
1 parent 086750e commit 650f7a1
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 38 deletions.
9 changes: 5 additions & 4 deletions Aga.Controls/Tree/TreeViewAdv.cs
Original file line number Diff line number Diff line change
Expand Up @@ -796,25 +796,26 @@ internal void SetIsExpanded(TreeNodeAdv node, bool value, bool ignoreChildren, b
eargs.Node = node;
eargs.Value = value;
eargs.IgnoreChildren = ignoreChildren;
eargs.ChangedByUser = byUser;

if (AsyncExpanding && LoadOnDemand && !_threadPool.IsMyThread(Thread.CurrentThread))
{
WaitCallback wc = delegate(object argument) { SetIsExpanded((ExpandArgs)argument, byUser); };
WaitCallback wc = delegate(object argument) { SetIsExpanded((ExpandArgs)argument); };
_threadPool.QueueUserWorkItem(wc, eargs);
}
else
SetIsExpanded(eargs, byUser);
SetIsExpanded(eargs);
}

private void SetIsExpanded(ExpandArgs eargs, bool byUser)
private void SetIsExpanded(ExpandArgs eargs)
{
bool update = !eargs.IgnoreChildren && !AsyncExpanding;
if (update)
BeginUpdate();
try
{
if (IsMyNode(eargs.Node) && eargs.Node.IsExpanded != eargs.Value)
SetIsExpanded(eargs.Node, eargs.Value, byUser);
SetIsExpanded(eargs.Node, eargs.Value, eargs.ChangedByUser);

if (!eargs.IgnoreChildren)
SetIsExpandedRecursive(eargs.Node, eargs.Value);
Expand Down
12 changes: 0 additions & 12 deletions HidSharp/HidSharp.NETStandard.csproj

This file was deleted.

23 changes: 9 additions & 14 deletions HidSharp/HidSharp.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Library</OutputType>
<TargetFramework>net472</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>..\bin\</OutputPath>
<Company>Illusory Studios LLC</Company>
<Copyright>Copyright © 2010-2019 James F. Bellinger &lt;http://www.zer7.com/software/hidsharp&gt;</Copyright>
<Description>C# HID wrappers</Description>
<Product>HidSharp</Product>
<AssemblyTitle>HidSharp</AssemblyTitle>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
<FileVersion>2.1.0.0</FileVersion>
<InformationalVersion>2.1.0</InformationalVersion>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyName>HidSharp</AssemblyName>
<RootNamespace>HidSharp</RootNamespace>
<OutputPath>..\bin</OutputPath>
</PropertyGroup>
</Project>

</Project>
5 changes: 0 additions & 5 deletions HidSharp/Platform/Libusb/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ public enum TransferType : byte
Interrupt
}

public struct Version
{
public ushort Major, Minor, Micro, Nano;
}

public enum Error
{
None = 0,
Expand Down
2 changes: 1 addition & 1 deletion OpenHardwareMonitor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HidSharp.NETStandard", "HidSharp\HidSharp.NETStandard.csproj", "{9CE1E1E2-8F82-4170-92B2-0F7F8A66F4E8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HidSharp", "HidSharp\HidSharp.csproj", "{9CE1E1E2-8F82-4170-92B2-0F7F8A66F4E8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 2 additions & 0 deletions OpenHardwareMonitor/UI/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public sealed partial class MainForm : Form
private readonly UnitManager _unitManager;
private readonly UpdateVisitor _updateVisitor = new();
private readonly WmiProvider _wmiProvider;
#if DEBUG
private readonly Timer _checkUpdatesTimer;
#endif

private int _delayCount;
private bool _selectionDragging;
Expand Down
4 changes: 2 additions & 2 deletions OpenHardwareMonitorLib/OpenHardwareMonitorLib.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472</TargetFrameworks>
<TargetFramework>net472</TargetFramework>
<AssemblyName>OpenHardwareMonitorLib</AssemblyName>
<RootNamespace>OpenHardwareMonitor</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down Expand Up @@ -38,7 +38,7 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HidSharp\HidSharp.NETStandard.csproj" />
<ProjectReference Include="..\HidSharp\HidSharp.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Management" />
Expand Down

0 comments on commit 650f7a1

Please sign in to comment.