Skip to content

Commit

Permalink
increment fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickiel committed Oct 12, 2021
1 parent 2db5897 commit 75b63e7
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 53 deletions.
24 changes: 24 additions & 0 deletions src/VolumeScroller.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,37 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Debug|ARM.ActiveCfg = Debug|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Debug|ARM.Build.0 = Debug|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Debug|ARM64.Build.0 = Debug|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Debug|x64.ActiveCfg = Debug|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Debug|x64.Build.0 = Debug|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Debug|x86.ActiveCfg = Debug|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Debug|x86.Build.0 = Debug|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Release|Any CPU.Build.0 = Release|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Release|ARM.ActiveCfg = Release|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Release|ARM.Build.0 = Release|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Release|ARM64.ActiveCfg = Release|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Release|ARM64.Build.0 = Release|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Release|x64.ActiveCfg = Release|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Release|x64.Build.0 = Release|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Release|x86.ActiveCfg = Release|Any CPU
{1A918D94-2022-4AF6-8E2C-78AFA152524F}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
4 changes: 2 additions & 2 deletions src/VolumeScroller/MainModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public MainModel()
{
}

public static bool DarkTaskbar
public bool DarkTaskbar
{
get => Properties.Settings.Default.DarkTaskbar;
set
Expand All @@ -23,7 +23,7 @@ public static bool DarkTaskbar
}
}

public static int Increment
public int Increment
{
get => Properties.Settings.Default.Increment;
set
Expand Down
10 changes: 6 additions & 4 deletions src/VolumeScroller/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public class MainViewModel : ViewModelBase
public MainViewModel(MainModel mainModel)
{
this.mainModel = mainModel;
darkTaskbar = mainModel.DarkTaskbar;
increment = mainModel.Increment * 2;
}

public string TaskBarIconPath
Expand All @@ -25,22 +27,22 @@ public string TaskBarIconPath

public bool DarkTaskbar
{
get => MainModel.DarkTaskbar;
get => darkTaskbar;
set
{
SetProperty(ref darkTaskbar, value);
MainModel.DarkTaskbar = value;
mainModel.DarkTaskbar = value;
OnPropertyChanged(nameof(TaskBarIconPath));
}
}

public int Increment
{
get => MainModel.Increment * 2;
get => increment;
set
{
SetProperty(ref increment, value);
MainModel.Increment = value / 2;
mainModel.Increment = value / 2;
}
}
}
Expand Down
94 changes: 47 additions & 47 deletions src/VolumeScroller/VolumeScroller.csproj
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
<ApplicationIcon>Resources\VolumeScroller_light_ApplicationIcon.ico</ApplicationIcon>
</PropertyGroup>

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon>Resources\VolumeScroller_light_ApplicationIcon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="1.1.0" />
<PackageReference Include="Ikst.MouseHook" Version="1.0.0" />
<PackageReference Include="System.Management" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<Page Include="App.xaml" />
</ItemGroup>

<ItemGroup>
<Resource Include="Resources\VolumeScroller_dark.ico" />
<Resource Include="Resources\VolumeScroller_light.ico" />
<Resource Include="Resources\VolumeScroller_light_ApplicationIcon.ico" />
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="1.1.0" />
<PackageReference Include="Ikst.MouseHook" Version="1.0.0" />
<PackageReference Include="System.Management" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<Page Include="App.xaml" />
</ItemGroup>

<ItemGroup>
<Resource Include="Resources\VolumeScroller_dark.ico" />
<Resource Include="Resources\VolumeScroller_light.ico" />
<Resource Include="Resources\VolumeScroller_light_ApplicationIcon.ico" />
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>PublicSettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>PublicSettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
</Project>

0 comments on commit 75b63e7

Please sign in to comment.