fixed some bugs
This commit is contained in:
1 parent
203fbb4541
commit
f261f3199f
11 files changed
+147
-19
No files matched your search
@@ -3,6 +3,7 @@ using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Runtime;
|
||||
using System.Security.Authentication;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
@@ -21,6 +22,19 @@ namespace HandyControlDemo
|
||||
private static Mutex AppMutex;
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
public App()
|
||||
{
|
||||
#if !netle40
|
||||
var cachePath = $"{AppDomain.CurrentDomain.BaseDirectory}Cache";
|
||||
if (!Directory.Exists(cachePath))
|
||||
{
|
||||
Directory.CreateDirectory(cachePath);
|
||||
}
|
||||
ProfileOptimization.SetProfileRoot(cachePath);
|
||||
ProfileOptimization.StartProfile("Profile");
|
||||
#endif
|
||||
}
|
||||
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
AppMutex = new Mutex(true, "HandyControlDemo", out var createdNew);
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
</configuration>
|
||||
@@ -6,7 +6,7 @@
|
||||
<ResourceDictionary Source="Geometries.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<DrawingBrush o:Freeze="True" x:Key="MainContentForegroundDrawingBrush" RenderOptions.CachingHint="Cache" Viewport="0,0,16,16" ViewportUnits="Absolute" Stretch="None" TileMode="Tile">
|
||||
<DrawingBrush o:Freeze="True" x:Key="MainContentForegroundDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,16,16" ViewportUnits="Absolute" Stretch="None" TileMode="Tile">
|
||||
<DrawingBrush.Drawing>
|
||||
<DrawingGroup o:Freeze="True">
|
||||
<GeometryDrawing o:Freeze="True" Brush="{DynamicResource MainContentForegroundBrush}">
|
||||
@@ -21,7 +21,7 @@
|
||||
</DrawingBrush.Drawing>
|
||||
</DrawingBrush>
|
||||
|
||||
<DrawingBrush o:Freeze="True" x:Key="GitHubDrawingBrush" RenderOptions.CachingHint="Cache" Viewport="0,0,200,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
|
||||
<DrawingBrush o:Freeze="True" x:Key="GitHubDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,200,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
|
||||
<DrawingBrush.Transform>
|
||||
<TransformGroup o:Freeze="True">
|
||||
<RotateTransform o:Freeze="True" Angle="20"/>
|
||||
@@ -34,7 +34,7 @@
|
||||
</DrawingBrush.Drawing>
|
||||
</DrawingBrush>
|
||||
|
||||
<DrawingBrush o:Freeze="True" x:Key="QqDrawingBrush" RenderOptions.CachingHint="Cache" Viewport="0,0,100,200" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
|
||||
<DrawingBrush o:Freeze="True" x:Key="QqDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,100,200" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
|
||||
<DrawingBrush.Transform>
|
||||
<TransformGroup o:Freeze="True">
|
||||
<RotateTransform o:Freeze="True" Angle="20"/>
|
||||
@@ -47,7 +47,7 @@
|
||||
</DrawingBrush.Drawing>
|
||||
</DrawingBrush>
|
||||
|
||||
<DrawingBrush o:Freeze="True" x:Key="BlogDrawingBrush" RenderOptions.CachingHint="Cache" Viewport="0,0,160,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
|
||||
<DrawingBrush o:Freeze="True" x:Key="BlogDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,160,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
|
||||
<DrawingBrush.Transform>
|
||||
<TransformGroup o:Freeze="True">
|
||||
<RotateTransform o:Freeze="True" Angle="20"/>
|
||||
@@ -59,7 +59,7 @@
|
||||
<RectangleGeometry o:Freeze="True" Rect="0,0,160,100"></RectangleGeometry>
|
||||
</GeometryDrawing.Geometry>
|
||||
<GeometryDrawing.Brush>
|
||||
<VisualBrush o:Freeze="True">
|
||||
<VisualBrush o:Freeze="True" RenderOptions.CachingHint="Cache" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" >
|
||||
<VisualBrush.Visual>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Blog" Foreground="{DynamicResource DarkMaskBrush}"/>
|
||||
@@ -71,7 +71,7 @@
|
||||
</DrawingBrush.Drawing>
|
||||
</DrawingBrush>
|
||||
|
||||
<DrawingBrush o:Freeze="True" x:Key="WebsiteDrawingBrush" RenderOptions.CachingHint="Cache" Viewport="0,0,320,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
|
||||
<DrawingBrush o:Freeze="True" x:Key="WebsiteDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,320,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
|
||||
<DrawingBrush.Transform>
|
||||
<TransformGroup o:Freeze="True">
|
||||
<RotateTransform o:Freeze="True" Angle="20"/>
|
||||
@@ -83,7 +83,7 @@
|
||||
<RectangleGeometry o:Freeze="True" Rect="0,0,320,100"></RectangleGeometry>
|
||||
</GeometryDrawing.Geometry>
|
||||
<GeometryDrawing.Brush>
|
||||
<VisualBrush o:Freeze="True">
|
||||
<VisualBrush o:Freeze="True" RenderOptions.CachingHint="Cache" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0">
|
||||
<VisualBrush.Visual>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Website" Foreground="{DynamicResource DarkMaskBrush}"/>
|
||||
@@ -95,7 +95,7 @@
|
||||
</DrawingBrush.Drawing>
|
||||
</DrawingBrush>
|
||||
|
||||
<DrawingBrush o:Freeze="True" x:Key="ProjectDrawingBrush" RenderOptions.CachingHint="Cache" Viewport="0,0,240,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
|
||||
<DrawingBrush o:Freeze="True" x:Key="ProjectDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,240,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
|
||||
<DrawingBrush.Transform>
|
||||
<TransformGroup o:Freeze="True">
|
||||
<RotateTransform o:Freeze="True" Angle="20"/>
|
||||
@@ -107,7 +107,7 @@
|
||||
<RectangleGeometry o:Freeze="True" Rect="0,0,240,100"></RectangleGeometry>
|
||||
</GeometryDrawing.Geometry>
|
||||
<GeometryDrawing.Brush>
|
||||
<VisualBrush o:Freeze="True">
|
||||
<VisualBrush o:Freeze="True" RenderOptions.CachingHint="Cache" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" >
|
||||
<VisualBrush.Visual>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Project" Foreground="{DynamicResource DarkMaskBrush}"/>
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
</UserControl.Resources>
|
||||
<UserControl.Triggers>
|
||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
|
||||
<BeginStoryboard Storyboard="{StaticResource StoryboardOnLoaded}"/>
|
||||
<BeginStoryboard Name="BeginStoryboard" Storyboard="{StaticResource StoryboardOnLoaded}"/>
|
||||
</EventTrigger>
|
||||
<EventTrigger RoutedEvent="FrameworkElement.Unloaded">
|
||||
<StopStoryboard BeginStoryboardName="BeginStoryboard"/>
|
||||
</EventTrigger>
|
||||
</UserControl.Triggers>
|
||||
<hc:TransitioningContentControl>
|
||||
|
||||
Reference in new issue
Block a user