Skip to content

Commit

Permalink
⚫ Dark Theme! | Window Settings & Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robiot committed Aug 4, 2021
1 parent 3b41fee commit 61617a3
Show file tree
Hide file tree
Showing 15 changed files with 795 additions and 1,038 deletions.
21 changes: 21 additions & 0 deletions Alphaclicker/AlphaClicker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,19 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="WindowSettings.xaml.cs">
<DependentUpon>WindowSettings.xaml</DependentUpon>
</Compile>
<Compile Include="GetCursorPos.xaml.cs">
<DependentUpon>GetCursorPos.xaml</DependentUpon>
</Compile>
<Compile Include="Registry.cs" />
<Compile Include="Themes\ThemesController.cs" />
<Compile Include="WinApi.cs" />
<Page Include="WindowSettings.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="GetCursorPos.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand All @@ -87,6 +95,18 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Templates\Templates.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\DarkTheme.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\LightTheme.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
Expand Down Expand Up @@ -117,5 +137,6 @@
<ItemGroup>
<Resource Include="icon.ico" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
10 changes: 8 additions & 2 deletions Alphaclicker/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:AlphaClicker"
StartupUri="MainWindow.xaml">

<Application.Resources>

<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes/LightTheme.xaml"/>
<ResourceDictionary Source="Templates/Templates.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
</Application>
344 changes: 13 additions & 331 deletions Alphaclicker/ChangeHotkey.xaml

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions Alphaclicker/ChangeHotkey.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ private string CodeToSpecialKey(int key)
private int key2 = -1;
private void hotkeyWindow_PreviewKeyDown(object sender, KeyEventArgs e)
{
// Not good way of doing it, but it works.
if (keyBox.Text == "Press Keys")
{
keyBox.Clear();
}

if (!startBtn.IsEnabled)
{
for (int i = 8; i < 123; i++)
Expand Down Expand Up @@ -109,7 +115,7 @@ private void startBtn_Click(object sender, RoutedEventArgs e)
okBtn.IsEnabled = false;
hasSpecKey = false;
startBtn.IsEnabled = false;
keyBox.Clear();
keyBox.Text = "Press Keys";
}

private void okBtn_Click(object sender, RoutedEventArgs e)
Expand All @@ -131,7 +137,6 @@ private void cancelBtn_Click(object sender, RoutedEventArgs e)
private void hotkeyWindow_Loaded(object sender, RoutedEventArgs e)
{
keyBox.Text = Keybinds.keyBinding;
((MainWindow)this.Owner).keyEnabled = false;
}

private void hotkeyWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
Expand Down
Loading

0 comments on commit 61617a3

Please sign in to comment.