add AboutWindow
This commit is contained in:
1 parent
bb94944991
commit
bce4cacf11
16 files changed
+151
-71
No files matched your search
@@ -12,9 +12,11 @@ Global
|
|||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Debug-Net40|Any CPU = Debug-Net40|Any CPU
|
Debug-Net40|Any CPU = Debug-Net40|Any CPU
|
||||||
Debug-Net45|Any CPU = Debug-Net45|Any CPU
|
Debug-Net45|Any CPU = Debug-Net45|Any CPU
|
||||||
|
Debug-Net47|Any CPU = Debug-Net47|Any CPU
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
Release-Net40|Any CPU = Release-Net40|Any CPU
|
Release-Net40|Any CPU = Release-Net40|Any CPU
|
||||||
Release-Net45|Any CPU = Release-Net45|Any CPU
|
Release-Net45|Any CPU = Release-Net45|Any CPU
|
||||||
|
Release-Net47|Any CPU = Release-Net47|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
@@ -23,24 +25,32 @@ Global
|
|||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Net40|Any CPU.Build.0 = Debug-Net40|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Net40|Any CPU.Build.0 = Debug-Net40|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Net45|Any CPU.ActiveCfg = Debug-Net45|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Net45|Any CPU.ActiveCfg = Debug-Net45|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Net45|Any CPU.Build.0 = Debug-Net45|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Net45|Any CPU.Build.0 = Debug-Net45|Any CPU
|
||||||
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Net47|Any CPU.ActiveCfg = Debug-Net47|Any CPU
|
||||||
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Net47|Any CPU.Build.0 = Debug-Net47|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release|Any CPU.Build.0 = Release|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net40|Any CPU.ActiveCfg = Release-Net40|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net40|Any CPU.ActiveCfg = Release-Net40|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net40|Any CPU.Build.0 = Release-Net40|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net40|Any CPU.Build.0 = Release-Net40|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net45|Any CPU.ActiveCfg = Release-Net45|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net45|Any CPU.ActiveCfg = Release-Net45|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net45|Any CPU.Build.0 = Release-Net45|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net45|Any CPU.Build.0 = Release-Net45|Any CPU
|
||||||
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net47|Any CPU.ActiveCfg = Release-Net47|Any CPU
|
||||||
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net47|Any CPU.Build.0 = Release-Net47|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net40|Any CPU.Build.0 = Debug|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net40|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net45|Any CPU.ActiveCfg = Debug|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net45|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net45|Any CPU.Build.0 = Debug|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net45|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net47|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net47|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release|Any CPU.Build.0 = Release|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net40|Any CPU.Build.0 = Release|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net40|Any CPU.Build.0 = Release|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net45|Any CPU.ActiveCfg = Release|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net45|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net45|Any CPU.Build.0 = Release|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net45|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net47|Any CPU.ActiveCfg = Release-Net47|Any CPU
|
||||||
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net47|Any CPU.Build.0 = Release-Net47|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
@@ -10,15 +10,6 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
protected override bool IsItemItsOwnContainerOverride(object item) => item is RadioButton;
|
protected override bool IsItemItsOwnContainerOverride(object item) => item is RadioButton;
|
||||||
|
|
||||||
//public static readonly DependencyProperty GroupNameProperty = DependencyProperty.Register(
|
|
||||||
// "GroupName", typeof(string), typeof(RadioGroup), new PropertyMetadata(default(string)));
|
|
||||||
|
|
||||||
//public string GroupName
|
|
||||||
//{
|
|
||||||
// get => (string) GetValue(GroupNameProperty);
|
|
||||||
// set => SetValue(GroupNameProperty, value);
|
|
||||||
//}
|
|
||||||
|
|
||||||
public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
|
||||||
"Orientation", typeof(Orientation), typeof(RadioGroup), new PropertyMetadata(default(Orientation)));
|
"Orientation", typeof(Orientation), typeof(RadioGroup), new PropertyMetadata(default(Orientation)));
|
||||||
|
|
||||||
|
|||||||
File renamed without changes.
@@ -52,7 +52,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
Loaded += (s, e) =>
|
Loaded += (s, e) =>
|
||||||
{
|
{
|
||||||
if (DesignerHelper.IsInDesignMode()) return;
|
if (DesignerHelper.IsInDesignMode) return;
|
||||||
if (_isLoaded) return;
|
if (_isLoaded) return;
|
||||||
_isLoaded = true;
|
_isLoaded = true;
|
||||||
if (Value <= 0)
|
if (Value <= 0)
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ namespace HandyControl.Controls
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if net45 || net40
|
#if netle45
|
||||||
_formattedText = new FormattedText(
|
_formattedText = new FormattedText(
|
||||||
Text,
|
Text,
|
||||||
CultureInfo.CurrentUICulture,
|
CultureInfo.CurrentUICulture,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using System.Windows.Input;
|
|||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
using HandyControl.Tools;
|
using HandyControl.Tools;
|
||||||
#if net40
|
#if netle40
|
||||||
using Microsoft.Windows.Shell;
|
using Microsoft.Windows.Shell;
|
||||||
#else
|
#else
|
||||||
using System.Windows.Shell;
|
using System.Windows.Shell;
|
||||||
|
|||||||
@@ -26,12 +26,23 @@
|
|||||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||||
<netVersion>netgt40</netVersion>
|
<netVersion>netgt40</netVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-Net47|AnyCPU'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
|
||||||
|
<netVersion>netgt40</netVersion>
|
||||||
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug-Net45|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug-Net45|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE;net45</DefineConstants>
|
<DefineConstants>DEBUG;TRACE;netle45</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
@@ -42,7 +53,7 @@
|
|||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE;net40</DefineConstants>
|
<DefineConstants>DEBUG;TRACE;netle45;netle40</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
@@ -59,11 +70,22 @@
|
|||||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||||
<netVersion>netgt40</netVersion>
|
<netVersion>netgt40</netVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Net47|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<DocumentationFile>bin\Release\HandyControl.xml</DocumentationFile>
|
||||||
|
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
|
||||||
|
<netVersion>netgt40</netVersion>
|
||||||
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Net45|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Net45|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE;net45</DefineConstants>
|
<DefineConstants>TRACE;netle45</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DocumentationFile>bin\Release\HandyControl.xml</DocumentationFile>
|
<DocumentationFile>bin\Release\HandyControl.xml</DocumentationFile>
|
||||||
@@ -74,7 +96,7 @@
|
|||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE;net40</DefineConstants>
|
<DefineConstants>TRACE;netle45;netle40</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DocumentationFile>bin\Release\HandyControl.xml</DocumentationFile>
|
<DocumentationFile>bin\Release\HandyControl.xml</DocumentationFile>
|
||||||
@@ -108,14 +130,14 @@
|
|||||||
<Compile Include="Controls\Button\ContextMenuButton.cs" />
|
<Compile Include="Controls\Button\ContextMenuButton.cs" />
|
||||||
<Compile Include="Controls\Button\ContextMenuToggleButton.cs" />
|
<Compile Include="Controls\Button\ContextMenuToggleButton.cs" />
|
||||||
<Compile Include="Controls\Other\Carousel.cs" />
|
<Compile Include="Controls\Other\Carousel.cs" />
|
||||||
<Compile Include="Controls\Other\CirclePanel.cs" />
|
<Compile Include="Controls\Panel\CirclePanel.cs" />
|
||||||
<Compile Include="Controls\Other\CircleProgressBar.cs" />
|
<Compile Include="Controls\Other\CircleProgressBar.cs" />
|
||||||
<Compile Include="Controls\Other\RadioGroup.cs" />
|
<Compile Include="Controls\Other\RadioGroup.cs" />
|
||||||
<Compile Include="Controls\Other\Shield.cs" />
|
<Compile Include="Controls\Other\Shield.cs" />
|
||||||
<Compile Include="Controls\Rate\Rate.cs" />
|
<Compile Include="Controls\Rate\Rate.cs" />
|
||||||
<Compile Include="Controls\Rate\RateItem.cs" />
|
<Compile Include="Controls\Rate\RateItem.cs" />
|
||||||
<Compile Include="Controls\Text\OutlineText.cs" />
|
<Compile Include="Controls\Text\OutlineText.cs" />
|
||||||
<Compile Include="Controls\Other\GifImage.cs" />
|
<Compile Include="Controls\Image\GifImage.cs" />
|
||||||
<Compile Include="Controls\Input\SearchBar.cs" />
|
<Compile Include="Controls\Input\SearchBar.cs" />
|
||||||
<Compile Include="Controls\Tag\TagPanel.cs" />
|
<Compile Include="Controls\Tag\TagPanel.cs" />
|
||||||
<Compile Include="Controls\Tag\Tag.cs" />
|
<Compile Include="Controls\Tag\Tag.cs" />
|
||||||
@@ -123,7 +145,7 @@
|
|||||||
<Compile Include="Controls\Time\Clock\Clock.cs" />
|
<Compile Include="Controls\Time\Clock\Clock.cs" />
|
||||||
<Compile Include="Controls\Time\Clock\ClockRadioButton.cs" />
|
<Compile Include="Controls\Time\Clock\ClockRadioButton.cs" />
|
||||||
<Compile Include="Controls\Other\Growl.cs" />
|
<Compile Include="Controls\Other\Growl.cs" />
|
||||||
<Compile Include="Controls\Other\ImageViewer.cs" />
|
<Compile Include="Controls\Image\ImageViewer.cs" />
|
||||||
<Compile Include="Controls\Input\ComboBox.cs" />
|
<Compile Include="Controls\Input\ComboBox.cs" />
|
||||||
<Compile Include="Controls\Input\DatePicker.cs" />
|
<Compile Include="Controls\Input\DatePicker.cs" />
|
||||||
<Compile Include="Controls\Input\DateTimePicker.cs" />
|
<Compile Include="Controls\Input\DateTimePicker.cs" />
|
||||||
@@ -721,9 +743,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -1,60 +1,21 @@
|
|||||||
using System;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Windows;
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
namespace HandyControl.Tools
|
namespace HandyControl.Tools
|
||||||
{
|
{
|
||||||
public class DesignerHelper
|
public class DesignerHelper
|
||||||
{
|
{
|
||||||
public static bool IsInDesignMode()
|
private static bool? _isInDesignMode;
|
||||||
|
|
||||||
|
public static bool IsInDesignMode
|
||||||
{
|
{
|
||||||
try
|
get
|
||||||
{
|
{
|
||||||
var type1 = Type.GetType(
|
if (!_isInDesignMode.HasValue)
|
||||||
"System.ComponentModel.DesignerProperties, PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
|
|
||||||
if (type1 == null)
|
|
||||||
return false;
|
|
||||||
var obj1 = type1.GetTypeInfo().GetDeclaredField("IsInDesignModeProperty").GetValue(null);
|
|
||||||
var type2 = Type.GetType(
|
|
||||||
"System.ComponentModel.DependencyPropertyDescriptor, WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
|
|
||||||
var type3 = Type.GetType(
|
|
||||||
"System.Windows.FrameworkElement, PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
|
|
||||||
if (type2 == null || type3 == null)
|
|
||||||
return false;
|
|
||||||
var list = type2.GetTypeInfo().GetDeclaredMethods("FromProperty").ToList();
|
|
||||||
if (list.Count == 0)
|
|
||||||
return false;
|
|
||||||
var methodInfo = list.FirstOrDefault(mi =>
|
|
||||||
{
|
{
|
||||||
if (mi.IsPublic && mi.IsStatic)
|
_isInDesignMode = (bool)DependencyPropertyDescriptor.FromProperty(DesignerProperties.IsInDesignModeProperty, typeof(FrameworkElement)).Metadata.DefaultValue;
|
||||||
return mi.GetParameters().Length == 2;
|
}
|
||||||
return false;
|
return _isInDesignMode.Value;
|
||||||
});
|
|
||||||
if (methodInfo == null)
|
|
||||||
return false;
|
|
||||||
var obj2 = methodInfo.Invoke(null, new[]
|
|
||||||
{
|
|
||||||
obj1,
|
|
||||||
type3
|
|
||||||
});
|
|
||||||
if (obj2 == null)
|
|
||||||
return false;
|
|
||||||
var declaredProperty1 = type2.GetTypeInfo().GetDeclaredProperty("Metadata");
|
|
||||||
if (declaredProperty1 == null)
|
|
||||||
return false;
|
|
||||||
var obj3 = declaredProperty1.GetValue(obj2, null);
|
|
||||||
var type4 = Type.GetType(
|
|
||||||
"System.Windows.PropertyMetadata, WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
|
|
||||||
if (obj3 == null || type4 == null)
|
|
||||||
return false;
|
|
||||||
var declaredProperty2 = type4.GetTypeInfo().GetDeclaredProperty("DefaultValue");
|
|
||||||
if (declaredProperty2 == null)
|
|
||||||
return false;
|
|
||||||
return (bool) declaredProperty2.GetValue(obj3, null);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,16 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Net47|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
|
||||||
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationIcon>Resources\Img\icon.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\Img\icon.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -297,6 +307,9 @@
|
|||||||
<Compile Include="ViewModel\StepBarDemoViewModel.cs" />
|
<Compile Include="ViewModel\StepBarDemoViewModel.cs" />
|
||||||
<Compile Include="ViewModel\ViewModelLocator.cs" />
|
<Compile Include="ViewModel\ViewModelLocator.cs" />
|
||||||
<Compile Include="ViewModel\WindowDemoViewModel.cs" />
|
<Compile Include="ViewModel\WindowDemoViewModel.cs" />
|
||||||
|
<Compile Include="Window\AboutWindow.xaml.cs">
|
||||||
|
<DependentUpon>AboutWindow.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Window\BlurWindow.xaml.cs">
|
<Compile Include="Window\BlurWindow.xaml.cs">
|
||||||
<DependentUpon>BlurWindow.xaml</DependentUpon>
|
<DependentUpon>BlurWindow.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -614,6 +627,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Window\AboutWindow.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="Window\BlurWindow.xaml">
|
<Page Include="Window\BlurWindow.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -718,6 +735,7 @@
|
|||||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="app.config" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
<Path Data="{StaticResource CnblogsGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
<Path Data="{StaticResource CnblogsGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem Header="{x:Static langs:Lang.About}" Click="MenuAbout_OnClick"/>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Click="MenuItemContributors_OnClick" Foreground="White" Header="{x:Static langs:Lang.Contributors}">
|
<MenuItem Click="MenuItemContributors_OnClick" Foreground="White" Header="{x:Static langs:Lang.Contributors}">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using HandyControl.Controls;
|
|||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
using HandyControlDemo.Data;
|
using HandyControlDemo.Data;
|
||||||
using HandyControlDemo.Tools;
|
using HandyControlDemo.Tools;
|
||||||
|
using HandyControlDemo.Window;
|
||||||
|
|
||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
@@ -72,5 +73,13 @@ namespace HandyControlDemo.UserControl
|
|||||||
Messenger.Default.Send(true, MessageToken.FullSwitch);
|
Messenger.Default.Send(true, MessageToken.FullSwitch);
|
||||||
Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.ContributorsView}"), MessageToken.LoadShowContent);
|
Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.ContributorsView}"), MessageToken.LoadShowContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void MenuAbout_OnClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
new AboutWindow
|
||||||
|
{
|
||||||
|
Owner = Application.Current.MainWindow
|
||||||
|
}.ShowDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Windows;
|
||||||
using GalaSoft.MvvmLight.CommandWpf;
|
using GalaSoft.MvvmLight.CommandWpf;
|
||||||
using HandyControlDemo.Tools;
|
using HandyControlDemo.Tools;
|
||||||
|
|
||||||
@@ -12,6 +13,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
if (AssemblyHelper.CreateInternalInstance($"Window.{windowTag}") is System.Windows.Window window)
|
if (AssemblyHelper.CreateInternalInstance($"Window.{windowTag}") is System.Windows.Window window)
|
||||||
{
|
{
|
||||||
|
window.Owner = Application.Current.MainWindow;
|
||||||
window.ShowDialog();
|
window.ShowDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<controls:Window x:Class="HandyControlDemo.Window.AboutWindow"
|
||||||
|
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:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||||
|
Title="{x:Static langs:Lang.About}"
|
||||||
|
ShowTitle="True"
|
||||||
|
BorderThickness="1"
|
||||||
|
BorderBrush="#262e2f"
|
||||||
|
NonClientAreaBackground="White"
|
||||||
|
NonClientAreaForeground="{StaticResource PrimaryTextBrush}"
|
||||||
|
CloseButtonForeground="{StaticResource PrimaryTextBrush}"
|
||||||
|
OtherButtonForeground="{StaticResource PrimaryTextBrush}"
|
||||||
|
OtherButtonHoverBackground="#e5e5e5"
|
||||||
|
Style="{StaticResource WindowWin10}"
|
||||||
|
ResizeMode="NoResize"
|
||||||
|
ShowInTaskbar="False"
|
||||||
|
WindowStartupLocation="CenterOwner"
|
||||||
|
Width="340"
|
||||||
|
Height="220">
|
||||||
|
<Grid>
|
||||||
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,30,0,0">
|
||||||
|
<TextBlock Text="HandyControl" FontSize="30" Foreground="{StaticResource PrimaryBrush}" VerticalAlignment="Top" HorizontalAlignment="Center"/>
|
||||||
|
<TextBlock Text="{Binding Version}" HorizontalAlignment="Center" Margin="0,10,0,0" Foreground="{StaticResource PrimaryBrush}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock Text="{Binding CopyRight}" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,14" Foreground="{StaticResource ThirdlyTextBrush}"/>
|
||||||
|
</Grid>
|
||||||
|
</controls:Window>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace HandyControlDemo.Window
|
||||||
|
{
|
||||||
|
public partial class AboutWindow
|
||||||
|
{
|
||||||
|
public AboutWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
DataContext = this;
|
||||||
|
|
||||||
|
var versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location);
|
||||||
|
CopyRight = versionInfo.LegalCopyright;
|
||||||
|
Version = $"v {versionInfo.FileVersion}";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty CopyRightProperty = DependencyProperty.Register(
|
||||||
|
"CopyRight", typeof(string), typeof(AboutWindow), new PropertyMetadata(default(string)));
|
||||||
|
|
||||||
|
public string CopyRight
|
||||||
|
{
|
||||||
|
get => (string) GetValue(CopyRightProperty);
|
||||||
|
set => SetValue(CopyRightProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty VersionProperty = DependencyProperty.Register(
|
||||||
|
"Version", typeof(string), typeof(AboutWindow), new PropertyMetadata(default(string)));
|
||||||
|
|
||||||
|
public string Version
|
||||||
|
{
|
||||||
|
get => (string) GetValue(VersionProperty);
|
||||||
|
set => SetValue(VersionProperty, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user