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
ae86705a
Commit
ae86705a
authored
Jan 11, 2025
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 MultiLayout左下角的设置图标,可以加载根目录下的LOGO.png ,显示商标。
添加 密码输入框全局使用。
parent
5a3153e2
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
265 additions
and
146 deletions
+265
-146
App.xaml
MultiLayout/App.xaml
+1
-1
FlyLayout.cs
MultiLayout/FlyLayout.cs
+48
-0
MainWindow.xaml.cs
MultiLayout/MainWindow.xaml.cs
+12
-29
MultiLayout.csproj
MultiLayout/MultiLayout.csproj
+2
-10
UcSingleGage.xaml
MultiLayout/UcSingleGage.xaml
+64
-0
UcSingleGage.xaml.cs
MultiLayout/UcSingleGage.xaml.cs
+3
-5
UcSingleGage.xaml
MultiLayout/UcSingleGage/UcSingleGage.xaml
+0
-60
UcSingleGageStyle.xaml
MultiLayout/UcSingleGage/UcSingleGageStyle.xaml
+0
-35
FLY.Thick.Base.UI.csproj
...FLY.Thick.Base/FLY.Thick.Base.UI/FLY.Thick.Base.UI.csproj
+7
-0
OnInitAuthorize.cs
...LY.Thick.Base/FLY.Thick.Base.UI/OnInit/OnInitAuthorize.cs
+26
-2
OnInitReboot.cs
...t.FLY.Thick.Base/FLY.Thick.Base.UI/OnInit/OnInitReboot.cs
+1
-1
StringResource.Menu.xaml
...ase.UI/Themes/StringResources/zh/StringResource.Menu.xaml
+1
-0
DynAreaIO2.xaml
...FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaIO2.xaml
+3
-1
MenuAlarm.xaml
....FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/MenuAlarm.xaml
+23
-0
MenuAlarm.xaml.cs
...Y.Thick.Base/FLY.Thick.Base.UI/UiModule/MenuAlarm.xaml.cs
+72
-0
MenuMotion.xaml.cs
....Thick.Base/FLY.Thick.Base.UI/UiModule/MenuMotion.xaml.cs
+1
-1
MenuSetting.xaml.cs
...Thick.Base/FLY.Thick.Base.UI/UiModule/MenuSetting.xaml.cs
+1
-1
No files found.
MultiLayout/App.xaml
View file @
ae86705a
...
...
@@ -14,7 +14,7 @@
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Styles.xaml"/>
<!--项目字符串-->
<ResourceDictionary Source="pack://application:,,,/MultiLayout;component/Themes/StringResources/StringResource.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MultiLayout;component/Themes/StringResources/
zh/
StringResource.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="GroupBox" />
...
...
MultiLayout/FlyLayout.cs
View file @
ae86705a
...
...
@@ -8,6 +8,7 @@ using System.Text;
using
System.Threading.Tasks
;
using
System.Windows
;
using
System.Windows.Controls
;
using
System.Windows.Media.Imaging
;
namespace
MultiLayout
{
...
...
@@ -50,6 +51,16 @@ namespace MultiLayout
/// </summary>
public
bool
IsLogoHidden
{
get
;
set
;
}
/// <summary>
/// 显示从brand.png 或 logo.png 导入的图片
/// </summary>
public
bool
IsShowBrandPic
=>
!
IsLogoHidden
&&
BrandPic
!=
null
;
/// <summary>
/// LOGO 图片
/// </summary>
public
BitmapImage
BrandPic
{
get
;
private
set
;
}
#
region
上一次界面状态
...
...
@@ -119,6 +130,8 @@ namespace MultiLayout
}
}
}
updateLogo
();
}
/// <summary>
/// 保存
...
...
@@ -142,6 +155,41 @@ namespace MultiLayout
}
void
updateLogo
()
{
BitmapImage
brandPic
=
null
;
List
<
string
>
brandPicPaths
=
new
List
<
string
>()
{
"logo.png"
,
"logo.bmp"
,
"logo.jpg"
,
"brand.png"
};
foreach
(
var
brandPicPath
in
brandPicPaths
)
{
string
path
=
AppDomain
.
CurrentDomain
.
BaseDirectory
+
brandPicPath
;
if
(
System
.
IO
.
File
.
Exists
(
path
))
{
try
{
BitmapImage
bitmapImage
=
new
BitmapImage
();
//初始化BitmapImage类的一个新实例
bitmapImage
.
BeginInit
();
//表示BitmapImage初始化开始
bitmapImage
.
CacheOption
=
BitmapCacheOption
.
OnLoad
;
bitmapImage
.
UriSource
=
new
Uri
(
path
);
//获取或设置BitmapImage的Uri源
bitmapImage
.
EndInit
();
//表示BitmapImage初始化结束
brandPic
=
bitmapImage
;
break
;
}
catch
{
continue
;
}
}
}
BrandPic
=
brandPic
;
}
/// <summary>
///
/// </summary>
...
...
MultiLayout/MainWindow.xaml.cs
View file @
ae86705a
using
MultiLayout
;
using
System
;
using
System.Collections.Generic
;
using
System
;
using
System.ComponentModel
;
using
System.IO
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
System.Windows.Controls
;
using
System.Windows.Data
;
using
System.Windows.Documents
;
using
System.Windows.Input
;
using
System.Windows.Media
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Navigation
;
using
System.Windows.Shapes
;
using
Unity
;
using
UnityConfigurationTree
;
using
LoadingProgress
=
MultiLayout
.
LoadingProgress
;
namespace
MultiLayout
{
...
...
@@ -38,14 +26,14 @@ namespace MultiLayout
public
MainWindow
()
{
InitializeComponent
();
viewModel
=
new
WdMainVm
();
this
.
DataContext
=
viewModel
;
//为了隐藏报警条
container
=
new
UnityContainer
();
Application
.
Current
.
Properties
[
"container"
]
=
container
;
}
private
async
void
MainWindow_Loaded
(
object
sender
,
RoutedEventArgs
e
)
{
//---------------------------------------------------------
...
...
@@ -60,14 +48,7 @@ namespace MultiLayout
//---------------------------------------------------------
//加载 unity
container
.
RegisterInstance
(
lp
);
if
(
Register
!=
null
)
{
Register
.
Invoke
(
container
);
}
else
{
UnityConfExt
.
Load
(
container
);
}
Register
(
container
);
container
.
RegisterInstance
<
Window
>(
this
);
//---------------------------------------------------------
...
...
@@ -104,7 +85,8 @@ namespace MultiLayout
//FObjBase.PollModule.Current.Start();
ErrMsgJsonDb
jsonDb
=
new
ErrMsgJsonDb
();
if
(
jsonDb
.
Load
())
{
if
(
jsonDb
.
Load
())
{
var
m
=
btnErrMsg
.
Margin
;
m
.
Right
=
jsonDb
.
Right
;
btnErrMsg
.
Margin
=
m
;
...
...
@@ -132,11 +114,11 @@ namespace MultiLayout
jsonDb
.
Save
();
}
}
public
class
ErrMsgJsonDb
public
class
ErrMsgJsonDb
{
public
int
Right
;
private
string
filePath
=
"errMsgPosition.json"
;
public
bool
Save
()
public
bool
Save
()
{
try
{
...
...
@@ -149,7 +131,7 @@ namespace MultiLayout
return
false
;
}
}
public
bool
Load
()
public
bool
Load
()
{
if
(!
File
.
Exists
(
filePath
))
return
false
;
...
...
@@ -159,12 +141,13 @@ namespace MultiLayout
Newtonsoft
.
Json
.
JsonConvert
.
PopulateObject
(
json
,
this
);
return
true
;
}
catch
{
catch
{
return
false
;
}
}
}
public
class
WdMainVm
:
INotifyPropertyChanged
public
class
WdMainVm
:
INotifyPropertyChanged
{
public
event
PropertyChangedEventHandler
PropertyChanged
;
...
...
MultiLayout/MultiLayout.csproj
View file @
ae86705a
...
...
@@ -128,7 +128,7 @@
<Compile
Include=
"UcMultiGage\UcMultiGage.xaml.cs"
>
<DependentUpon>
UcMultiGage.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"UcSingleGage
\UcSingleGage
.xaml.cs"
>
<Compile
Include=
"UcSingleGage.xaml.cs"
>
<DependentUpon>
UcSingleGage.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"FlyLayout.cs"
/>
...
...
@@ -291,11 +291,7 @@
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"UcSingleGage\UcSingleGage.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"UcSingleGage\UcSingleGageStyle.xaml"
>
<Page
Include=
"UcSingleGage.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
...
...
@@ -359,10 +355,6 @@
<Project>
{119c3adc-f8e1-4f72-b89b-006236ff8586}
</Project>
<Name>
FLY.ControlLibrary
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\UnityConfigurationTree\UnityConfigurationTree.csproj"
>
<Project>
{3340b6f4-74b5-4a0e-8912-951222642e77}
</Project>
<Name>
UnityConfigurationTree
</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Resource
Include=
"Images\buildingblock.jpg"
/>
...
...
MultiLayout/UcSingleGage.xaml
0 → 100644
View file @
ae86705a
<UserControl x:Class="MultiLayout.UcSingleGage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:MultiLayout"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:uiModule="clr-namespace:MultiLayout.UiModule"
mc:Ignorable="d uiModule"
d:DesignHeight="768" d:DesignWidth="1024"
d:DataContext="{d:DesignData Source=UnitTest/FlyLayout.xaml}">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Converters.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MultiLayout;component/Themes/GraphTab.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid Background="{StaticResource Brushes.Gray5}">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--按钮区-->
<Grid Width="70" Background="{StaticResource Brushes.Gray1}">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<StackPanel Name="stackpanel_menu" />
<Button Grid.Row="1" Style="{StaticResource Styles.Button.Empty}" Click="button_option_click">
<Grid MinHeight="40" MaxHeight="150">
<!--有LOGO时显示LOGO-->
<Image Visibility="{Binding IsShowBrandPic,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}"
Source="{Binding BrandPic}"/>
<!--没有LOGO,显示图标-->
<iconPacks:PackIconMaterial Style="{StaticResource Styles.Icon.Base}" HorizontalAlignment="Left" Margin="{StaticResource ControlMargin}" Foreground="{StaticResource Brushes.Text.White}"
Kind="ViewQuilt"
Visibility="{Binding IsShowBrandPic,Converter={StaticResource visbilityconv},ConverterParameter=CollapsedWhenTrue}"/>
</Grid>
</Button>
</Grid>
<!--状态区-->
<Viewbox Grid.Column="1"
MaxWidth="{Binding DynAreaWidth}"
Visibility="{Binding IsDynAreaVisible,Converter={StaticResource visbilityconv}, ConverterParameter=Collapsed}"
VerticalAlignment="Top" HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="2" >
<StackPanel Name="stackpanel_dynarea" Width="250"/>
</Viewbox>
<!--图表区-->
<TabControl Grid.Column="2" Name="tabControl_graph" Template="{StaticResource GraphTab}">
<TabItem Header="TEST"/>
<TabItem Header="TEST2"/>
<TabItem Header="TEST3"/>
</TabControl>
</Grid>
</Grid>
</UserControl>
\ No newline at end of file
MultiLayout/UcSingleGage
/UcSingleGage
.xaml.cs
→
MultiLayout/UcSingleGage.xaml.cs
View file @
ae86705a
...
...
@@ -34,11 +34,8 @@ namespace MultiLayout
private
void
button_option_click
(
object
sender
,
RoutedEventArgs
e
)
{
if
(
FlyLayoutManager
.
Authorize
!=
null
)
{
if
(!
FlyLayoutManager
.
Authorize
.
Invoke
(
"Menu"
))
return
;
}
if
(
FlyLayoutManager
.
Authorize
?.
Invoke
(
"Menu"
)
==
false
)
return
;
PgMenu
p
=
new
PgMenu
();
p
.
Init
(
manager
);
FlyLayoutManager
.
NavigationService
.
Navigate
(
p
);
...
...
@@ -49,4 +46,5 @@ namespace MultiLayout
manager
.
ErrMsgClick
?.
Invoke
();
}
}
}
MultiLayout/UcSingleGage/UcSingleGage.xaml
deleted
100644 → 0
View file @
5a3153e2
<UserControl x:Class="MultiLayout.UcSingleGage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:MultiLayout"
xmlns:uiModule="clr-namespace:MultiLayout.UiModule"
mc:Ignorable="d uiModule"
d:DesignHeight="768" d:DesignWidth="1024"
d:DataContext="{d:DesignData Source=../UnitTest/FlyLayout.xaml}">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="UcSingleGageStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid Background="{StaticResource Brushes.Gray5}">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Name="stackpanel_menu" Width="73" Background="{StaticResource Brushes.Gray1}">
</StackPanel>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid>
<Viewbox
MaxWidth="{Binding DynAreaWidth}"
Visibility="{Binding IsDynAreaVisible,Converter={StaticResource visbilityconv}, ConverterParameter=Collapsed}"
VerticalAlignment="Top" HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="2" >
<StackPanel Name="stackpanel_dynarea" Width="250">
</StackPanel>
</Viewbox>
</Grid>
<TabControl Grid.Column="1" Name="tabControl_graph" Template="{StaticResource GraphTab}">
<TabItem Header="TEST"/>
<TabItem Header="TEST2"/>
<TabItem Header="TEST3"/>
</TabControl>
</Grid>
</Grid>
<Grid >
<Button Style="{StaticResource ButtonStyle_option}" Click="button_option_click" />
</Grid>
</Grid>
</UserControl>
\ No newline at end of file
MultiLayout/UcSingleGage/UcSingleGageStyle.xaml
deleted
100644 → 0
View file @
5a3153e2
<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/Converter/Converters.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MultiLayout;component/Themes/GraphTab.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Button" x:Key="ButtonStyle_option" BasedOn="{StaticResource Styles.Button.Empty}">
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Setter Property="Foreground" Value="{StaticResource Brushes.Text.White}"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="Content">
<Setter.Value>
<StackPanel Margin="{StaticResource ControlMargin}" RenderTransformOrigin="0.25,0.5">
<StackPanel.RenderTransform>
<TransformGroup>
<RotateTransform Angle="-90"/>
</TransformGroup>
</StackPanel.RenderTransform>
<TextBlock Margin="2" Text="枫莱尔" FontSize="18" FontWeight="Bold" />
<TextBlock Margin="2" Text="FLY Automation" FontSize="9" />
</StackPanel>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsLogoHidden}" Value="True">
<Setter Property="Content">
<Setter.Value>
<Path Data="{StaticResource Geometry_view-quilt}" Height="36" Width="36" Stretch="Fill" Fill="{StaticResource Brushes.Text.White}" SnapsToDevicePixels="True"/>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
\ No newline at end of file
Project.FLY.Thick.Base/FLY.Thick.Base.UI/FLY.Thick.Base.UI.csproj
View file @
ae86705a
...
...
@@ -220,6 +220,9 @@
<Compile
Include=
"UiModule\MenuProfile.xaml.cs"
>
<DependentUpon>
MenuProfile.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"UiModule\MenuAlarm.xaml.cs"
>
<DependentUpon>
MenuAlarm.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"UiModule\MenuSetting.xaml.cs"
>
<DependentUpon>
MenuSetting.xaml
</DependentUpon>
</Compile>
...
...
@@ -590,6 +593,10 @@
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"UiModule\MenuAlarm.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"UiModule\MenuSetting.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/OnInit/OnInitAuthorize.cs
View file @
ae86705a
using
System
;
using
Misc
;
using
MultiLayout
;
using
MultiLayout.UiModule
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
FLY.Thick.Base.UI.OnInit
{
class
OnInitAuthorize
public
class
OnInitAuthorize
:
IOnInit
,
INotifyPropertyChanged
{
ParamDictionary
paramDictionary
;
public
OnInitAuthorize
(
ParamDictionary
paramDictionary
,
int
lv
=
1
)
{
this
.
paramDictionary
=
paramDictionary
;
Level
=
lv
;
}
public
int
Level
{
get
;
}
public
event
PropertyChangedEventHandler
PropertyChanged
;
public
void
OnInit
()
{
FlyLayoutManager
.
Authorize
=
WdPassword
.
Authorize
;
}
}
}
Project.FLY.Thick.Base/FLY.Thick.Base.UI/OnInit/OnInitReboot.cs
View file @
ae86705a
...
...
@@ -14,7 +14,7 @@ using FObjBase;
namespace
FLY.Thick.Base.UI.OnInit
{
/// <summary>
///
虚拟键盘
///
/// </summary>
public
class
OnInitReboot
:
IOnInit
,
INotifyPropertyChanged
{
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Themes/StringResources/zh/StringResource.Menu.xaml
View file @
ae86705a
...
...
@@ -12,4 +12,5 @@
<system:String x:Key="str.Menu.Forw">正行</system:String>
<system:String x:Key="str.Menu.Craft">产品</system:String>
<system:String x:Key="str.Menu.Setting">设置</system:String>
<system:String x:Key="str.Menu.Alarm">报警</system:String>
</ResourceDictionary>
\ No newline at end of file
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaIO2.xaml
View file @
ae86705a
...
...
@@ -3,12 +3,14 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FLY.Thick.Base.UI.UiModule" xmlns:conv="clr-namespace:FLY.Thick.Base.UI.Converter"
xmlns:local="clr-namespace:FLY.Thick.Base.UI.UiModule"
xmlns:conv="clr-namespace:FLY.Thick.Base.UI.Converter"
d:DesignWidth="250"
mc:Ignorable="d" >
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Converters.xaml"/>
</ResourceDictionary.MergedDictionaries>
<conv:IO2BitColorConverter x:Key="io2bitcolorconv" />
<Style TargetType="Rectangle" x:Key="IOStyle">
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/MenuAlarm.xaml
0 → 100644
View file @
ae86705a
<UserControl x:Class="FLY.Thick.Base.UI.UiModule.MenuAlarm"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d" >
<UserControl.Resources>
<ResourceDictionary>
<SolidColorBrush x:Key="IconBrush" Color="{StaticResource Colors.Text.White}" />
<SolidColorBrush x:Key="TextBrush" Color="{StaticResource Colors.Text.White}" />
</ResourceDictionary>
</UserControl.Resources>
<StackPanel>
<Button Style="{StaticResource Styles.Button.Icon}" Foreground="{StaticResource IconBrush}"
Click="btnProfileClick">
<StackPanel >
<iconPacks:PackIconMaterial Kind="AlarmLight" />
<TextBlock Text="{StaticResource str.Menu.Alarm}" Foreground="{StaticResource TextBrush}"/>
</StackPanel>
</Button>
</StackPanel>
</UserControl>
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/MenuAlarm.xaml.cs
0 → 100644
View file @
ae86705a
using
MultiLayout
;
using
MultiLayout.UiModule
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
System.Windows.Controls
;
using
System.Windows.Data
;
using
System.Windows.Documents
;
using
System.Windows.Input
;
using
System.Windows.Media
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Navigation
;
using
System.Windows.Shapes
;
using
Unity
;
namespace
FLY.Thick.Base.UI.UiModule
{
/// <summary>
/// MenuProfile.xaml 的交互逻辑
/// </summary>
public
partial
class
MenuAlarm
:
UserControl
{
IUnityContainer
container
;
public
MenuAlarm
()
{
InitializeComponent
();
}
[
InjectionMethod
]
public
void
Init
(
IUnityContainer
container
)
{
this
.
container
=
container
;
}
private
void
btnProfileClick
(
object
sender
,
RoutedEventArgs
e
)
{
var
p
=
this
.
container
.
Resolve
<
PgErrorsTable
>();
FlyLayoutManager
.
NavigationService
.
Navigate
(
p
);
}
}
public
class
UiModule2_MenuAlarm
:
IUiModule2
{
public
string
Title
=>
"全局.报警"
;
public
ComponentType
Type
=>
ComponentType
.
Menu
;
public
bool
IsUnique
=>
true
;
public
FrameworkElement
GetComponent
(
int
id
,
IUnityContainer
container
)
{
MenuAlarm
menu
=
new
MenuAlarm
();
container
.
BuildUp
(
menu
);
return
menu
;
}
public
FrameworkElement
GetThumbnail
()
{
return
new
System
.
Windows
.
Controls
.
Grid
();
}
public
void
MatchParam
(
int
[]
IDs
)
{
}
}
}
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/MenuMotion.xaml.cs
View file @
ae86705a
...
...
@@ -52,7 +52,7 @@ namespace FLY.Thick.Base.UI.UiModule
public
class
UiModule2_MenuMotion
:
IUiModule2
{
public
string
Title
=>
"测厚.
扫描运行
"
;
public
string
Title
=>
"测厚.
运动
"
;
public
ComponentType
Type
=>
ComponentType
.
Menu
;
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/MenuSetting.xaml.cs
View file @
ae86705a
...
...
@@ -47,7 +47,7 @@ namespace FLY.Thick.Base.UI.UiModule
public
class
UiModule2_MenuSetting
:
IUiModule2
{
public
string
Title
=>
"
电池
参数"
;
public
string
Title
=>
"参数"
;
public
ComponentType
Type
=>
ComponentType
.
Menu
;
...
...
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