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
c6017f7e
Commit
c6017f7e
authored
Jul 06, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 动态区 样式
parent
210adb92
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
94 additions
and
102 deletions
+94
-102
Colors2.xaml
...FLY.ControlLibrary/FLY.ControlLibrary/Themes/Colors2.xaml
+1
-1
UiModuleStyle2.xaml
...trolLibrary/FLY.ControlLibrary/Themes/UiModuleStyle2.xaml
+7
-1
PgFlyAd.xaml
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgFlyAd.xaml
+2
-2
PgGetSample.xaml.cs
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgGetSample.xaml.cs
+13
-2
DynAreaFilmWidth.xaml
...ick.Base/FLY.Thick.Base.UI/UiModule/DynAreaFilmWidth.xaml
+10
-10
DynAreaIO.xaml
....FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaIO.xaml
+9
-17
DynAreaSample.xaml
....Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaSample.xaml
+36
-40
DynAreaSample.xaml.cs
...ick.Base/FLY.Thick.Base.UI/UiModule/DynAreaSample.xaml.cs
+6
-3
DynAreaThick.xaml
...Y.Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaThick.xaml
+10
-26
No files found.
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/Colors2.xaml
View file @
c6017f7e
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<!--不活动颜色-->
<!--不活动颜色-->
<SolidColorBrush x:Key="Brushes.Static" Color="{StaticResource MahApps.Colors.Gray1}"/>
<SolidColorBrush x:Key="Brushes.Static" Color="{StaticResource MahApps.Colors.Gray1}"/>
<!--不活动颜色-->
<!--不活动颜色-->
<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}"/>
<SolidColorBrush x:Key="Brushes.ThemeBackground" Color="{StaticResource MahApps.Colors.ThemeBackground}"/>
<!--激活的字颜色-->
<!--激活的字颜色-->
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/UiModuleStyle2.xaml
View file @
c6017f7e
...
@@ -26,8 +26,14 @@
...
@@ -26,8 +26,14 @@
<Setter Property="FontFamily" Value="Microsoft Sans Serif"/>
<Setter Property="FontFamily" Value="Microsoft Sans Serif"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="FontSize" Value="24"/>
</Style>
</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">
<Style TargetType="TextBlock" x:Key="Styles.Module.Text.ItemValue.Unit">
<Setter Property="Foreground" Value="
{StaticResource Brushes.NoAct}
" />
<Setter Property="Foreground" Value="
#FF555555
" />
<Setter Property="FontSize" Value="12" />
<Setter Property="FontSize" Value="12" />
<Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="VerticalAlignment" Value="Bottom" />
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgFlyAd.xaml
View file @
c6017f7e
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding HasCRC}"/>
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding HasCRC}"/>
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource
ResourceKey=
Styles.Text.FieldHeader.Editable}" Text="不使用AD盒速度" />
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="不使用AD盒速度" />
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding IsCalSpeed}" HorizontalAlignment="Left"/>
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding IsCalSpeed}" HorizontalAlignment="Left"/>
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" >
<StackPanel Margin="{StaticResource ControlMargin}" >
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource
ResourceKey=
Styles.Text.FieldHeader.Editable}" Text="独立位置范围" />
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="独立位置范围" />
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding HasPosMaxMin}" HorizontalAlignment="Left"/>
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding HasPosMaxMin}" HorizontalAlignment="Left"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Visibility="{Binding HasPosMaxMin,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<StackPanel Orientation="Horizontal" Visibility="{Binding HasPosMaxMin,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgGetSample.xaml.cs
View file @
c6017f7e
...
@@ -156,6 +156,9 @@ namespace FLY.Thick.Base.UI
...
@@ -156,6 +156,9 @@ namespace FLY.Thick.Base.UI
Misc
.
BindingOperations
.
SetBinding
(
samples
[
i
],
nameof
(
SampleCell
.
JustForCheck
),
sampleView
,
nameof
(
SampleCellView
.
JustForCheck
));
Misc
.
BindingOperations
.
SetBinding
(
samples
[
i
],
nameof
(
SampleCell
.
JustForCheck
),
sampleView
,
nameof
(
SampleCellView
.
JustForCheck
));
Misc
.
BindingOperations
.
SetBinding
(
samples
[
i
],
nameof
(
SampleCell
.
OrgAD
),
sampleView
,
nameof
(
SampleCellView
.
OrgAD
));
Misc
.
BindingOperations
.
SetBinding
(
samples
[
i
],
nameof
(
SampleCell
.
OrgAD
),
sampleView
,
nameof
(
SampleCellView
.
OrgAD
));
Misc
.
BindingOperations
.
SetBinding
(
samples
[
i
],
nameof
(
SampleCell
.
Position
),
sampleView
,
nameof
(
SampleCellView
.
Position
));
Misc
.
BindingOperations
.
SetBinding
(
samples
[
i
],
nameof
(
SampleCell
.
Position
),
sampleView
,
nameof
(
SampleCellView
.
Position
));
Misc
.
BindingOperations
.
SetBinding
(
samples
[
i
],
nameof
(
SampleCell
.
AD
),
sampleView
,
nameof
(
SampleCellView
.
AD
));
Misc
.
BindingOperations
.
SetBinding
(
samples
[
i
],
nameof
(
SampleCell
.
SampleValue
),
sampleView
,
nameof
(
SampleCellView
.
SampleValue
));
}
}
updateSampleCellViewVisible
();
updateSampleCellViewVisible
();
...
@@ -194,6 +197,10 @@ namespace FLY.Thick.Base.UI
...
@@ -194,6 +197,10 @@ namespace FLY.Thick.Base.UI
Misc
.
BindingOperations
.
SetBinding
(
features
[
i
],
nameof
(
SampleFeature
.
Enable
),
featureView
,
nameof
(
SampleFeatureView
.
Enable
));
Misc
.
BindingOperations
.
SetBinding
(
features
[
i
],
nameof
(
SampleFeature
.
Enable
),
featureView
,
nameof
(
SampleFeatureView
.
Enable
));
Misc
.
BindingOperations
.
SetBinding
(
features
[
i
],
nameof
(
SampleFeature
.
StartPos
),
featureView
,
nameof
(
SampleFeatureView
.
StartPos
));
Misc
.
BindingOperations
.
SetBinding
(
features
[
i
],
nameof
(
SampleFeature
.
StartPos
),
featureView
,
nameof
(
SampleFeatureView
.
StartPos
));
Misc
.
BindingOperations
.
SetBinding
(
features
[
i
],
nameof
(
SampleFeature
.
EndPos
),
featureView
,
nameof
(
SampleFeatureView
.
EndPos
));
Misc
.
BindingOperations
.
SetBinding
(
features
[
i
],
nameof
(
SampleFeature
.
EndPos
),
featureView
,
nameof
(
SampleFeatureView
.
EndPos
));
Misc
.
BindingOperations
.
SetBinding
(
features
[
i
],
nameof
(
SampleFeature
.
MaxRelevancy
),
featureView
,
nameof
(
SampleFeatureView
.
MaxRelevancy
));
Misc
.
BindingOperations
.
SetBinding
(
features
[
i
],
nameof
(
SampleFeature
.
MaxOffset
),
featureView
,
nameof
(
SampleFeatureView
.
MaxOffset
));
}
}
}
}
});
});
...
@@ -328,6 +335,9 @@ namespace FLY.Thick.Base.UI
...
@@ -328,6 +335,9 @@ namespace FLY.Thick.Base.UI
/// </summary>
/// </summary>
public
int
Position
{
get
;
set
;
}
public
int
Position
{
get
;
set
;
}
public
int
AD
{
get
;
set
;
}
public
double
SampleValue
{
get
;
set
;
}
#
region
INotifyPropertyChanged
成员
#
region
INotifyPropertyChanged
成员
...
@@ -364,7 +374,8 @@ namespace FLY.Thick.Base.UI
...
@@ -364,7 +374,8 @@ namespace FLY.Thick.Base.UI
/// </summary>
/// </summary>
public
int
EndPos
{
get
;
set
;
}
public
int
EndPos
{
get
;
set
;
}
public
double
MaxRelevancy
{
get
;
set
;
}
public
int
MaxOffset
{
get
;
set
;
}
#
region
INotifyPropertyChanged
成员
#
region
INotifyPropertyChanged
成员
public
event
PropertyChangedEventHandler
PropertyChanged
;
public
event
PropertyChangedEventHandler
PropertyChanged
;
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaFilmWidth.xaml
View file @
c6017f7e
...
@@ -25,32 +25,32 @@
...
@@ -25,32 +25,32 @@
</UserControl.Resources>
</UserControl.Resources>
<Grid>
<Grid>
<Button Click="Border_Width_Click" Width="250" Style="{StaticResource Styles.Button.Empty}" Visibility="{Binding Enable,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<Button Click="Border_Width_Click" Width="250" Style="{StaticResource Styles.Button.Empty}" Visibility="{Binding Enable,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<Border Style="{StaticResource
BorderStyle_module
}" >
<Border Style="{StaticResource
Styles.Module.Border
}" >
<StackPanel Margin="2">
<StackPanel Margin="2">
<StackPanel Orientation="Horizontal" Margin="2">
<StackPanel Orientation="Horizontal" Margin="2">
<StackPanel Orientation="Horizontal" >
<StackPanel Orientation="Horizontal" >
<TextBlock
Text="横向宽度" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B
" />
<TextBlock
Style="{StaticResource Styles.Module.Text.ItemHeader}" Text="横向宽度
" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock
Text="{Binding Width, StringFormat={}{0:F0}}" FontSize="20" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity
}" />
<TextBlock
Style="{StaticResource Styles.Module.Text.ItemValue}" Text="{Binding Width, StringFormat={}{0:F0}
}" />
<TextBlock Style="{StaticResource
ResourceKey=Styles.Text.FieldContent.Unit}" Text="mm" FontSize="12
" />
<TextBlock Style="{StaticResource
Styles.Module.Text.ItemValue.Unit}" Text="mm
" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<TextBlock
Text="纵向速度" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B
" />
<TextBlock
Style="{StaticResource Styles.Module.Text.ItemHeader}" Text="纵向速度
" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock
Text="{Binding FilmVelocity, StringFormat={}{0:F1}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity
}" />
<TextBlock
Style="{StaticResource Styles.Module.Text.ItemValue}" Text="{Binding FilmVelocity, StringFormat={}{0:F1}
}" />
<TextBlock Style="{StaticResource
ResourceKey=Styles.Text.FieldContent.Unit}" Text="m/min" FontSize="12
" />
<TextBlock Style="{StaticResource
Styles.Module.Text.ItemValue.Unit}" Text="m/min
" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="2">
<StackPanel Orientation="Horizontal" Margin="2">
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<TextBlock
Text="纵向位置" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B
" />
<TextBlock
Style="{StaticResource Styles.Module.Text.ItemHeader}" Text="纵向位置
" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock
Text="{Binding FilmPosition, StringFormat={}{0:F2}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity
}" />
<TextBlock
Style="{StaticResource Styles.Module.Text.ItemValue}" Text="{Binding FilmPosition, StringFormat={}{0:F2}
}" />
<TextBlock Style="{StaticResource
ResourceKey=Styles.Text.FieldContent.Unit}" Text="m" FontSize="12"
/>
<TextBlock Style="{StaticResource
Styles.Module.Text.ItemValue.Unit}" Text="m"
/>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaIO.xaml
View file @
c6017f7e
...
@@ -19,28 +19,21 @@
...
@@ -19,28 +19,21 @@
<Setter Property="Margin" Value="1" />
<Setter Property="Margin" Value="1" />
</Style>
</Style>
<Style x:Key="IOTextStyle" TargetType="TextBlock">
<Style x:Key="IOTextStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource
Color_theme_b
ackground}" />
<Setter Property="Foreground" Value="{StaticResource
Brushes.ThemeB
ackground}" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="9"/>
<Setter Property="FontSize" Value="9"/>
</Style>
</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>
<local:DynAreaIOViewModel_UnitTest x:Key="viewModel" IsError="False" ErrMsg="枫莱尔控制器连接断开" />
<local:DynAreaIOViewModel_UnitTest x:Key="viewModel" IsError="False" ErrMsg="枫莱尔控制器连接断开" />
</ResourceDictionary>
</ResourceDictionary>
</UserControl.Resources>
</UserControl.Resources>
<Button Click="Border_IO_Click" Style="{StaticResource Styles.Button.Empty}" d:DataContext="{StaticResource viewModel}">
<Button Click="Border_IO_Click" Style="{StaticResource Styles.Button.Empty}" d:DataContext="{StaticResource viewModel}">
<Grid>
<Grid>
<Border Style="{StaticResource
BorderStyle_module
}" >
<Border Style="{StaticResource
Styles.Module.Border
}" >
<StackPanel Margin="2">
<StackPanel Margin="2">
<StackPanel Orientation="Horizontal" Margin="2">
<StackPanel Orientation="Horizontal" Margin="2">
<TextBlock
Text="入" Style="{StaticResource TextBlockStyle_ItemHeader}"
/>
<TextBlock
Style="{StaticResource Styles.Module.Text.ItemHeader}" Text="入"
/>
<StackPanel Orientation="Horizontal" Margin="4,0">
<StackPanel Orientation="Horizontal" Margin="4,0">
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=15}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=15}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=14}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=14}" Style="{StaticResource IOStyle}"/>
...
@@ -76,7 +69,7 @@
...
@@ -76,7 +69,7 @@
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
<TextBlock
Text="出" Style="{StaticResource TextBlockStyle_ItemHeader}"
/>
<TextBlock
Style="{StaticResource Styles.Module.Text.ItemHeader}" Text="出"
/>
<StackPanel Orientation="Horizontal" Margin="4,0">
<StackPanel Orientation="Horizontal" Margin="4,0">
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=7}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=7}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=6}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=6}" Style="{StaticResource IOStyle}"/>
...
@@ -94,17 +87,16 @@
...
@@ -94,17 +87,16 @@
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="1" Visibility="{Binding IsForever,Converter={StaticResource visbilityconv},ConverterParameter=HiddenWhenTrue}">
<StackPanel Orientation="Vertical" Grid.Column="1" Visibility="{Binding IsForever,Converter={StaticResource visbilityconv},ConverterParameter=HiddenWhenTrue}">
<TextBlock
Text="剩余时间" Style="{StaticResource TextBlockStyle_ItemHeader}" Margin="0"
/>
<TextBlock
Style="{StaticResource Styles.Module.Text.ItemHeader}" Text="剩余时间"
/>
<StackPanel Orientation="Horizontal" Background="Black" >
<StackPanel Orientation="Horizontal" Background="Black" >
<!--<TextBlock Text="20000" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="White" />-->
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue}" Text="{Binding Hrs}" Foreground="White" Padding="2,0"/>
<TextBlock Text="{Binding Hrs}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="White" Padding="2,0"/>
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue.Unit}" Text="小时" Foreground="White"/>
<TextBlock Style="{StaticResource ResourceKey=Styles.Text.FieldContent.Unit}" Text="小时" FontSize="12" Foreground="White"/>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</StackPanel>
</StackPanel>
</Border>
</Border>
<Border Style="{StaticResource
BorderStyle_module
}" Background="Red"
<Border Style="{StaticResource
Styles.Module.Border
}" Background="Red"
Visibility="{Binding IsError,Converter={StaticResource visbilityconv}}">
Visibility="{Binding IsError,Converter={StaticResource visbilityconv}}">
<Grid >
<Grid >
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaSample.xaml
View file @
c6017f7e
...
@@ -12,38 +12,37 @@
...
@@ -12,38 +12,37 @@
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="TextBlock" x:Key="TextBlockStyle_ItemHeader">
<Setter Property="FontWeight" Value="Bold"/>
<local:PgGetSampleVmUt x:Key="viewModel" Enable="True"/>
<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>
<local:PgGetSampleVmUt x:Key="viewModel" Enable="True">
</local:PgGetSampleVmUt>
</ResourceDictionary>
</ResourceDictionary>
</UserControl.Resources>
</UserControl.Resources>
<Button Name="Border_Sample" d:DataContext="{StaticResource viewModel}" Width="250" Click="Border_Sample_Click" Style="{StaticResource Styles.Button.Empty}" Visibility="{Binding Enable,Converter={StaticResource ResourceKey=visbilityconv},ConverterParameter=Collapsed}">
<Button d:DataContext="{StaticResource viewModel}"
<Border Style="{StaticResource BorderStyle_module}" >
Style="{StaticResource Styles.Button.Empty}" Width="250" Click="Border_Sample_Click"
Visibility="{Binding Enable,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<Border Style="{StaticResource Styles.Module.Border}" >
<StackPanel Margin="2">
<StackPanel Margin="2">
<ItemsControl ItemsSource="{Binding Samples}">
<ItemsControl ItemsSource="{Binding Samples}">
<ItemsControl.ItemTemplate>
<ItemsControl.ItemTemplate>
<DataTemplate>
<DataTemplate>
<Grid Margin="2" Visibility="{Binding Enable,Converter={StaticResource
ResourceKey=
visbilityconv},ConverterParameter=Collapsed}">
<Grid Margin="2" Visibility="{Binding Enable,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="182*" />
<ColumnDefinition Width="182*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" >
<StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource
TextBlockStyle_
ItemHeader}" >
<TextBlock Style="{StaticResource
Styles.Module.Text.
ItemHeader}" >
<Run Text="样品" /><Run Text="{Binding
Index
}"/>
<Run Text="样品" /><Run Text="{Binding
Name
}"/>
</TextBlock>
</TextBlock>
<TextBlock Text="{Binding AD}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}"/>
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue}" Foreground="{StaticResource Brushes.Activity}"
<TextBlock Text="|" Style="{StaticResource ResourceKey=Styles.Text.FieldContent.Separator}" FontSize="24" />
Text="{Binding AD}" />
<TextBlock Text="{Binding OrgAD}" Style="{StaticResource ResourceKey=Styles.Text.FieldContent.Unit}" FontSize="12" />
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue.Separator}"/>
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue.Unit}"
Text="{Binding OrgAD}" />
</StackPanel>
</StackPanel>
<TextBlock Grid.Column="1" Text="{Binding SampleValue,StringFormat={}{0:F2}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Background="{StaticResource Color_theme_activity}" Foreground="White"/>
<TextBlock Grid.Column="1"
Style="{StaticResource Styles.Module.Text.ItemValue}"
Background="{StaticResource Brushes.Activity}" Foreground="White"
Text="{Binding SampleValue,StringFormat={}{0:F2}}" />
</Grid>
</Grid>
</DataTemplate>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl.ItemTemplate>
...
@@ -51,25 +50,22 @@
...
@@ -51,25 +50,22 @@
<ItemsControl ItemsSource="{Binding Features}">
<ItemsControl ItemsSource="{Binding Features}">
<ItemsControl.ItemTemplate>
<ItemsControl.ItemTemplate>
<DataTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="2" Visibility="{Binding Enable,Converter={StaticResource
ResourceKey=
visbilityconv},ConverterParameter=Collapsed}">
<StackPanel Orientation="Horizontal" Margin="2" Visibility="{Binding Enable,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<TextBlock
FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B
" >
<TextBlock
Style="{StaticResource Styles.Module.Text.ItemHeader}
" >
<Run Text="{Binding Name}"/><Run Text="特征"/>
<Run Text="{Binding Name}"/><Run Text="特征"/>
</TextBlock>
</TextBlock>
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue}" Foreground="{StaticResource Brushes.Activity}"
<StackPanel Orientation="Horizontal">
Text="{Binding MaxRelevancy,StringFormat={}{0:F2}}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" FontSize="24">
<Run Text="{Binding MaxRelevancy,StringFormat={}{0:F2},Mode=OneWay}"/>
<TextBlock Style="{StaticResource Styles.Module.Text.ItemHeader}"
</TextBlock>
Text="偏移" />
</StackPanel>
<StackPanel Orientation="Horizontal" >
</StackPanel>
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue}" Text="{Binding MaxOffset}" Foreground="{StaticResource Brushes.Activity}" />
<TextBlock Text="偏移" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue.Separator}" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue.Unit}" >
<TextBlock Text="{Binding MaxOffset}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
<TextBlock Style="{StaticResource ResourceKey=Styles.Text.FieldContent.Separator}" FontSize="12"/>
<TextBlock Style="{StaticResource ResourceKey=Styles.Text.FieldContent.Unit}" FontSize="12">
<Run >
<Run >
<MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F0}">
<MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F0}">
<Binding Path=".
MaxOffset" />
<Binding Path="
MaxOffset" />
<Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
<Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
</MultiBinding>
</MultiBinding>
</Run>
</Run>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaSample.xaml.cs
View file @
c6017f7e
...
@@ -26,7 +26,8 @@ namespace FLY.Thick.Base.UI.UiModule
...
@@ -26,7 +26,8 @@ namespace FLY.Thick.Base.UI.UiModule
{
{
static
NLog
.
Logger
logger
=
NLog
.
LogManager
.
GetCurrentClassLogger
();
static
NLog
.
Logger
logger
=
NLog
.
LogManager
.
GetCurrentClassLogger
();
IUnityContainer
container
;
IUnityContainer
container
;
IGetSampleService
getSampleService
;
PgGetSampleVm
viewModel
;
public
DynAreaSample
()
public
DynAreaSample
()
{
{
InitializeComponent
();
InitializeComponent
();
...
@@ -34,10 +35,12 @@ namespace FLY.Thick.Base.UI.UiModule
...
@@ -34,10 +35,12 @@ namespace FLY.Thick.Base.UI.UiModule
[
InjectionMethod
]
[
InjectionMethod
]
public
void
Init
(
IUnityContainer
container
,
IGetSampleService
getSampleService
)
public
void
Init
(
IUnityContainer
container
,
IGetSampleService
getSampleService
)
{
{
viewModel
=
new
PgGetSampleVm
();
viewModel
.
Init
(
getSampleService
,
null
);
this
.
container
=
container
;
this
.
container
=
container
;
this
.
getSampleService
=
getSampleService
;
this
.
DataContext
=
this
.
getSampleService
;
this
.
DataContext
=
viewModel
;
}
}
private
void
Border_Sample_Click
(
object
sender
,
RoutedEventArgs
e
)
private
void
Border_Sample_Click
(
object
sender
,
RoutedEventArgs
e
)
{
{
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaThick.xaml
View file @
c6017f7e
...
@@ -12,20 +12,6 @@
...
@@ -12,20 +12,6 @@
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="TextBlock" x:Key="Style.Text.ItemHeader">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontFamily" Value="YouYuan"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Margin" Value="5,0"/>
</Style>
<Style TargetType="TextBlock" x:Key="Style.Text.ItemValue">
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="FontFamily" Value="Microsoft Sans Serif"/>
<Setter Property="FontSize" Value="24"/>
</Style>
</ResourceDictionary>
</ResourceDictionary>
</UserControl.Resources>
</UserControl.Resources>
<Border Style="{StaticResource Styles.Module.Border}" >
<Border Style="{StaticResource Styles.Module.Border}" >
...
@@ -45,7 +31,7 @@
...
@@ -45,7 +31,7 @@
<Viewbox Margin="10">
<Viewbox Margin="10">
<TextBlock Text="{Binding Thk,StringFormat={}{0:F1}}" Foreground="White" FontSize="30" FontWeight="Bold" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text="{Binding Thk,StringFormat={}{0:F1}}" Foreground="White" FontSize="30" FontWeight="Bold" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Viewbox>
</Viewbox>
<TextBlock Text="{Binding ControllerState,Converter={StaticResource ctrlstateconv}}"
FontSize="12" FontFamily="Microsoft Sans Serif
" HorizontalAlignment="Right" VerticalAlignment="Bottom" Foreground="White" Margin="5"/>
<TextBlock Text="{Binding ControllerState,Converter={StaticResource ctrlstateconv}}"
Style="{StaticResource Styles.Module.Text.ItemValue.Unit}
" HorizontalAlignment="Right" VerticalAlignment="Bottom" Foreground="White" Margin="5"/>
</Grid>
</Grid>
</Border>
</Border>
<StackPanel Grid.Row="1" Margin="2">
<StackPanel Grid.Row="1" Margin="2">
...
@@ -60,9 +46,9 @@
...
@@ -60,9 +46,9 @@
</Rectangle.Width>
</Rectangle.Width>
</Rectangle>
</Rectangle>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource Style
.Text.ItemHeader}" FontFamily="Microsoft Sans Serif"
<TextBlock Style="{StaticResource Style
s.Module.Text.ItemHeader}"
Text="AD" />
Text="AD" />
<TextBlock Style="{StaticResource Style.Text.ItemValue}"
<TextBlock Style="{StaticResource Style
s.Module
.Text.ItemValue}"
Text="{Binding AD}" />
Text="{Binding AD}" />
</StackPanel>
</StackPanel>
</Grid>
</Grid>
...
@@ -81,17 +67,15 @@
...
@@ -81,17 +67,15 @@
</Rectangle.Width>
</Rectangle.Width>
</Rectangle>
</Rectangle>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource Style.Text.ItemHeader}" Text="位置" />
<TextBlock Style="{StaticResource Styles.Module.Text.ItemHeader}" Text="位置" />
<TextBlock Style="{StaticResource Style.Text.ItemValue}" Text="{Binding PosMm,StringFormat={}{0:F0}}"/>
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue}" Text="{Binding PosMm,StringFormat={}{0:F0}}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" FontSize="12" Foreground="Black"
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue.Unit}" Text="mm"/>
Text="mm"/>
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue.Separator}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Separator}" FontSize="24" Foreground="Black"/>
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue.Unit}" Text="{Binding Position}" />
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" FontSize="12" Foreground="Black" Text="{Binding Position}" />
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<StackPanel Grid.Column="1" Orientation="Horizontal">
<TextBlock Style="{StaticResource Style.Text.ItemValue}" Text="{Binding Velocity,StringFormat={}{0:F1}}" />
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue}" Text="{Binding Velocity,StringFormat={}{0:F1}}" />
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" FontSize="12" Foreground="Black"
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue.Unit}" Text="m/min" />
Text="m/min" />
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</StackPanel>
</StackPanel>
...
...
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