新增 WxOrder.Framework 项目
新增公共类 WPFCommon 包
This commit is contained in:
1 parent
05a48bf605
commit
4f606c3561
11 files changed
+23083
-33
No files matched your search
@@ -19,6 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_SolutionItems", "_Solution
|
||||
.gitignore = .gitignore
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WxOrder.Framework", "WxOrder.Framework\WxOrder.Framework.csproj", "{3123963C-A0EC-4AD5-9916-DC063F73490B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -79,6 +81,22 @@ Global
|
||||
{5A410EB5-06AD-97BB-2314-9D7A808E12F7}.Release|x64.Build.0 = Release|Any CPU
|
||||
{5A410EB5-06AD-97BB-2314-9D7A808E12F7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{5A410EB5-06AD-97BB-2314-9D7A808E12F7}.Release|x86.Build.0 = Release|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Release|x64.Build.0 = Release|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{3123963C-A0EC-4AD5-9916-DC063F73490B}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AllBase\29WxOrderAllBase.csproj" />
|
||||
<ProjectReference Include="..\Work\29WxOrderWork.csproj" />
|
||||
<ProjectReference Include="..\WxOrder.Framework\WxOrder.Framework.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- 资源文件:SDK 样式工程默认不会把图片/图标作为 Resource,这里按原工程显式声明 -->
|
||||
|
||||
+36
-33
@@ -1,36 +1,39 @@
|
||||
<Application x:Class="_29WxOrderWpf.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf"
|
||||
xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<converters:HasValueToVisibilityConverter x:Key="hasValueToVisibilityConverter" />
|
||||
<converters:HasTextToVisibilityConverter x:Key="HasTextVisibility"/>
|
||||
<converters:TextEllipsisConverter x:Key="TextEllipsisConverter"/>
|
||||
<converters:TextEllipsisConverter26 x:Key="TextEllipsisConverter26"/>
|
||||
<converters:NotHasTextToVisibilityConverter x:Key="NotHasTextVisibility"/>
|
||||
<converters:VisibleToVisibilityConverter x:Key="visibleToVisibilityConverter"/>
|
||||
<converters:ImageUrlToBitmapImageConverter x:Key="ImageUrlToBitmapImage"/>
|
||||
<converters:ValueMinus24Converter x:Key="ValueMinus24Converter"/>
|
||||
<converters:StatusToColorBrushConverter x:Key="statusToColorBrushConverter"/>
|
||||
<converters:ListBoxIndexConverter x:Key="listBoxIndexConverter"/>
|
||||
<converters:FlagColorConverter x:Key="flagColorConverter"/>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Styles/BaseWindowStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseDataGridStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseButtonStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseTextBoxStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseComboBoxStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/UcImageButtonStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/UcWaterMarkTextBoxStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/StaticImageDictionary.xaml" />
|
||||
<ResourceDictionary Source="Styles/StaticColorBrushDictionary.xaml" />
|
||||
<ResourceDictionary Source="Styles/StaticImageBrushDictionary.xaml" />
|
||||
<!-- 可以添加更多资源字典 -->
|
||||
<Application
|
||||
x:Class="_29WxOrderWpf.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<converters:HasValueToVisibilityConverter x:Key="hasValueToVisibilityConverter" />
|
||||
<converters:HasTextToVisibilityConverter x:Key="HasTextVisibility" />
|
||||
<converters:TextEllipsisConverter x:Key="TextEllipsisConverter" />
|
||||
<converters:TextEllipsisConverter26 x:Key="TextEllipsisConverter26" />
|
||||
<converters:NotHasTextToVisibilityConverter x:Key="NotHasTextVisibility" />
|
||||
<converters:VisibleToVisibilityConverter x:Key="visibleToVisibilityConverter" />
|
||||
<converters:ImageUrlToBitmapImageConverter x:Key="ImageUrlToBitmapImage" />
|
||||
<converters:ValueMinus24Converter x:Key="ValueMinus24Converter" />
|
||||
<converters:StatusToColorBrushConverter x:Key="statusToColorBrushConverter" />
|
||||
<converters:ListBoxIndexConverter x:Key="listBoxIndexConverter" />
|
||||
<converters:FlagColorConverter x:Key="flagColorConverter" />
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Styles/BaseWindowStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseDataGridStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseButtonStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseTextBoxStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseComboBoxStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/UcImageButtonStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/UcWaterMarkTextBoxStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/StaticImageDictionary.xaml" />
|
||||
<ResourceDictionary Source="Styles/StaticColorBrushDictionary.xaml" />
|
||||
<ResourceDictionary Source="Styles/StaticImageBrushDictionary.xaml" />
|
||||
<!-- 可以添加更多资源字典 -->
|
||||
<ResourceDictionary Source="/Ctrls/Statistics/General.xaml" />
|
||||
|
||||
<ResourceDictionary Source="pack://application:,,,/WxOrder.Framework;component/Resources/Theme.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
@@ -0,0 +1,65 @@
|
||||
<#@ template debug="false" hostspecific="true" language="C#" #>
|
||||
<#@ assembly name="System.Core" #>
|
||||
<#@ import namespace="System.Linq" #>
|
||||
<#@ import namespace="System.IO" #>
|
||||
<#@ import namespace="System.Text" #>
|
||||
<#@ import namespace="System.Collections.Generic" #>
|
||||
<#@ import namespace="System.Text.RegularExpressions" #>
|
||||
<#@ output extension=".xaml" encoding="utf-8" #>
|
||||
|
||||
<#
|
||||
|
||||
StringBuilder FontString = new StringBuilder();
|
||||
FontString.AppendLine("<ResourceDictionary");
|
||||
FontString.AppendLine("\txmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"");
|
||||
FontString.AppendLine("\txmlns:PresentationOptions=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation/options\"");
|
||||
FontString.AppendLine("\txmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"");
|
||||
FontString.AppendLine("\txmlns:sys=\"clr-namespace:System;assembly=mscorlib\"");
|
||||
FontString.AppendLine("\t>");
|
||||
FontString.AppendLine("");
|
||||
FontString.AppendLine("");
|
||||
|
||||
string cssPath = this.Host.ResolvePath("iconfont.css");
|
||||
string svgPath = this.Host.ResolvePath("iconfont.js");
|
||||
|
||||
if (File.Exists(cssPath))
|
||||
{
|
||||
string cssContent = File.ReadAllText(cssPath, Encoding.UTF8);
|
||||
MatchCollection matchs = Regex.Matches(cssContent, "\\.icon-(?<name>.+?):before.+?\\{.+?content:.+?\"\\\\(?<value>e.+?)\";.+?\\}", RegexOptions.Singleline);
|
||||
foreach (Match match in matchs)
|
||||
{
|
||||
string name = match.Groups["name"].Value;
|
||||
//name = Regex.Replace(name,"(a-(\\d{4,}(.*)?_fluent_|SegoeFluentIconsRegular-))|(_regular_icon|$)","",RegexOptions.Singleline);
|
||||
string value = match.Groups["value"].Value;
|
||||
FontString.AppendLine(string.Format("\t<sys:String x:Key=\"txt-{0}\">&#x{1};</sys:String>", name, value));
|
||||
}
|
||||
}
|
||||
if (File.Exists(svgPath))
|
||||
{
|
||||
FontString.AppendLine("");
|
||||
FontString.AppendLine("");
|
||||
|
||||
string svgContent = File.ReadAllText(svgPath, Encoding.UTF8);
|
||||
MatchCollection matchs = Regex.Matches(svgContent, "<symbol.+?id=\"(?<name>.+?)\".+?>(?<value>.+?)</symbol>");
|
||||
foreach (Match match in matchs)
|
||||
{
|
||||
string name = match.Groups["name"].Value;
|
||||
string symbol = match.Groups["value"].Value;
|
||||
StringBuilder value =new StringBuilder();
|
||||
MatchCollection pathMatchs = Regex.Matches(symbol,"<path.+?d=\"(?<value>.+?)\"");
|
||||
foreach(Match pathMatch in pathMatchs)
|
||||
{
|
||||
value.AppendLine("\t\t"+pathMatch.Groups["value"].Value);
|
||||
}
|
||||
FontString.AppendLine(string.Format("\t<Geometry x:Key=\"{0}\" PresentationOptions:Freeze=\"True\">\n{1}\t</Geometry>", name, value));
|
||||
}
|
||||
}
|
||||
FontString.AppendLine("");
|
||||
FontString.AppendLine("");
|
||||
FontString.AppendLine("</ResourceDictionary>");
|
||||
string content = FontString.ToString();
|
||||
string savePath =Path.Combine(this.Host.ResolvePath(""),@"..\Themes\FontGeometry.xaml");
|
||||
//File.WriteAllText(savePath,content,Encoding.UTF8);
|
||||
#>
|
||||
<#=content#>
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
window._iconfont_svg_string_5223831='<svg><symbol id="icon-calendar_work_week" viewBox="0 0 1024 1024"><path d="M330.666667 298.666667a32 32 0 0 0-32 32v170.666666c0 17.664 14.336 32 32 32h362.666666a32 32 0 0 0 32-32v-170.666666a32 32 0 0 0-32-32h-362.666666z m32 170.666666V362.666667h298.666666V469.333333h-298.666666z" ></path><path d="M757.333333 896A138.666667 138.666667 0 0 0 896 757.333333V266.666667A138.666667 138.666667 0 0 0 757.333333 128H266.666667A138.666667 138.666667 0 0 0 128 266.666667v490.666666A138.666667 138.666667 0 0 0 266.666667 896h490.666666zM832 266.666667v490.666666a74.666667 74.666667 0 0 1-74.666667 74.666667H266.666667a74.666667 74.666667 0 0 1-74.666667-74.666667V266.666667c0-41.216 33.450667-74.666667 74.666667-74.666667h490.666666c41.216 0 74.666667 33.450667 74.666667 74.666667z" ></path></symbol><symbol id="icon-document_endnote" viewBox="0 0 1024 1024"><path d="M234.666667 181.333333a32 32 0 0 1 32-32H512V341.333333a85.333333 85.333333 0 0 0 85.333333 85.333334h192v416a32 32 0 0 1-32 32H554.666667V938.666667h202.666666A96 96 0 0 0 853.333333 842.666667V412.330667c0-19.797333-7.850667-38.784-21.888-52.778667l-252.330666-252.330667A74.666667 74.666667 0 0 0 526.336 85.333333H266.666667A96 96 0 0 0 170.666667 181.333333V512h64V181.333333z m341.333333 160V194.56l168.106667 168.106667H597.333333a21.333333 21.333333 0 0 1-21.333333-21.333334zM192 586.666667a32 32 0 0 1-32 32H106.666667v298.666666h53.333333a32 32 0 0 1 0 64H106.666667A64 64 0 0 1 42.666667 917.333333v-298.666666A64 64 0 0 1 106.666667 554.666667h53.333333a32 32 0 0 1 32 32z" ></path><path d="M394.666667 618.666667a32 32 0 0 1 0-64h53.333333a64 64 0 0 1 64 64v298.666666a64 64 0 0 1-64 64H394.666667a32 32 0 0 1 0-64h53.333333v-298.666666H394.666667zM277.333333 714.666667a32 32 0 0 1 32 32V896a32 32 0 0 1-64 0v-149.333333a32 32 0 0 1 32-32zM277.333333 682.666667a32 32 0 1 0 0-64 32 32 0 0 0 0 64z" ></path></symbol><symbol id="icon-leaf_three" viewBox="0 0 1024 1024"><path d="M810.666667 320c0 22.186667-3.072 43.648-8.832 64h69.12C908.373333 384 938.666667 414.293333 938.666667 451.669333V661.333333a277.333333 277.333333 0 0 1-449.493334 217.429334L438.613333 929.28a32 32 0 1 1-45.226666-45.226667l50.517333-50.56a277.077333 277.077333 0 0 1-40.704-70.613333A256 256 0 0 1 96 512V320.597333C96 284.928 124.928 256 160.597333 256h189.568A234.752 234.752 0 0 1 576 85.333333h173.226667c33.92 0 61.44 27.52 61.44 61.44V320zM414.805333 263.765333a256.554667 256.554667 0 0 1 165.504 132.266667A277.290667 277.290667 0 0 1 661.333333 384h72.96c7.978667-19.754667 12.373333-41.386667 12.373334-64v-170.666667h-170.666667a170.752 170.752 0 0 0-161.194667 114.432z m120.021334 569.344A213.333333 213.333333 0 0 0 874.666667 661.333333v-209.664a3.669333 3.669333 0 0 0-3.669334-3.669333H661.333333a213.333333 213.333333 0 0 0-171.776 339.84l181.162667-181.12a32 32 0 1 1 45.226667 45.226667l-181.12 181.162666zM384 661.333333c0-25.258667 3.413333-49.749333 9.728-73.002666L276.053333 470.613333a32 32 0 1 1 45.226667-45.226666l98.901333 98.858666a278.698667 278.698667 0 0 1 101.333334-102.485333A192 192 0 0 0 352 320H160.384l-0.213333 0.170667a0.938667 0.938667 0 0 0-0.128 0.213333l-0.042667 0.213333V512a192 192 0 0 0 226.816 188.842667A279.765333 279.765333 0 0 1 384 661.333333z" ></path></symbol><symbol id="icon-re_order_dots_horizontal" viewBox="0 0 1024 1024"><path d="M298.666667 661.333333a64 64 0 1 1-128 0 64 64 0 0 1 128 0z m0-298.666666a64 64 0 1 1-128 0 64 64 0 0 1 128 0z m298.666666 298.666666a64 64 0 1 1-128 0 64 64 0 0 1 128 0z m0-298.666666a64 64 0 1 1-128 0 64 64 0 0 1 128 0z m298.666667 298.666666a64 64 0 1 1-128 0 64 64 0 0 1 128 0z m0-298.666666a64 64 0 1 1-128 0 64 64 0 0 1 128 0z" ></path></symbol><symbol id="icon-task_list_square_rtl" viewBox="0 0 1024 1024"><path d="M277.333333 629.333333a32 32 0 0 1 32-32h149.333334a32 32 0 0 1 0 64h-149.333334a32 32 0 0 1-32-32z m32-266.666666a32 32 0 0 0 0 64h149.333334a32 32 0 0 0 0-64h-149.333334z m449.28-33.28a32 32 0 0 1 0 45.226666l-85.333333 85.333334a32 32 0 0 1-45.226667 0l-42.666666-42.666667a32 32 0 0 1 45.226666-45.226667l20.053334 20.053334 62.72-62.72a32 32 0 0 1 45.226666 0z m0 279.893333a32 32 0 1 0-45.226666-45.226667l-62.72 62.72-20.053334-20.053333a32 32 0 1 0-45.226666 45.226667l42.666666 42.666666a32 32 0 0 0 45.226667 0l85.333333-85.333333zM224 128A96 96 0 0 0 128 224v576A96 96 0 0 0 224 896h576A96 96 0 0 0 896 800V224A96 96 0 0 0 800 128H224zM192 224a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H224a32 32 0 0 1-32-32V224z" ></path></symbol><symbol id="icon-calendar_sync" viewBox="0 0 1024 1024"><path d="M757.333333 128A138.666667 138.666667 0 0 1 896 266.666667v246.272a276.096 276.096 0 0 0-64-30.250667V362.666667h-640v394.666666c0 41.216 33.450667 74.666667 74.666667 74.666667h216.021333c7.381333 22.784 17.578667 44.245333 30.250667 64H266.666667A138.666667 138.666667 0 0 1 128 757.333333V266.666667A138.666667 138.666667 0 0 1 266.666667 1Line truncated
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Fonts/FontGeometry.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/WPFCommon;component/Resources/Generic.xaml" />
|
||||
<!--<ResourceDictionary Source="Images/Images.xaml"/>-->
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<FontFamily x:Key="IconPack">Fonts/#iconfont</FontFamily>
|
||||
<Style x:Key="TextBlockIcon" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontFamily" Value="{StaticResource IconPack}" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="18" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,26 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net462</TargetFramework>
|
||||
<LangVersion>12.0</LangVersion>
|
||||
<ImplicitUsings>true</ImplicitUsings>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="WPFCommon" Version="1.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Resources\Fonts\FontGeometry.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>FontGeometry.xaml</LastGenOutput>
|
||||
</None>
|
||||
<None Update="Resources\Fonts\FontGeometry.xaml">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>FontGeometry.tt</DependentUpon>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in new issue
Block a user