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
ed3cf0e5
Commit
ed3cf0e5
authored
5 years ago
by
潘栩锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换 异常报警界面
parent
d638efef
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
640 additions
and
728 deletions
+640
-728
CtMicroGageStyle.xaml
....Base/FLY.Thick.Base.UI/CtMicroGage/CtMicroGageStyle.xaml
+1
-0
FLY.Thick.Base.UI.csproj
...FLY.Thick.Base/FLY.Thick.Base.UI/FLY.Thick.Base.UI.csproj
+27
-37
Page_Loading.xaml
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Page_Loading.xaml
+0
-1
PgErrorAllTable.xaml
...Thick.Base/FLY.Thick.Base.UI/PgError/PgErrorAllTable.xaml
+154
-0
PgErrorAllTable.xaml.cs
...ck.Base/FLY.Thick.Base.UI/PgError/PgErrorAllTable.xaml.cs
+89
-0
PgErrorTable.xaml
...LY.Thick.Base/FLY.Thick.Base.UI/PgError/PgErrorTable.xaml
+150
-0
PgErrorTable.xaml.cs
...Thick.Base/FLY.Thick.Base.UI/PgError/PgErrorTable.xaml.cs
+114
-0
WdFlyADAccess.xaml
...Y.Thick.Base/FLY.Thick.Base.UI/PgError/WdFlyADAccess.xaml
+2
-2
WdFlyADAccess.xaml.cs
...hick.Base/FLY.Thick.Base.UI/PgError/WdFlyADAccess.xaml.cs
+48
-41
WdIOTip.xaml
...ect.FLY.Thick.Base/FLY.Thick.Base.UI/PgError/WdIOTip.xaml
+1
-1
WdIOTip.xaml.cs
....FLY.Thick.Base/FLY.Thick.Base.UI/PgError/WdIOTip.xaml.cs
+3
-3
PgGridStyle.xaml
....FLY.Thick.Base/FLY.Thick.Base.UI/PgGrid/PgGridStyle.xaml
+3
-1
PgGridVm.cs
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgGrid/PgGridVm.cs
+1
-1
PgGridVmUt.cs
...ect.FLY.Thick.Base/FLY.Thick.Base.UI/PgGrid/PgGridVmUt.cs
+1
-1
GraphTab.xaml
...ect.FLY.Thick.Base/FLY.Thick.Base.UI/Themes/GraphTab.xaml
+0
-0
Styles.cs
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Themes/Styles.cs
+40
-0
Styles.xaml
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Themes/Styles.xaml
+6
-0
DynAreaConnected.xaml
...ick.Base/FLY.Thick.Base.UI/UIModule/DynAreaConnected.xaml
+0
-89
DynAreaConnected.xaml.cs
....Base/FLY.Thick.Base.UI/UIModule/DynAreaConnected.xaml.cs
+0
-90
DynAreaIO.xaml
....FLY.Thick.Base/FLY.Thick.Base.UI/UIModule/DynAreaIO.xaml
+0
-89
DynAreaIO.xaml.cs
...Y.Thick.Base/FLY.Thick.Base.UI/UIModule/DynAreaIO.xaml.cs
+0
-126
DynAreaSample.xaml
....Thick.Base/FLY.Thick.Base.UI/UIModule/DynAreaSample.xaml
+0
-143
DynAreaSample.xaml.cs
...ick.Base/FLY.Thick.Base.UI/UIModule/DynAreaSample.xaml.cs
+0
-100
app.config
Project.FLY.Thick.Base/FLY.Thick.Base.UI/app.config
+0
-3
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/CtMicroGage/CtMicroGageStyle.xaml
View file @
ed3cf0e5
...
...
@@ -4,6 +4,7 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Themes/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
<local:IO2BitColorConverter x:Key="io2bitcolorconv"/>
<Style TargetType="TextBlock" x:Key="ItemHeaderStyle">
...
...
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/FLY.Thick.Base.UI.csproj
View file @
ed3cf0e5
...
...
@@ -97,9 +97,7 @@
<Reference
Include=
"WindowsFormsIntegration"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"App.xaml.cs"
>
<DependentUpon>
App.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"App.xaml.cs"
/>
<Compile
Include=
"Converter\BoltNo2BoltIndexConverter.cs"
/>
<Compile
Include=
"Converter\ControllerStateConverter.cs"
/>
<Compile
Include=
"Converter\EnumToVisibilityConverter.cs"
/>
...
...
@@ -164,6 +162,15 @@
<Compile
Include=
"Page_ScanCorr.xaml.cs"
>
<DependentUpon>
Page_ScanCorr.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"PgError\PgErrorAllTable.xaml.cs"
>
<DependentUpon>
PgErrorAllTable.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"PgError\PgErrorTable.xaml.cs"
>
<DependentUpon>
PgErrorTable.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"PgError\WdIOTip.xaml.cs"
>
<DependentUpon>
WdIOTip.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"PgGrid\IPgGridVm.cs"
/>
<Compile
Include=
"PgGrid\PgGrid.xaml.cs"
>
<DependentUpon>
PgGrid.xaml
</DependentUpon>
...
...
@@ -174,11 +181,8 @@
<Compile
Include=
"PgGrid\SeriesInfo.cs"
/>
<Compile
Include=
"SysParam.cs"
/>
<Compile
Include=
"TDGage.cs"
/>
<Compile
Include=
"Theme\Styles.cs"
/>
<Compile
Include=
"Theme
s
\Styles.cs"
/>
<Compile
Include=
"UIModule\COMMON.cs"
/>
<Compile
Include=
"UIModule\DynAreaSample.xaml.cs"
>
<DependentUpon>
DynAreaSample.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"UIModule\FLYLayout.cs"
/>
<Compile
Include=
"UIModule\ScanGraph.xaml.cs"
>
<DependentUpon>
ScanGraph.xaml
</DependentUpon>
...
...
@@ -192,29 +196,20 @@
<Compile
Include=
"UIModule\TrendGraphConfig.xaml.cs"
>
<DependentUpon>
TrendGraphConfig.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"UIModule\DynAreaConnected.xaml.cs"
>
<DependentUpon>
DynAreaConnected.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"UIModule\DynAreaIO.xaml.cs"
>
<DependentUpon>
DynAreaIO.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Window_ABHelper.xaml.cs"
>
<DependentUpon>
Window_ABHelper.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Window_AHelper.xaml.cs"
>
<DependentUpon>
Window_AHelper.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Window_IOTip.xaml.cs"
>
<DependentUpon>
Window_IOTip.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Window_ADScale.xaml.cs"
>
<DependentUpon>
Window_ADScale.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Page_GageInfo.xaml.cs"
>
<DependentUpon>
Page_GageInfo.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"
Window_
FlyADAccess.xaml.cs"
>
<DependentUpon>
W
indow_
FlyADAccess.xaml
</DependentUpon>
<Compile
Include=
"
PgError\Wd
FlyADAccess.xaml.cs"
>
<DependentUpon>
W
d
FlyADAccess.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"MainEdit\WdDynAreaConfig.xaml.cs"
>
<DependentUpon>
WdDynAreaConfig.xaml
</DependentUpon>
...
...
@@ -316,21 +311,29 @@
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Pg
Grid\PgGrid
.xaml"
>
<Page
Include=
"Pg
Error\PgErrorAllTable
.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"Pg
Grid\PgGridSty
le.xaml"
>
<Page
Include=
"Pg
Error\PgErrorTab
le.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"
Theme\Styles
.xaml"
>
<Page
Include=
"
PgError\WdIOTip
.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"UIModule\DynAreaSample.xaml"
>
<Page
Include=
"PgGrid\PgGrid.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"PgGrid\PgGridStyle.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"Themes\Styles.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"UIModule\ScanGraph.xaml"
>
<SubType>
Designer
</SubType>
...
...
@@ -348,14 +351,6 @@
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"UIModule\DynAreaConnected.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"UIModule\DynAreaIO.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Window_ABHelper.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
...
...
@@ -364,10 +359,6 @@
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"Window_IOTip.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Window_ADScale.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
...
...
@@ -376,11 +367,11 @@
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"
Window_
FlyADAccess.xaml"
>
<Page
Include=
"
PgError\Wd
FlyADAccess.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Theme\GraphTab.xaml"
>
<Page
Include=
"Theme
s
\GraphTab.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
...
...
@@ -436,7 +427,6 @@
<LastGenOutput>
Resources.Designer.cs
</LastGenOutput>
<SubType>
Designer
</SubType>
</EmbeddedResource>
<None
Include=
"app.config"
/>
<None
Include=
"Properties\Settings.settings"
>
<Generator>
SettingsSingleFileGenerator
</Generator>
<LastGenOutput>
Settings.Designer.cs
</LastGenOutput>
...
...
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Page_Loading.xaml
View file @
ed3cf0e5
...
...
@@ -10,7 +10,6 @@
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Theme/GraphTab.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/MaterialDesignIcons.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
...
...
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgError/PgErrorAllTable.xaml
0 → 100644
View file @
ed3cf0e5
<Page x:Class="ThickTcpUiInWindow.PgErrorAllTable"
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"
d:DesignHeight="900" d:DesignWidth="960" Background="White"
Title="Page_ErrorTable">
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Control" x:Key="iconPackStyle">
<Setter Property="Width" Value="25"/>
<Setter Property="Height" Value="25"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="FrameworkElement" x:Key="backPackStyle">
<Setter Property="Width" Value="50"/>
<Setter Property="Height" Value="50"/>
</Style>
<Style TargetType="TextBlock" x:Key="titlePackStyle">
<Setter Property="Margin" Value="2"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Style TargetType="Button" x:Key="buttonStyle" BasedOn="{StaticResource ButtonStyle_empty}">
<Setter Property="Margin" Value="20,0"/>
</Style>
</ResourceDictionary>
</Page.Resources>
<Grid Name="root_grid" >
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="496*" />
</Grid.RowDefinitions>
<Grid Background="{StaticResource Background_Title}">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" >
<Button Style="{StaticResource ButtonStyle_back2}" Click="button_back_Click" />
<TextBlock Style="{StaticResource TextBlockStyle_Title}" Text="报警"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" >
<Button Style="{StaticResource buttonStyle}" Click="button_clear_click" >
<StackPanel Orientation="Vertical">
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Ellipse Style="{StaticResource backPackStyle}" Fill="White"/>
<iconPacks:PackIconMaterialDesign Kind="Clear" Style="{StaticResource iconPackStyle}" Foreground="#FFEE3232"/>
</Grid>
<TextBlock Text="清空" Style="{StaticResource titlePackStyle}"/>
</StackPanel>
</Button>
</StackPanel>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border Width="150" Background="{StaticResource Color_theme_activity}" Margin="0,5,5,5" >
<TextBlock Style="{StaticResource TextBlockStyle_ItemHeader}" Text="历史报警
列表" />
</Border>
<Grid Grid.Column="1" x:Name="grid_window">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="751*"/>
<ColumnDefinition Width="54*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="5">
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_prepage_Click" Width="40" Height="40" Margin="5">
<Path Data="{StaticResource Geometry_arrow-left}" Fill="{StaticResource Color_theme_activity}" Stretch="Uniform"/>
</Button>
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="第"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding CurrentPage}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="页"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm_interval}" Text="/"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="共"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding TotalPages}"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="页"/>
</StackPanel>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_nextpage_Click" Width="40" Height="40" Margin="5">
<Path Data="{StaticResource Geometry_arrow-right}" Fill="{StaticResource Color_theme_activity}" Stretch="Uniform"/>
</Button>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_newest_Click" Width="40" Height="40" Margin="5">
<Path Data="{StaticResource Geometry_arrow-collapse-right}" Fill="{StaticResource Color_theme_activity}" Stretch="Uniform"/>
</Button>
<StackPanel Orientation="Horizontal" Margin="20,5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="显示"/>
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding Size}" MinWidth="40"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="行"/>
</StackPanel>
</StackPanel>
</Grid>
<DataGrid Grid.Row="1" ItemsSource="{Binding Record}" AutoGenerateColumns="False" IsReadOnly="True" Grid.ColumnSpan="2" >
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="FontSize" Value="20"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Time,StringFormat={}{0:MM/dd HH:mm}}" >
<DataGridTextColumn.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="时间" />
</StackPanel>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding State}" >
<DataGridTextColumn.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="状态" />
</StackPanel>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding Description}" >
<DataGridTextColumn.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="报警描述" />
</StackPanel>
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Grid>
</Grid>
</Page>
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgError/PgErrorAllTable.xaml.cs
0 → 100644
View file @
ed3cf0e5
using
FLY.OBJComponents.Client
;
using
FLY.OBJComponents.Common
;
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
;
namespace
ThickTcpUiInWindow
{
/// <summary>
/// Page_Flow.xaml 的交互逻辑
/// </summary>
public
partial
class
PgErrorAllTable
:
Page
{
WarningServiceClient
mWarningService
;
BufferWindow
<
FlyData_WarningHistory
>
mWindow
;
SysParam
mSysParam
;
/// <summary>
///
/// </summary>
public
PgErrorAllTable
()
{
InitializeComponent
();
}
/// <summary>
///
/// </summary>
/// <param name="sysParam"></param>
/// <param name="warningService"></param>
public
void
Init
(
SysParam
sysParam
,
WarningServiceClient
warningService
)
{
mSysParam
=
sysParam
;
mWarningService
=
warningService
;
mWindow
=
new
BufferWindow
<
FlyData_WarningHistory
>(
mWarningService
.
NewestList
,
mSysParam
.
WindowSize
);
mWindow
.
PropertyChanged
+=
(
s
,
e
)
=>
{
if
(
e
.
PropertyName
==
"Size"
)
{
mSysParam
.
WindowSize
=
mWindow
.
Size
;
mSysParam
.
Save
();
}
};
grid_window
.
DataContext
=
mWindow
;
}
private
void
button_back_Click
(
object
sender
,
RoutedEventArgs
e
)
{
NavigationService
.
GoBack
();
}
private
void
button_clear_click
(
object
sender
,
RoutedEventArgs
e
)
{
if
(
FLY
.
ControlLibrary
.
MyMessageBox
.
Show
(
"确定是否清空全部历史数据?"
)
==
true
)
{
mWarningService
.
NewestList
.
Reset
();
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"成功"
,
"清除完毕!"
,
TimeSpan
.
FromSeconds
(
2
));
}
}
private
void
button_prepage_Click
(
object
sender
,
RoutedEventArgs
e
)
{
mWindow
.
MovePrePage
();
}
private
void
button_nextpage_Click
(
object
sender
,
RoutedEventArgs
e
)
{
mWindow
.
MoveNextPage
();
}
private
void
button_newest_Click
(
object
sender
,
RoutedEventArgs
e
)
{
mWindow
.
MoveNewest
();
}
}
}
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgError/PgErrorTable.xaml
0 → 100644
View file @
ed3cf0e5
<Page x:Class="ThickTcpUiInWindow.PgErrorTable"
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"
d:DesignHeight="768" d:DesignWidth="1024"
Background="White"
Title="Page_WarningSystem">
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Control" x:Key="iconPackStyle">
<Setter Property="Width" Value="25"/>
<Setter Property="Height" Value="25"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="FrameworkElement" x:Key="backPackStyle">
<Setter Property="Width" Value="50"/>
<Setter Property="Height" Value="50"/>
</Style>
<Style TargetType="TextBlock" x:Key="titlePackStyle">
<Setter Property="Margin" Value="2"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Style TargetType="Button" x:Key="buttonStyle" BasedOn="{StaticResource ButtonStyle_empty}">
<Setter Property="Margin" Value="20,0"/>
</Style>
</ResourceDictionary>
</Page.Resources>
<Grid Name="root_grid" >
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="496*" />
</Grid.RowDefinitions>
<Grid Background="{StaticResource Background_Title}">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" >
<Button Style="{StaticResource ButtonStyle_back2}" Click="button_back_Click" />
<TextBlock Style="{StaticResource TextBlockStyle_Title}" Text="报警"/>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="60,0,0,0">
<Button Style="{StaticResource buttonStyle}" Click="button_iotip_click" >
<StackPanel Orientation="Vertical">
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Ellipse Style="{StaticResource backPackStyle}" Fill="{StaticResource Color_theme_static}" />
<iconPacks:PackIconFontAwesome Kind="InfoSolid" Style="{StaticResource iconPackStyle}" Foreground="White"/>
</Grid>
<TextBlock Text="IO信息" Style="{StaticResource titlePackStyle}"/>
</StackPanel>
</Button>
<Button Style="{StaticResource buttonStyle}" Click="button_access_click" >
<StackPanel Orientation="Vertical">
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Ellipse Style="{StaticResource backPackStyle}" Fill="{StaticResource Color_theme_static}" />
<iconPacks:PackIconMaterial Kind="LockOpen" Style="{StaticResource iconPackStyle}" Foreground="White"/>
</Grid>
<TextBlock Text="授权" Style="{StaticResource titlePackStyle}"/>
</StackPanel>
</Button>
<Button Style="{StaticResource buttonStyle}" Click="button_database_click" >
<StackPanel Orientation="Vertical">
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Ellipse Style="{StaticResource backPackStyle}" Fill="{StaticResource Color_theme_static}" />
<iconPacks:PackIconMaterial Kind="DatabaseSearch" Style="{StaticResource iconPackStyle}" Foreground="White"/>
</Grid>
<TextBlock Text="查询" Style="{StaticResource titlePackStyle}"/>
</StackPanel>
</Button>
<Button Style="{StaticResource buttonStyle}" Click="button_reset_click" >
<StackPanel Orientation="Vertical">
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Ellipse Style="{StaticResource backPackStyle}" Fill="#FFEE3232" />
<iconPacks:PackIconModern Kind="Reset" Style="{StaticResource iconPackStyle}" Foreground="White"/>
</Grid>
<TextBlock Text="复位" Style="{StaticResource titlePackStyle}"/>
</StackPanel>
</Button>
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" >
<Button Style="{StaticResource buttonStyle}" Click="button_silence_click" >
<StackPanel Orientation="Vertical">
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Ellipse Style="{StaticResource backPackStyle}" Fill="White"/>
<iconPacks:PackIconOcticons Kind="Mute" Style="{StaticResource iconPackStyle}" Foreground="#FFEE3232" />
</Grid>
<TextBlock Text="消音" Style="{StaticResource titlePackStyle}"/>
</StackPanel>
</Button>
</StackPanel>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border Width="150" Background="{StaticResource Color_theme_activity}" Margin="0,5,5,5" >
<TextBlock Style="{StaticResource TextBlockStyle_ItemHeader}" Text="当前报警
列表" />
</Border>
<DataGrid Grid.Column="1" x:Name="gridFlows" AutoGenerateColumns="False" IsReadOnly="True" >
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="FontSize" Value="20"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Time,StringFormat={}{0:MM/dd HH:mm}}" IsReadOnly="True">
<DataGridTextColumn.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="时间" />
</StackPanel>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn x:Name="column_cp" Binding="{Binding Description}" >
<DataGridTextColumn.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="报警描述" />
</StackPanel>
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
<StackPanel Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10,-30,30,10" Orientation="Horizontal">
</StackPanel>
</Grid>
</Grid>
</Page>
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgError/PgErrorTable.xaml.cs
0 → 100644
View file @
ed3cf0e5
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
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
System.Net
;
using
FLY.Thick.Base.Client
;
namespace
ThickTcpUiInWindow
{
/// <summary>
/// Page_ErrorTable.xaml 的交互逻辑
/// </summary>
public
partial
class
PgErrorTable
:
Page
{
FLY
.
OBJComponents
.
Client
.
WarningServiceClient
mWarningService
;
FLY
.
OBJComponents
.
Client
.
BufferWindow
<
FLY
.
OBJComponents
.
Common
.
FlyData_WarningHistory
>
mWindow
;
FlyADServiceClient
mFlyADService
;
SysParam
mSysParam
;
Type
wdIoTipType
;
/// <summary>
///
/// </summary>
public
PgErrorTable
()
{
InitializeComponent
();
}
/// <summary>
///
/// </summary>
/// <param name="warningService"></param>
/// <param name="warningReasonWindow"></param>
/// <param name="sysParam"></param>
/// <param name="flyADService"></param>
/// <param name="wdIoTipType"></param>
public
void
Init
(
FLY
.
OBJComponents
.
Client
.
WarningServiceClient
warningService
,
FLY
.
OBJComponents
.
Client
.
BufferWindow
<
FLY
.
OBJComponents
.
Common
.
FlyData_WarningHistory
>
warningReasonWindow
,
SysParam
sysParam
,
FlyADServiceClient
flyADService
,
Type
wdIoTipType
)
{
this
.
wdIoTipType
=
wdIoTipType
;
mWarningService
=
warningService
;
mWindow
=
warningReasonWindow
;
mSysParam
=
sysParam
;
mFlyADService
=
flyADService
;
gridFlows
.
ItemsSource
=
mWindow
.
Record
;
}
private
void
button_back_Click
(
object
sender
,
RoutedEventArgs
e
)
{
NavigationService
.
GoBack
();
}
private
void
button_reset_click
(
object
sender
,
RoutedEventArgs
e
)
{
mWarningService
.
Reset
();
}
private
void
button_iotip_click
(
object
sender
,
RoutedEventArgs
e
)
{
Window
w
;
if
(
wdIoTipType
==
null
&&
wdIoTipType
.
IsAssignableFrom
(
typeof
(
Window
)))
{
w
=
Activator
.
CreateInstance
(
wdIoTipType
)
as
Window
;
}
else
{
w
=
new
WdIOTip
();
}
w
.
Owner
=
FLY
.
ControlLibrary
.
COMMON
.
GetWindow
(
this
);
w
.
ShowDialog
();
}
private
void
button_access_click
(
object
sender
,
RoutedEventArgs
e
)
{
WdFlyADAccess
w
=
new
WdFlyADAccess
();
w
.
Init
(
mFlyADService
);
w
.
Owner
=
FLY
.
ControlLibrary
.
COMMON
.
GetWindow
(
this
);
w
.
ShowDialog
();
}
private
void
button_silence_click
(
object
sender
,
RoutedEventArgs
e
)
{
mWarningService
.
Silence
();
}
private
void
button_database_click
(
object
sender
,
RoutedEventArgs
e
)
{
NavigationService
ns
=
NavigationService
;
// Application.Current.Properties["NavigationService"] as NavigationService;
if
(
ns
!=
null
)
{
PgErrorAllTable
p
=
new
PgErrorAllTable
();
p
.
Init
(
mSysParam
,
mWarningService
);
ns
.
Navigate
(
p
);
}
}
}
}
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/
Window_
FlyADAccess.xaml
→
Project.FLY.Thick.Base/FLY.Thick.Base.UI/
PgError/Wd
FlyADAccess.xaml
View file @
ed3cf0e5
<flyctrllib:WindowBigClose x:Class="ThickTcpUiInWindow.W
indow_
FlyADAccess"
<flyctrllib:WindowBigClose x:Class="ThickTcpUiInWindow.W
d
FlyADAccess"
xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
...
...
@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:ThickTcpUiInWindow"
Title="Window_graphfix" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Loaded="Window_Loaded" Unloaded="Window_Unloaded"
SizeToContent="WidthAndHeight">
SizeToContent="WidthAndHeight">
<Window.Resources>
<ResourceDictionary>
<local:BytesConverter x:Key="bytesconv"/>
...
...
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/
Window_
FlyADAccess.xaml.cs
→
Project.FLY.Thick.Base/FLY.Thick.Base.UI/
PgError/Wd
FlyADAccess.xaml.cs
View file @
ed3cf0e5
...
...
@@ -25,32 +25,26 @@ namespace ThickTcpUiInWindow
/// <summary>
/// Window_FlyADAccess.xaml 的交互逻辑
/// </summary>
public
partial
class
W
indow_FlyADAccess
:
FLY
.
ControlLibrary
.
WindowBigClose
,
INotifyPropertyChanged
public
partial
class
W
dFlyADAccess
:
FLY
.
ControlLibrary
.
WindowBigClose
,
INotifyPropertyChanged
{
FlyADServiceClient
mFlyADService
=
null
;
byte
[]
access
=
new
byte
[
8
];
byte
[]
code
=
new
byte
[
7
];
public
byte
[]
Access
{
get
{
return
access
;
}
set
{
access
=
value
;
NotifyPropertyChanged
(
"Access"
);
}
}
public
byte
[]
Code
{
get
{
return
code
;
}
set
{
code
=
value
;
NotifyPropertyChanged
(
"Code"
);
}
}
public
Window_FlyADAccess
()
/// <summary>
/// 使用码
/// </summary>
[
PropertyChanged
.
DoNotCheckEquality
]
public
byte
[]
Access
{
get
;
set
;
}
=
new
byte
[
8
];
/// <summary>
/// 序列码
/// </summary>
[
PropertyChanged
.
DoNotCheckEquality
]
public
byte
[]
Code
{
get
;
set
;
}
=
new
byte
[
7
];
/// <summary>
///
/// </summary>
public
WdFlyADAccess
()
{
InitializeComponent
();
...
...
@@ -98,11 +92,14 @@ namespace ThickTcpUiInWindow
TimeSpan
.
FromSeconds
(
2
));
}
public
void
Init
(
IPEndPoint
serverep
)
/// <summary>
///
/// </summary>
/// <param name="flyADService"></param>
public
void
Init
(
FlyADServiceClient
flyADService
)
{
mFlyADService
=
new
FlyADServiceClient
(
FLY
.
Thick
.
Base
.
OBJ_INTERFACE
.
OBJ_INTERFACE_ID
.
FLYAD_ID
);
FObjBase
.
FObjSys
.
Current
.
Connect_to_Another_OBJSys
(
serverep
,
mFlyADService
.
ID
);
mFlyADService
=
flyADService
;
}
private
void
Window_Loaded
(
object
sender
,
RoutedEventArgs
e
)
...
...
@@ -118,28 +115,31 @@ namespace ThickTcpUiInWindow
}),
null
);
}
private
void
Window_Unloaded
(
object
sender
,
RoutedEventArgs
e
)
{
mFlyADService
.
Dispose
();
}
#
region
INotifyPropertyChanged
成员
/// <summary>
///
/// </summary>
public
event
PropertyChangedEventHandler
PropertyChanged
;
protected
void
NotifyPropertyChanged
(
string
propertyname
)
{
if
(
PropertyChanged
!=
null
)
{
PropertyChanged
.
Invoke
(
this
,
new
PropertyChangedEventArgs
(
propertyname
));
}
}
#
endregion
}
/// <summary>
///
/// </summary>
public
class
BytesConverter
:
IValueConverter
{
#
region
IValueConverter
成员
/// <summary>
///
/// </summary>
/// <param name="value"></param>
/// <param name="targetType"></param>
/// <param name="parameter"></param>
/// <param name="culture"></param>
/// <returns></returns>
public
object
Convert
(
object
value
,
Type
targetType
,
object
parameter
,
System
.
Globalization
.
CultureInfo
culture
)
{
if
(
value
==
null
)
...
...
@@ -151,7 +151,14 @@ namespace ThickTcpUiInWindow
str
+=
bs
[
i
].
ToString
(
"X2"
);
return
str
;
}
/// <summary>
///
/// </summary>
/// <param name="value"></param>
/// <param name="targetType"></param>
/// <param name="parameter"></param>
/// <param name="culture"></param>
/// <returns></returns>
public
object
ConvertBack
(
object
value
,
Type
targetType
,
object
parameter
,
System
.
Globalization
.
CultureInfo
culture
)
{
string
str
=
(
string
)
value
;
...
...
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/
Window_
IOTip.xaml
→
Project.FLY.Thick.Base/FLY.Thick.Base.UI/
PgError/Wd
IOTip.xaml
View file @
ed3cf0e5
<flyctrllib:WindowBigClose x:Class="ThickTcpUiInWindow.W
indow_
IOTip"
<flyctrllib:WindowBigClose x:Class="ThickTcpUiInWindow.W
d
IOTip"
xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
...
...
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/
Window_
IOTip.xaml.cs
→
Project.FLY.Thick.Base/FLY.Thick.Base.UI/
PgError/Wd
IOTip.xaml.cs
View file @
ed3cf0e5
...
...
@@ -14,11 +14,11 @@ using System.Windows.Shapes;
namespace
ThickTcpUiInWindow
{
/// <summary>
/// W
indow_
IOTip.xaml 的交互逻辑
/// W
d
IOTip.xaml 的交互逻辑
/// </summary>
public
partial
class
W
indow_
IOTip
:
FLY
.
ControlLibrary
.
WindowBigClose
public
partial
class
W
d
IOTip
:
FLY
.
ControlLibrary
.
WindowBigClose
{
public
W
indow_
IOTip
()
public
W
d
IOTip
()
{
InitializeComponent
();
}
...
...
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgGrid/PgGridStyle.xaml
View file @
ed3cf0e5
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:local="clr-namespace:
FLY.Thick.Normal.UI.Client
"
xmlns:local="clr-namespace:
ThickTcpUiInWindow
"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Themes/Styles.xaml"/>
<!--<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Culture/StringResource.zh-CN.xaml"/>-->
</ResourceDictionary.MergedDictionaries>
...
...
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgGrid/PgGridVm.cs
View file @
ed3cf0e5
...
...
@@ -127,7 +127,7 @@ namespace ThickTcpUiInWindow
SeriesInfo
info
=
new
SeriesInfo
()
{
Title
=
$"
{
i
}
"
,
Fill
=
Theme
.
Styles
.
GetForeground
(
i
),
Fill
=
Theme
s
.
Styles
.
GetForeground
(
i
),
};
LineSeries
lineSeries
=
new
LineSeries
{
...
...
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgGrid/PgGridVmUt.cs
View file @
ed3cf0e5
...
...
@@ -124,7 +124,7 @@ namespace ThickTcpUiInWindow
SeriesInfo
info
=
new
SeriesInfo
()
{
Title
=
$"
{
i
}
"
,
Fill
=
Theme
.
Styles
.
GetForeground
(
i
),
Fill
=
Theme
s
.
Styles
.
GetForeground
(
i
),
};
LineSeries
lineSeries
=
new
LineSeries
{
...
...
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Theme/GraphTab.xaml
→
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Theme
s
/GraphTab.xaml
View file @
ed3cf0e5
File moved
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Theme/Styles.cs
→
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Theme
s
/Styles.cs
View file @
ed3cf0e5
...
...
@@ -2,15 +2,29 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Windows
;
using
System.Windows.Media
;
namespace
ThickTcpUiInWindow.Theme
namespace
ThickTcpUiInWindow.Theme
s
{
/// <summary>
///
/// </summary>
public
static
class
Styles
{
static
List
<
SolidColorBrush
>
randomColors
=
new
List
<
SolidColorBrush
>();
static
Styles
()
{
randomColors
.
Add
(
new
SolidColorBrush
((
Color
)
ColorConverter
.
ConvertFromString
(
"#2195f2"
)));
randomColors
.
Add
(
new
SolidColorBrush
((
Color
)
ColorConverter
.
ConvertFromString
(
"#f34336"
)));
randomColors
.
Add
(
new
SolidColorBrush
((
Color
)
ColorConverter
.
ConvertFromString
(
"#fec007"
)));
randomColors
.
Add
(
new
SolidColorBrush
((
Color
)
ColorConverter
.
ConvertFromString
(
"#607d8a"
)));
randomColors
.
Add
(
new
SolidColorBrush
((
Color
)
ColorConverter
.
ConvertFromString
(
"#e81e63"
)));
randomColors
.
Add
(
new
SolidColorBrush
((
Color
)
ColorConverter
.
ConvertFromString
(
"#4cae50"
)));
randomColors
.
Add
(
new
SolidColorBrush
((
Color
)
ColorConverter
.
ConvertFromString
(
"#3f51b4"
)));
randomColors
.
Add
(
new
SolidColorBrush
((
Color
)
ColorConverter
.
ConvertFromString
(
"#ccdb39"
)));
}
/// <summary>
/// 获取随机颜色
/// </summary>
...
...
@@ -18,7 +32,7 @@ namespace ThickTcpUiInWindow.Theme
/// <returns></returns>
public
static
Brush
GetForeground
(
int
index
)
{
IEnumerable
<
SolidColorBrush
>
randomColors
=
App
.
Current
.
FindResource
(
"RandomColors"
)
as
IEnumerable
<
SolidColorBrush
>;
//IEnumerable<SolidColorBrush> randomColors = Application
.Current.FindResource("RandomColors") as IEnumerable<SolidColorBrush>;
return
randomColors
.
ElementAt
(
index
%
randomColors
.
Count
());
}
...
...
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Theme/Styles.xaml
→
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Theme
s
/Styles.xaml
View file @
ed3cf0e5
<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:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="UIElement" x:Key="GridStyle_ButtonShadow">
<Setter Property="Effect">
<Setter.Value>
...
...
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UIModule/DynAreaConnected.xaml
deleted
100644 → 0
View file @
d638efef
<UserControl x:Class="ThickTcpUiInWindow.UIModule.DynAreaConnected"
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:ThickTcpUiInWindow.UIModule"
mc:Ignorable="d" >
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Border" x:Key="BorderStyle_background">
<Setter Property="Background" Value="White"/>
<Setter Property="Margin" Value="3"/>
<Setter Property="CornerRadius" Value="3"/>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="Black" Direction="270" ShadowDepth="1" Opacity="0.23" />
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="picture_button" TargetType="Button">
<Border Name="border" BorderThickness="1" CornerRadius="5">
<ContentPresenter Content="{TemplateBinding Content}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="LightBlue"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Background" Value="LightGray"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ResourceDictionary>
</UserControl.Resources>
<Button Click="Border_FlyAD_Click" Template="{StaticResource ResourceKey=picture_button}" >
<Border Style="{StaticResource BorderStyle_background}" Name="Border_Connected">
<Border.Resources>
<ResourceDictionary>
<Style TargetType="TextBlock" x:Key="TextBlockStyle_Connected">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontFamily" Value="YouYuan"/>
<Setter Property="FontSize" Value="32"/>
</Style>
<Style TargetType="TextBlock" x:Key="TextBlockStyle_ItemHeader">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontFamily" Value="YouYuan"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Foreground" Value="#FF3B3B3B"/>
</Style>
</ResourceDictionary>
</Border.Resources>
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical" >
<TextBlock Text="AD卡连接" Style="{StaticResource TextBlockStyle_ItemHeader}" />
<Grid>
<TextBlock Style="{StaticResource TextBlockStyle_Connected}" Foreground="{StaticResource Color_theme_activity}" Text="断开" Visibility="{Binding FLYADIsConnect, Converter={StaticResource visbilityconv}, ConverterParameter=HiddenWhenTrue}" />
<TextBlock Style="{StaticResource TextBlockStyle_Connected}" Foreground="{StaticResource Color_theme_static}" Text="成功" Visibility="{Binding FLYADIsConnect, Converter={StaticResource visbilityconv}}" />
</Grid>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5,0" Grid.Column="1">
<TextBlock Text="服务连接" Style="{StaticResource TextBlockStyle_ItemHeader}" />
<Grid>
<TextBlock Style="{StaticResource TextBlockStyle_Connected}" Foreground="{StaticResource Color_theme_activity}" Text="断开" Visibility="{Binding ServerIsConnected, Converter={StaticResource visbilityconv}, ConverterParameter=HiddenWhenTrue}" />
<TextBlock Style="{StaticResource TextBlockStyle_Connected}" Foreground="{StaticResource Color_theme_static}" Text="成功" Visibility="{Binding ServerIsConnected, Converter={StaticResource visbilityconv}}" />
</Grid>
</StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="2">
<TextBlock Text="剩余时间" Style="{StaticResource TextBlockStyle_ItemHeader}" />
<StackPanel Orientation="Horizontal" Background="Black" >
<!--<TextBlock Text="20000" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="White" />-->
<TextBlock Text="{Binding Hrs,Converter={StaticResource ResourceKey=hrsconv}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="White" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="h" FontSize="12" Foreground="White"/>
</StackPanel>
</StackPanel>
</Grid>
</Border>
</Button>
</UserControl>
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UIModule/DynAreaConnected.xaml.cs
deleted
100644 → 0
View file @
d638efef
using
FLY.UI.Module
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
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
;
namespace
ThickTcpUiInWindow.UIModule
{
/// <summary>
/// UIModuleConnected.xaml 的交互逻辑
/// </summary>
public
partial
class
DynAreaConnected
:
UserControl
{
TDGage
gage
;
public
DynAreaConnected
()
{
InitializeComponent
();
}
public
void
Init
(
int
id
)
{
//获取设备
gage
=
Application
.
Current
.
Properties
[
"Gage"
]
as
TDGage
;
this
.
DataContext
=
gage
.
mDynAreaService
.
mDynArea
;
}
private
void
Border_FlyAD_Click
(
object
sender
,
RoutedEventArgs
e
)
{
Window_FlyADAccess
w
=
new
Window_FlyADAccess
();
w
.
Init
(
gage
.
mSysParam
.
ServerIPEP
);
w
.
ShowDialog
();
}
}
public
class
UIModule_DynAreaConnected
:
IUIModule
{
/// <summary>
/// 控件标题
/// 它的值取决于culture
/// </summary>
public
string
Title
{
get
{
return
"连接状态"
;
}
}
/// <summary>
/// 控件
/// 创建时,需要给它唯一ID,让加载自己的数据
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public
FrameworkElement
GetComponent
(
int
id
)
{
DynAreaConnected
graph
=
new
DynAreaConnected
();
graph
.
Init
(
id
);
return
graph
;
}
/// <summary>
/// 控件缩略图,用于编辑界面时,大致看看
/// 创建时,需要给它唯一ID,让加载自己的数据
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public
FrameworkElement
GetThumbnail
(
int
id
)
{
return
new
System
.
Windows
.
Controls
.
Grid
();
}
/// <summary>
/// 给出全部控件ID, 控件自行删除没有的参数
/// </summary>
/// <param name="IDs"></param>
public
void
MatchParam
(
int
[]
IDs
)
{
}
}
}
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UIModule/DynAreaIO.xaml
deleted
100644 → 0
View file @
d638efef
<UserControl x:Class="ThickTcpUiInWindow.UIModule.DynAreaIO"
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:ThickTcpUiInWindow.UIModule"
mc:Ignorable="d" >
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Border" x:Key="BorderStyle_background">
<Setter Property="Background" Value="White"/>
<Setter Property="Margin" Value="3"/>
<Setter Property="CornerRadius" Value="3"/>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="Black" Direction="270" ShadowDepth="1" Opacity="0.23" />
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="picture_button" TargetType="Button">
<Border Name="border" BorderThickness="1" CornerRadius="5">
<ContentPresenter Content="{TemplateBinding Content}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="LightBlue"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Background" Value="LightGray"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style TargetType="Rectangle" x:Key="RectangleStyle_IO">
<Setter Property="Width" Value="11" />
<Setter Property="Height" Value="24" />
<Setter Property="Margin" Value="2" />
</Style>
<Style TargetType="TextBlock" x:Key="TextBlockStyle_ItemHeader">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontFamily" Value="YouYuan"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Foreground" Value="#FF3B3B3B"/>
<Setter Property="Margin" Value="5,0"/>
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Button Click="Border_IO_Click" Template="{StaticResource ResourceKey=picture_button}" >
<Border Style="{StaticResource BorderStyle_background}" Name="Border_IO">
<StackPanel Margin="2">
<StackPanel Orientation="Horizontal" Margin="2">
<TextBlock Text="入" Style="{StaticResource TextBlockStyle_ItemHeader}" />
<StackPanel Orientation="Horizontal" Margin="4,0">
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=11}" Style="{StaticResource RectangleStyle_IO}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=10}" Style="{StaticResource RectangleStyle_IO}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=9}" Style="{StaticResource RectangleStyle_IO}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=8}" Style="{StaticResource RectangleStyle_IO}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="4,0">
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=7}" Style="{StaticResource RectangleStyle_IO}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=6}" Style="{StaticResource RectangleStyle_IO}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=5}" Style="{StaticResource RectangleStyle_IO}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=4}" Style="{StaticResource RectangleStyle_IO}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="4,0">
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=3}" Style="{StaticResource RectangleStyle_IO}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=2}" Style="{StaticResource RectangleStyle_IO}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=1}" Style="{StaticResource RectangleStyle_IO}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=0}" Style="{StaticResource RectangleStyle_IO}"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="2">
<TextBlock Text="出" Style="{StaticResource TextBlockStyle_ItemHeader}" />
<StackPanel Orientation="Horizontal" Margin="4,0">
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=3}" Style="{StaticResource RectangleStyle_IO}"/>
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=2}" Style="{StaticResource RectangleStyle_IO}"/>
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=1}" Style="{StaticResource RectangleStyle_IO}"/>
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=0}" Style="{StaticResource RectangleStyle_IO}"/>
</StackPanel>
</StackPanel>
</StackPanel>
</Border>
</Button>
</UserControl>
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UIModule/DynAreaIO.xaml.cs
deleted
100644 → 0
View file @
d638efef
using
FLY.UI.Module
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
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
;
namespace
ThickTcpUiInWindow.UIModule
{
/// <summary>
/// DynAreaIO.xaml 的交互逻辑
/// </summary>
public
partial
class
DynAreaIO
:
UserControl
{
TDGage
gage
;
public
DynAreaIO
()
{
InitializeComponent
();
}
public
void
Init
(
int
id
)
{
//获取设备
gage
=
Application
.
Current
.
Properties
[
"Gage"
]
as
TDGage
;
this
.
DataContext
=
gage
.
mDynAreaService
.
mDynArea
;
}
protected
virtual
void
Border_IO_Click
(
object
sender
,
RoutedEventArgs
e
)
{
if
(
DynAreaIOParams
.
Current
.
IODespWindowType
!=
null
)
{
Window
w
=
Activator
.
CreateInstance
(
DynAreaIOParams
.
Current
.
IODespWindowType
)
as
Window
;
w
.
Owner
=
FLY
.
ControlLibrary
.
COMMON
.
GetWindow
(
this
);
w
.
ShowDialog
();
}
}
}
public
class
UIModule_DynAreaIO
:
IUIModule
{
/// <summary>
/// 控件标题
/// 它的值取决于culture
/// </summary>
public
string
Title
{
get
{
return
Application
.
Current
.
FindResource
(
"strDynAreaIO"
)
as
string
;
}
}
/// <summary>
/// 控件
/// 创建时,需要给它唯一ID,让加载自己的数据
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public
FrameworkElement
GetComponent
(
int
id
)
{
DynAreaIO
graph
=
new
DynAreaIO
();
graph
.
Init
(
id
);
return
graph
;
}
/// <summary>
/// 控件缩略图,用于编辑界面时,大致看看
/// 创建时,需要给它唯一ID,让加载自己的数据
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public
FrameworkElement
GetThumbnail
(
int
id
)
{
return
new
System
.
Windows
.
Controls
.
Grid
();
}
/// <summary>
/// 给出全部控件ID, 控件自行删除没有的参数
/// </summary>
/// <param name="IDs"></param>
public
void
MatchParam
(
int
[]
IDs
)
{
}
}
/// <summary>
/// 全部扫描图的参数
/// </summary>
public
class
DynAreaIOParams
{
public
Type
IODespWindowType
=
null
;
static
DynAreaIOParams
()
{
}
static
DynAreaIOParams
current
=
null
;
public
static
DynAreaIOParams
Current
{
get
{
if
(
current
==
null
)
{
current
=
new
DynAreaIOParams
();
}
return
current
;
}
}
public
DynAreaIOParams
()
{
IODespWindowType
=
typeof
(
Window_IOTip
);
}
}
}
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UIModule/DynAreaSample.xaml
deleted
100644 → 0
View file @
d638efef
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UIModule/DynAreaSample.xaml.cs
deleted
100644 → 0
View file @
d638efef
using
FLY.Thick.Base.Client
;
using
FLY.UI.Module
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
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
;
namespace
ThickTcpUiInWindow.UIModule
{
/// <summary>
/// DynAreaSample.xaml 的交互逻辑
/// </summary>
public
partial
class
DynAreaSample
:
UserControl
{
TDGage
gage
;
static
GetSampleServiceClient
mGetSampleService
=
null
;
public
DynAreaSample
()
{
InitializeComponent
();
}
public
void
Init
(
int
id
)
{
//获取设备
gage
=
Application
.
Current
.
Properties
[
"Gage"
]
as
TDGage
;
if
(
mGetSampleService
==
null
)
{
mGetSampleService
=
new
GetSampleServiceClient
(
FLY
.
Thick
.
Base
.
OBJ_INTERFACE
.
OBJ_INTERFACE_ID
.
GET_SAMPLE_ID
);
FObjBase
.
FObjSys
.
Current
.
Connect_to_Another_OBJSys
(
gage
.
mSysParam
.
ServerIPEP
,
mGetSampleService
.
ID
);
}
this
.
DataContext
=
mGetSampleService
;
}
private
void
Border_Sample_Click
(
object
sender
,
RoutedEventArgs
e
)
{
Page_GetSample
p
=
new
Page_GetSample
();
p
.
Init
(
gage
.
mSysParam
.
ServerIPEP
);
(
Application
.
Current
.
Properties
[
"NavigationService"
]
as
NavigationService
).
Navigate
(
p
);
}
}
public
class
UIModule_DynAreaSample
:
IUIModule
{
/// <summary>
/// 控件标题
/// 它的值取决于culture
/// </summary>
public
string
Title
{
get
{
return
"样品状态"
;
}
}
/// <summary>
/// 控件
/// 创建时,需要给它唯一ID,让加载自己的数据
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public
FrameworkElement
GetComponent
(
int
id
)
{
DynAreaSample
graph
=
new
DynAreaSample
();
graph
.
Init
(
id
);
return
graph
;
}
/// <summary>
/// 控件缩略图,用于编辑界面时,大致看看
/// 创建时,需要给它唯一ID,让加载自己的数据
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public
FrameworkElement
GetThumbnail
(
int
id
)
{
return
new
System
.
Windows
.
Controls
.
Grid
();
}
/// <summary>
/// 给出全部控件ID, 控件自行删除没有的参数
/// </summary>
/// <param name="IDs"></param>
public
void
MatchParam
(
int
[]
IDs
)
{
}
}
}
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/app.config
deleted
100644 → 0
View file @
d638efef
<?
xml
version
=
"1.0"
?>
<
configuration
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.6.1"
/></
startup
></
configuration
>
This diff is collapsed.
Click to expand it.
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