-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve UI, Fix bugs and Update Docs
- Loading branch information
Showing
20 changed files
with
411 additions
and
723 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.30804.86 | ||
VisualStudioVersion = 16.0.31507.150 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandyDoc", "HandyDoc\HandyDoc.csproj", "{A1356F3B-6756-42B8-BBBF-F85F076CDE35}" | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandyDoc", "HandyDoc\HandyDoc.csproj", "{32A8B349-E9CD-4EBA-8B36-EDFA039E5B6F}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{A1356F3B-6756-42B8-BBBF-F85F076CDE35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A1356F3B-6756-42B8-BBBF-F85F076CDE35}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A1356F3B-6756-42B8-BBBF-F85F076CDE35}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A1356F3B-6756-42B8-BBBF-F85F076CDE35}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{32A8B349-E9CD-4EBA-8B36-EDFA039E5B6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{32A8B349-E9CD-4EBA-8B36-EDFA039E5B6F}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{32A8B349-E9CD-4EBA-8B36-EDFA039E5B6F}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{32A8B349-E9CD-4EBA-8B36-EDFA039E5B6F}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {65F24549-A006-465D-9677-59D2E794F9ED} | ||
SolutionGuid = {43F6C957-9285-4644-8F52-C72552E55640} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,14 @@ | ||
using HandyControl.Controls; | ||
using HandyControl.Data; | ||
using HandyControl.Themes; | ||
using HandyControl.Tools; | ||
using ModernWpf; | ||
using HandyControl.Themes; | ||
using System.Windows; | ||
|
||
namespace HandyDoc | ||
{ | ||
public partial class App : Application | ||
{ | ||
public App() | ||
internal void UpdateTheme(ApplicationTheme theme) | ||
{ | ||
GlobalDataHelper<AppConfig>.Init(); | ||
} | ||
|
||
protected override void OnStartup(StartupEventArgs e) | ||
{ | ||
base.OnStartup(e); | ||
var boot = new Bootstrapper(); | ||
boot.Run(); | ||
UpdateSkin(GlobalDataHelper<AppConfig>.Config.Skin); | ||
} | ||
|
||
internal void UpdateSkin(SkinType skin) | ||
{ | ||
SharedResourceDictionary.SharedDictionaries.Clear(); | ||
ResourceHelper.GetTheme("HandyTheme", Resources).Skin = skin; | ||
|
||
ThemeManager.Current.ApplicationTheme = skin == SkinType.Dark ? ApplicationTheme.Dark : ApplicationTheme.Light; | ||
Current.MainWindow?.OnApplyTemplate(); | ||
ThemeManager.Current.ApplicationTheme = theme; | ||
ModernWpf.ThemeManager.Current.ApplicationTheme = theme == ApplicationTheme.Light ? ModernWpf.ApplicationTheme.Light : ModernWpf.ApplicationTheme.Dark; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<hc:GlowWindow x:Class="HandyDoc.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:hc="https://handyorg.github.io/handycontrol" | ||
xmlns:ui="http://schemas.modernwpf.com/2019" xmlns:controls="http://schemas.modernwpf.com/toolkit/controls" | ||
mc:Ignorable="d" Loaded="Window_Loaded" | ||
Title="HandyDoc v2.0" ActiveGlowColor="{DynamicResource PrimaryColor}" | ||
WindowStartupLocation="CenterScreen" | ||
ShowTitle="True" | ||
Height="450" | ||
Width="800"> | ||
<hc:GlowWindow.NonClientAreaContent> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition/> | ||
<ColumnDefinition/> | ||
</Grid.ColumnDefinitions> | ||
<Button HorizontalAlignment="Right" Grid.Column="1" Click="ButtonConfig_OnClick" Name="ButtonConfig" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryTextBrush}" hc:IconElement.Geometry="{StaticResource ConfigGeometry}"/> | ||
<Popup AllowsTransparency="True" Grid.Column="1" PlacementTarget="{Binding ElementName=ButtonConfig}" HorizontalOffset="-35" Name="PopupConfig" VerticalOffset="6" StaysOpen="False"> | ||
<Border Background="{DynamicResource SecondaryRegionBrush}" CornerRadius="4" Margin="16" Effect="{StaticResource EffectShadow2}"> | ||
<StackPanel Margin="10" Button.Click="ButtonSkins_OnClick" HorizontalAlignment="Center"> | ||
<Button Tag="{x:Static hc:ApplicationTheme.Light}" Style="{StaticResource ButtonCustom}"> | ||
<Border Background="White" Width="32" Height="21" CornerRadius="2" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}"/> | ||
</Button> | ||
<Button Margin="0,10" Tag="{x:Static hc:ApplicationTheme.Dark}" Style="{StaticResource ButtonCustom}"> | ||
<Border Background="Black" Width="32" Height="21" CornerRadius="2" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}"/> | ||
</Button> | ||
</StackPanel> | ||
</Border> | ||
</Popup> | ||
</Grid> | ||
</hc:GlowWindow.NonClientAreaContent> | ||
<hc:TransitioningContentControl TransitionMode="Fade"> | ||
<ui:NavigationViewNonVirtualizing Name="navView" SelectionChanged="navView_SelectionChanged" IsBackButtonVisible="Collapsed" IsSettingsVisible="False" PaneDisplayMode="Left" > | ||
<ui:NavigationViewNonVirtualizing.AutoSuggestBox> | ||
<ui:AutoSuggestBox x:Name="autoBox" QueryIcon="Find" QuerySubmitted="controlsSearchBox_QuerySubmitted" TextChanged="controlsSearchBox_TextChanged" PlaceholderText="Search..."/> | ||
</ui:NavigationViewNonVirtualizing.AutoSuggestBox> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="auto"/> | ||
<RowDefinition/> | ||
</Grid.RowDefinitions> | ||
<ComboBox Name="cmbLang" ui:ControlHelper.PlaceholderText="Default Language is English" SelectionChanged="ComboBox_SelectionChanged" Margin="10" MinWidth="200" Style="{StaticResource DefaultComboBoxStyle}"> | ||
<ComboBoxItem Content="English"/> | ||
<ComboBoxItem Content="Chinese"/> | ||
</ComboBox> | ||
<controls:MarkdownTextBlock Grid.Row="1" Name="mdText"/> | ||
</Grid> | ||
</ui:NavigationViewNonVirtualizing> | ||
</hc:TransitioningContentControl> | ||
</hc:GlowWindow> |
Oops, something went wrong.