Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
Thick-Common
Commits
9d9eb204
Commit
9d9eb204
authored
Dec 30, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
从 dev7.0 复制 FLY.ControlLibrary 项目
parent
53e1a03e
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
161 additions
and
78 deletions
+161
-78
FLY.ControlLibrary.csproj
...ntrolLibrary/FLY.ControlLibrary/FLY.ControlLibrary.csproj
+4
-1
MyMessageBox.xaml
...t.FLY.ControlLibrary/FLY.ControlLibrary/MyMessageBox.xaml
+1
-3
ResetAction.cs
Project.FLY.ControlLibrary/FLY.ControlLibrary/ResetAction.cs
+1
-1
ButtonStyle.xaml
...ControlLibrary/FLY.ControlLibrary/Themes/ButtonStyle.xaml
+3
-3
ButtonStyle2.xaml
...ontrolLibrary/FLY.ControlLibrary/Themes/ButtonStyle2.xaml
+3
-3
CardStyle.xaml
...Y.ControlLibrary/FLY.ControlLibrary/Themes/CardStyle.xaml
+7
-1
Colors2.xaml
...FLY.ControlLibrary/FLY.ControlLibrary/Themes/Colors2.xaml
+13
-3
Dictionary_MyStyle.xaml
...Library/FLY.ControlLibrary/Themes/Dictionary_MyStyle.xaml
+2
-1
IconButtonStyle.xaml
...rolLibrary/FLY.ControlLibrary/Themes/IconButtonStyle.xaml
+1
-1
IconButtonStyle2.xaml
...olLibrary/FLY.ControlLibrary/Themes/IconButtonStyle2.xaml
+26
-23
NoToggleButtonStyle.xaml
...ibrary/FLY.ControlLibrary/Themes/NoToggleButtonStyle.xaml
+1
-1
PgMenuStyle.xaml
...ControlLibrary/FLY.ControlLibrary/Themes/PgMenuStyle.xaml
+27
-0
SectionStyle.xaml
...ontrolLibrary/FLY.ControlLibrary/Themes/SectionStyle.xaml
+3
-3
SectionStyle2.xaml
...ntrolLibrary/FLY.ControlLibrary/Themes/SectionStyle2.xaml
+12
-3
Styles.cs
...ct.FLY.ControlLibrary/FLY.ControlLibrary/Themes/Styles.cs
+11
-13
TextStyle.xaml
...Y.ControlLibrary/FLY.ControlLibrary/Themes/TextStyle.xaml
+2
-2
TextStyle2.xaml
....ControlLibrary/FLY.ControlLibrary/Themes/TextStyle2.xaml
+11
-7
ToggleButtonOnOffStyle.xaml
...ary/FLY.ControlLibrary/Themes/ToggleButtonOnOffStyle.xaml
+1
-1
UiModuleStyle2.xaml
...trolLibrary/FLY.ControlLibrary/Themes/UiModuleStyle2.xaml
+24
-0
WindowBigCloseStyle.xaml
...ibrary/FLY.ControlLibrary/Themes/WindowBigCloseStyle.xaml
+1
-1
Window_Tip.xaml
...ect.FLY.ControlLibrary/FLY.ControlLibrary/Window_Tip.xaml
+3
-3
Window_WarningTip.xaml
....ControlLibrary/FLY.ControlLibrary/Window_WarningTip.xaml
+4
-4
No files found.
Project.FLY.ControlLibrary/FLY.ControlLibrary/FLY.ControlLibrary.csproj
View file @
9d9eb204
...
...
@@ -87,7 +87,6 @@
<Compile
Include=
"PieChart.xaml.cs"
>
<DependentUpon>
PieChart.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"ToggleAction.cs"
/>
<Compile
Include=
"ResetAction.cs"
/>
<Compile
Include=
"UI.OSK\IVirtualKeyboard.cs"
/>
<Compile
Include=
"UI.OSK\KeyboardBehavior.cs"
/>
...
...
@@ -251,6 +250,10 @@
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Resource>
<Page
Include=
"Themes\PgMenuStyle.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Themes\SectionStyle2.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/MyMessageBox.xaml
View file @
9d9eb204
...
...
@@ -19,9 +19,7 @@
<StackPanel Orientation="Vertical" Margin="5" MinWidth="400">
<Border Height="40"/>
<TextBlock x:Name="textblock_message" Text="message" FontSize="40" Margin="10" MinHeight="100"/>
<Button Style="{StaticResource ButtonStyle_empty}" HorizontalAlignment="Right" BorderThickness="0" VerticalAlignment="Bottom" Click="button_ok_Click" Margin="5" Background="White">
<Path Data="{StaticResource Geometry_check-circle}" Fill="{StaticResource Color_theme_activity}" Stretch="Fill" Height="80" Width="80" />
</Button>
<Button Style="{StaticResource Styles.Button.Apply}" Click="button_ok_Click"/>
</StackPanel>
</Grid>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/ResetAction.cs
View file @
9d9eb204
...
...
@@ -136,7 +136,7 @@ namespace FLY.ControlLibrary
/// <summary>
/// ResetAction2 的 XAML 版 ,附加行为。
///
与 NoToggleButton 控件 一起使用
///
还没完成
/// </summary>
public
class
ResetBehavior
:
Behavior
<
UIElement
>
{
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/ButtonStyle.xaml
View file @
9d9eb204
...
...
@@ -43,7 +43,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="36" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template">
<Setter.Value>
...
...
@@ -73,7 +73,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template">
<Setter.Value>
...
...
@@ -106,7 +106,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template">
<Setter.Value>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/ButtonStyle2.xaml
View file @
9d9eb204
...
...
@@ -41,7 +41,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="36" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template">
<Setter.Value>
...
...
@@ -71,7 +71,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template">
<Setter.Value>
...
...
@@ -104,7 +104,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template">
<Setter.Value>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/CardStyle.xaml
View file @
9d9eb204
...
...
@@ -15,7 +15,13 @@
<Setter Property="Padding" Value="20 5"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
<Style x:Key="Styles.Card.Title2" TargetType="TextBlock">
<Setter Property="Background" Value="#FFC107"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Padding" Value="20 5"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
<Style x:Key="Styles.Card.Border" TargetType="Border">
<Setter Property="Margin" Value="5"/>
<Setter Property="Background" Value="{StaticResource MahApps.Brushes.ThemeBackground}"/>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/Colors2.xaml
View file @
9d9eb204
...
...
@@ -4,9 +4,9 @@
<!--激活颜色-->
<SolidColorBrush x:Key="Brushes.Activity" Color="{StaticResource MahApps.Colors.AccentBase}"/>
<!--不活动颜色-->
<SolidColorBrush x:Key="Brushes.Static" Color="{StaticResource MahApps.Colors.Gray
2
}"/>
<SolidColorBrush x:Key="Brushes.Static" Color="{StaticResource MahApps.Colors.Gray
1
}"/>
<!--不活动颜色-->
<SolidColorBrush x:Key="Brushes.NoAct" Color="{StaticResource MahApps.Colors.Gray
5
}"/>
<SolidColorBrush x:Key="Brushes.NoAct" Color="{StaticResource MahApps.Colors.Gray
2
}"/>
<!--背景色-->
<SolidColorBrush x:Key="Brushes.ThemeBackground" Color="{StaticResource MahApps.Colors.ThemeBackground}"/>
<!--激活的字颜色-->
...
...
@@ -28,7 +28,17 @@
<SolidColorBrush>#3f51b4</SolidColorBrush>
<SolidColorBrush>#ccdb39</SolidColorBrush>
</x:Array>
<x:Array x:Key="Brushes.Random.Dark" Type="SolidColorBrush">
<SolidColorBrush>#104673</SolidColorBrush>
<SolidColorBrush>#731f19</SolidColorBrush>
<SolidColorBrush>#806104</SolidColorBrush>
<SolidColorBrush>#2d3a40</SolidColorBrush>
<SolidColorBrush>#801137</SolidColorBrush>
<SolidColorBrush>#1c401d</SolidColorBrush>
<SolidColorBrush>#1b224d</SolidColorBrush>
<SolidColorBrush>#474d14</SolidColorBrush>
</x:Array>
<!--扫描图,纵向趋势图Y轴 标签颜色-->
<SolidColorBrush x:Key="Brushes.Area0">#f34336</SolidColorBrush>
<SolidColorBrush x:Key="Brushes.Area1">#fec007</SolidColorBrush>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/Dictionary_MyStyle.xaml
View file @
9d9eb204
...
...
@@ -15,12 +15,13 @@
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/UiModuleStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/IconButtonStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/ButtonStyle2.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/SectionStyle2.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/TextStyle2.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/UiModuleStyle2.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/IconButtonStyle2.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/CardStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/PgMenuStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
\ No newline at end of file
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/IconButtonStyle.xaml
View file @
9d9eb204
...
...
@@ -18,7 +18,7 @@
<Setter Property="Foreground" Value="Black"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="FontFamily" Value="
YouYuan
"/>
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
"/>
<Setter Property="Margin" Value="3"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" >
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/IconButtonStyle2.xaml
View file @
9d9eb204
...
...
@@ -11,6 +11,27 @@
<!--标准图标按钮 内部为iconPacks的按键,下方可带文字 -->
<Style TargetType="iconPacks:PackIconMaterial" x:Key="Styles.Icon.Base" >
<Setter Property="Width" Value="36"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" x:Key="Styles.Icon.Small" >
<Setter Property="Width" Value="25"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" x:Key="Styles.Icon.Large" >
<Setter Property="Width" Value="50"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" x:Key="Styles.Icon.Rectangle" >
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style TargetType="Button" x:Key="Styles.Button.Icon" BasedOn="{StaticResource Styles.Button.Empty}">
<Style.Resources>
<Style TargetType="TextBlock" >
...
...
@@ -18,15 +39,10 @@
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Text}"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="FontFamily" Value="
YouYuan
"/>
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
"/>
<Setter Property="Margin" Value="3"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" >
<Setter Property="Width" Value="36"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" BasedOn="{StaticResource Styles.Icon.Base}"/>
</Style.Resources>
<Style.Setters>
<Setter Property="Foreground" Value="{StaticResource Brushes.Activity}"/>
...
...
@@ -38,11 +54,7 @@
<!--小型图标按钮 内部为iconPacks的按键,下方不带文字 -->
<Style TargetType="Button" x:Key="Styles.Button.Icon.Small" BasedOn="{StaticResource Styles.Button.Empty}">
<Style.Resources>
<Style TargetType="iconPacks:PackIconMaterial" >
<Setter Property="Width" Value="25"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" BasedOn="{StaticResource Styles.Icon.Small}"/>
</Style.Resources>
<Style.Setters>
<Setter Property="Foreground" Value="{StaticResource Brushes.Activity}"/>
...
...
@@ -59,11 +71,7 @@
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Text}"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" >
<Setter Property="Width" Value="50"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" BasedOn="{StaticResource Styles.Icon.Large}"/>
</Style.Resources>
<Style.Setters>
<Setter Property="Foreground" Value="{StaticResource Brushes.Activity}"/>
...
...
@@ -123,12 +131,7 @@
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Style.Resources>
<Style TargetType="iconPacks:PackIconMaterial" >
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="iconPacks:PackIconMaterial" BasedOn="{StaticResource Styles.Icon.Rectangle}"/>
</Style.Resources>
</Style>
</ResourceDictionary>
\ No newline at end of file
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/NoToggleButtonStyle.xaml
View file @
9d9eb204
...
...
@@ -22,7 +22,7 @@
<Grid>
<Rectangle x:Name="Path_block" Height="45" Width="24" Margin="5" Fill="White" HorizontalAlignment="Left"/>
<StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="20,15" HorizontalAlignment="Right">
<TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="24" FontFamily="
YouYuan
"/>
<TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="24" FontFamily="
Microsoft Sans Serif
"/>
</StackPanel>
</Grid>
</Border>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/PgMenuStyle.xaml
0 → 100644
View file @
9d9eb204
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/ButtonStyle2.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="Styles.PgMenu.ItemText" TargetType="TextBlock">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="40"/>
<Setter Property="Background" Value="#C00083D7"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="Styles.PgMenu.ItemImage" TargetType="Image">
<Setter Property="Stretch" Value="UniformToFill"/>
</Style>
<Style x:Key="Styles.PgMenu.ItemButton" TargetType="Button" BasedOn="{StaticResource Styles.Button.Empty}">
<Setter Property="Background" Value="#FF0083D7"/>
<Setter Property="Width" Value="225"/>
<Setter Property="Height" Value="140"/>
<Setter Property="Margin" Value="5"/>
<Style.Resources>
<Style TargetType="TextBlock" BasedOn="{StaticResource Styles.PgMenu.ItemText}"/>
<Style TargetType="Image" BasedOn="{StaticResource Styles.PgMenu.ItemImage}"/>
</Style.Resources>
</Style>
</ResourceDictionary>
\ No newline at end of file
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/SectionStyle.xaml
View file @
9d9eb204
...
...
@@ -11,7 +11,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="30" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="TextAlignment" Value="Right" />
</Style>
...
...
@@ -42,7 +42,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="30" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="TextAlignment" Value="Right" />
</Style>
...
...
@@ -52,7 +52,7 @@
<Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="60" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/SectionStyle2.xaml
View file @
9d9eb204
...
...
@@ -14,7 +14,7 @@
<Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="30" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="TextAlignment" Value="Right" />
</Style>
...
...
@@ -44,11 +44,20 @@
<Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="60" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style TargetType="TextBlock" x:Key="Styles.TitleBar.Text2" BasedOn="{StaticResource Styles.TitleBar.Text}">
<Setter Property="Foreground" Value="Black" />
</Style>
<!-- 参数页副标题 -->
<Style TargetType="TextBlock" x:Key="Styles.TitleBar.Text.Sub" BasedOn="{StaticResource Styles.TitleBar.Text}">
<Setter Property="Foreground" Value="LightGray" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="Margin" Value="5,0" />
<Setter Property="FontSize" Value="30" />
</Style>
<!--标题区,左边的后退键(蓝底白图标)-->
<Style TargetType="Button" x:Key="Styles.TitleBar.BackButton" BasedOn="{StaticResource Styles.Button.Empty}">
<Setter Property="Width" Value="80"/>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/Styles.cs
View file @
9d9eb204
...
...
@@ -11,19 +11,22 @@ namespace FLY.ControlLibrary.Themes
public
static
class
Styles
{
static
List
<
SolidColorBrush
>
randomColors
;
static
List
<
SolidColorBrush
>
randomColorsDark
;
public
static
List
<
SolidColorBrush
>
AreaColors
;
static
Styles
()
{
ResourceDictionary
resourceDictionary
=
new
ResourceDictionary
()
{
Source
=
new
Uri
(
"pack://application:,,,/FLY.ControlLibrary;component/Themes/Colors.xaml"
)
};
ResourceDictionary
resourceDictionary
=
new
ResourceDictionary
()
{
Source
=
new
Uri
(
"pack://application:,,,/FLY.ControlLibrary;component/Themes/Colors
2
.xaml"
)
};
AreaColors
=
new
List
<
SolidColorBrush
>();
for
(
int
i
=
0
;
i
<
5
;
i
++)
AreaColors
.
Add
(
resourceDictionary
[
$"
AreaColors
{
i
}
"
]
as
SolidColorBrush
);
AreaColors
.
Add
(
resourceDictionary
[
$"
Brushes.Area
{
i
}
"
]
as
SolidColorBrush
);
randomColors
=
new
List
<
SolidColorBrush
>();
randomColors
.
AddRange
(
resourceDictionary
[
"
RandomColors
"
]
as
IEnumerable
<
SolidColorBrush
>);
randomColors
.
AddRange
(
resourceDictionary
[
"
Brushes.Random
"
]
as
IEnumerable
<
SolidColorBrush
>);
randomColorsDark
=
new
List
<
SolidColorBrush
>();
randomColorsDark
.
AddRange
(
resourceDictionary
[
"Brushes.Random.Dark"
]
as
IEnumerable
<
SolidColorBrush
>);
//randomColors = new SolidColorBrush[] {
// new SolidColorBrush((Color)ColorConverter.ConvertFromString("#2195f2")),
// new SolidColorBrush((Color)ColorConverter.ConvertFromString("#f34336")),
...
...
@@ -49,17 +52,12 @@ namespace FLY.ControlLibrary.Themes
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
public
static
Brush
GetForeground
(
int
index
)
public
static
Brush
GetForeground
(
int
index
,
bool
isDark
=
false
)
{
//XamlReader.Loadnew FileStream(@"C:\Users\wppcn\source\repos\网易云\网易云\Resourece\SvgImgResource.xaml", FileMode.Open)) as ResourceDictionary;
//string assembleName = typeof(Styles).Assembly.GetName().Name;//本程序集名
//Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream($"{assembleName}.Themes.Styles.xaml");//获取嵌入资源生成流,XMLPATH为嵌入资源路径,资源名称访问路径为:assemblename.文件夹名.资源名
//XamlReader.Load(stream) as
//IEnumerable<SolidColorBrush> randomColors = App.Current.FindResource("RandomColors") as IEnumerable<SolidColorBrush>;
return
randomColors
.
ElementAt
(
index
%
randomColors
.
Count
());
if
(
isDark
)
return
randomColorsDark
.
ElementAt
(
index
%
randomColorsDark
.
Count
());
else
return
randomColors
.
ElementAt
(
index
%
randomColors
.
Count
());
}
}
}
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/TextStyle.xaml
View file @
9d9eb204
...
...
@@ -41,7 +41,7 @@
<Setter Property="Foreground" Value="#FF0083D7" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="22" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="TextAlignment" Value="Left" />
</Style>
...
...
@@ -51,7 +51,7 @@
<Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="22" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="TextAlignment" Value="Left" />
</Style>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/TextStyle2.xaml
View file @
9d9eb204
...
...
@@ -47,7 +47,7 @@
<Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="{StaticResource FontSize.FieldHeader}" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="TextAlignment" Value="Left" />
</Style>
...
...
@@ -60,7 +60,11 @@
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldHeader.Editable" BasedOn="{StaticResource Styles.Text.FieldHeader}">
<Setter Property="Foreground" Value="#FF0083D7" />
</Style>
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldHeader.Comment" BasedOn="{StaticResource Styles.Text.FieldHeader}">
<Setter Property="Foreground" Value="#FF888888" />
<Setter Property="FontSize" Value="13" />
</Style>
<!-- 可写项 的标题 2行 -->
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldHeader.Editable.Row2" BasedOn="{StaticResource Styles.Text.FieldHeader.Editable}">
<Setter Property="FontSize" Value="{StaticResource FontSize.FieldHeader.Small}" />
...
...
@@ -70,9 +74,9 @@
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldContent">
<Setter Property="Margin" Value="{StaticResource Margin.Text}" />
<Setter Property="Foreground" Value="#FF3B3B3B" />
<
Setter Property="FontWeight" Value="Bold" /
>
<
!--<Setter Property="FontWeight" Value="Bold" />--
>
<Setter Property="FontSize" Value="{StaticResource FontSize.FieldContent}" />
<Setter Property="FontFamily" Value="
Arial
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="TextAlignment" Value="Left" />
</Style>
...
...
@@ -80,9 +84,9 @@
<Style TargetType="TextBox" x:Key="Styles.Text.FieldContent.Input" BasedOn="{StaticResource Styles.Text.Input}">
<Setter Property="Margin" Value="{StaticResource Margin.Text}" />
<Setter Property="Foreground" Value="#FF3B3B3B" />
<
Setter Property="FontWeight" Value="Bold" /
>
<
!--<Setter Property="FontWeight" Value="Bold" />--
>
<Setter Property="FontSize" Value="{StaticResource FontSize.FieldContent}" />
<Setter Property="FontFamily" Value="
Arial
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="MinWidth" Value="30" />
</Style>
...
...
@@ -104,7 +108,7 @@
<Style TargetType="TextBlock" x:Key="Styles.Text.FieldContent.Unit">
<Setter Property="Foreground" Value="#FF888888" />
<Setter Property="FontSize" Value="{StaticResource FontSize.FieldContent.Small}" />
<Setter Property="FontFamily" Value="
Arial
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Bottom" />
</Style>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/ToggleButtonOnOffStyle.xaml
View file @
9d9eb204
...
...
@@ -21,7 +21,7 @@
<Grid>
<Rectangle x:Name="Path_block" Height="45" Width="24" Margin="5" Fill="White" HorizontalAlignment="Left"/>
<StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="20,15" HorizontalAlignment="Right">
<TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="24" FontFamily="
YouYuan
"/>
<TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="24" FontFamily="
Microsoft Sans Serif
"/>
</StackPanel>
</Grid>
</Border>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/UiModuleStyle2.xaml
View file @
9d9eb204
...
...
@@ -14,4 +14,28 @@
</Setter.Value>
</Setter>
</Style>
<!--动态区 UiModule 的 每个项的小标题-->
<Style TargetType="TextBlock" x:Key="Styles.Module.Text.ItemHeader">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontFamily" Value="Microsoft Sans Serif"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Margin" Value="3,0"/>
</Style>
<Style TargetType="TextBlock" x:Key="Styles.Module.Text.ItemValue">
<Setter Property="FontFamily" Value="Microsoft Sans Serif"/>
<Setter Property="FontSize" Value="24"/>
</Style>
<Style TargetType="TextBlock" x:Key="Styles.Module.Text.ItemValue.Separator">
<Setter Property="Foreground" Value="#FF888888" />
<Setter Property="FontSize" Value="24" />
<Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Text" Value="|"/>
</Style>
<Style TargetType="TextBlock" x:Key="Styles.Module.Text.ItemValue.Unit">
<Setter Property="Foreground" Value="#FF555555" />
<Setter Property="FontSize" Value="12" />
<Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="VerticalAlignment" Value="Bottom" />
</Style>
</ResourceDictionary>
\ No newline at end of file
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/WindowBigCloseStyle.xaml
View file @
9d9eb204
...
...
@@ -17,7 +17,7 @@
</Border>
<Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="5" Height="110" Width="{Binding Height,RelativeSource={RelativeSource Mode=Self}}" >
<Ellipse Fill="White" Stretch="Fill" />
<Button Name="button_close" Style="{StaticResource
ButtonStyle_e
mpty}" Margin="5" BorderThickness="0" >
<Button Name="button_close" Style="{StaticResource
Styles.Button.E
mpty}" Margin="5" BorderThickness="0" >
<Path Data="{StaticResource Geometry_close-circle}" Fill="Red" Stretch="Fill" />
</Button>
</Grid>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Window_Tip.xaml
View file @
9d9eb204
...
...
@@ -13,10 +13,10 @@
<Border BorderThickness="1" BorderBrush="Black">
<Grid>
<StackPanel Margin="10,5">
<TextBlock Text="{Binding Title}" FontWeight="Bold" FontSize="30" FontFamily="
YouYuan
" Margin="10,5"/>
<TextBlock Text="{Binding Message}" FontWeight="Bold" FontSize="15" FontFamily="
YouYuan
" Margin="20,5" TextWrapping="Wrap" />
<TextBlock Text="{Binding Title}" FontWeight="Bold" FontSize="30" FontFamily="
Microsoft Sans Serif
" Margin="10,5"/>
<TextBlock Text="{Binding Message}" FontWeight="Bold" FontSize="15" FontFamily="
Microsoft Sans Serif
" Margin="20,5" TextWrapping="Wrap" />
</StackPanel>
<Button Style="{StaticResource ResourceKey=
ButtonStyle_e
mpty}" Command="{Binding CloseCmd}" Background="Red" VerticalAlignment="Top" HorizontalAlignment="Right" >
<Button Style="{StaticResource ResourceKey=
Styles.Button.E
mpty}" Command="{Binding CloseCmd}" Background="Red" VerticalAlignment="Top" HorizontalAlignment="Right" >
<Path Data="{StaticResource ResourceKey=Geometry_window-close}" Fill="White" Height="36" Width="36" Stretch="Fill" SnapsToDevicePixels="True" Margin="4"/>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Window_WarningTip.xaml
View file @
9d9eb204
...
...
@@ -11,7 +11,7 @@
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="
YouYuan
" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template">
<Setter.Value>
...
...
@@ -41,8 +41,8 @@
<Grid>
<Border Background="Red" Opacity="0.9" />
<StackPanel Margin="80,40">
<TextBlock Text="{Binding Title}" FontWeight="Bold" FontSize="72" FontFamily="
YouYuan
" Margin="40,20" Foreground="White" />
<TextBlock Text="{Binding Message}" FontWeight="Bold" FontSize="36" FontFamily="
YouYuan
" Margin="40,20" TextWrapping="Wrap" Foreground="White" />
<TextBlock Text="{Binding Title}" FontWeight="Bold" FontSize="72" FontFamily="
Microsoft Sans Serif
" Margin="40,20" Foreground="White" />
<TextBlock Text="{Binding Message}" FontWeight="Bold" FontSize="36" FontFamily="
Microsoft Sans Serif
" Margin="40,20" TextWrapping="Wrap" Foreground="White" />
</StackPanel>
<StackPanel Orientation="Horizontal" FlowDirection="RightToLeft" VerticalAlignment="Bottom" Margin="10,0">
<StackPanel.Resources>
...
...
@@ -78,7 +78,7 @@
</Style>
</StackPanel.Resources>
<Button Content="{Binding OKContent}" FontFamily="
YouYuan
" Click="button_ok_Click"/>
<Button Content="{Binding OKContent}" FontFamily="
Microsoft Sans Serif
" Click="button_ok_Click"/>
</StackPanel>
</Grid>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment