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
f866cdb1
Commit
f866cdb1
authored
Mar 01, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 UiModul/DynAreaThick
parent
ec9702ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
166 additions
and
12 deletions
+166
-12
DynAreaThick.xaml
...Y.Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaThick.xaml
+97
-0
DynAreaThick.xaml.cs
...hick.Base/FLY.Thick.Base.UI/UiModule/DynAreaThick.xaml.cs
+69
-0
MenuMotion.xaml.cs
....Thick.Base/FLY.Thick.Base.UI/UiModule/MenuMotion.xaml.cs
+0
-12
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaThick.xaml
0 → 100644
View file @
f866cdb1
<UserControl x:Class="FLY.Thick.Base.UI.UiModule.DynAreaThick"
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:FLY.Thick.Base.UI.UiModule"
mc:Ignorable="d" d:DesignWidth="250"
>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<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.MergedDictionaries>
<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>
<Border Style="{StaticResource BorderStyle_module}" Name="Border_AD" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Grid x:Name="grid_initparam"/>
<Border Background="{StaticResource Background_Title}" CornerRadius="3" Height="130" >
<Grid>
<Viewbox Margin="10">
<TextBlock Text="{Binding Thick,Converter={StaticResource thickconv}}" Foreground="White" FontSize="30" FontWeight="Bold" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Viewbox>
<TextBlock Text="{Binding ControllerState,Converter={StaticResource ctrlstateconv}}" FontSize="12" FontFamily="Microsoft Sans Serif" HorizontalAlignment="Right" VerticalAlignment="Bottom" Foreground="White" Margin="5"/>
</Grid>
</Border>
<StackPanel Grid.Row="1" Margin="2">
<Grid Margin="2" Name="grid_ad">
<Rectangle Fill="#FF86C2E9" HorizontalAlignment="Left">
<Rectangle.Width>
<MultiBinding Converter="{StaticResource ratioconv}" Mode="OneWay">
<Binding Path="AD" />
<Binding Path="ADMax" />
<Binding Path="ActualWidth" ElementName="grid_ad"/>
</MultiBinding>
</Rectangle.Width>
</Rectangle>
<StackPanel Orientation="Horizontal">
<TextBlock Text="AD" Style="{StaticResource TextBlockStyle_ItemHeader}" />
<TextBlock Text="{Binding AD, Converter={StaticResource ResourceKey=intconv}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Grid>
<Grid Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Rectangle Fill="#FF86C2E9" HorizontalAlignment="Left" Grid.ColumnSpan="3">
<Rectangle.Width>
<MultiBinding Converter="{StaticResource ratioconv}" Mode="OneWay">
<Binding Path="Position" />
<Binding Path="DataContext.PosLength" ElementName="grid_initparam"/>
<Binding Path="ActualWidth" ElementName="grid_ad"/>
</MultiBinding>
</Rectangle.Width>
</Rectangle>
<StackPanel Orientation="Horizontal">
<TextBlock Text="位置" Style="{StaticResource TextBlockStyle_ItemHeader}" />
<TextBlock FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" >
<Run>
<MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F0}">
<Binding Path="Position" />
<Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
</MultiBinding>
</Run>
</TextBlock>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" FontSize="12" Foreground="Black">
<Run Text="mm"/>
</TextBlock>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm_interval}" Text="|" FontSize="24" Foreground="Black"/>
<TextBlock Text="{Binding Position}" Style="{StaticResource TextBlockStyle_FieldContent_mm}" FontSize="12" Foreground="Black">
</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<TextBlock Text="{Binding Velocity,StringFormat={}{0:F1},Mode=OneWay}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" />
<TextBlock Text="m/min" Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" FontSize="12" Foreground="Black"/>
</StackPanel>
</Grid>
</StackPanel>
</Grid>
</Border>
</UserControl>
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/DynAreaThick.xaml.cs
0 → 100644
View file @
f866cdb1
using
FLY.Thick.Base.Common
;
using
MultiLayout.UiModule
;
using
System.Windows
;
using
System.Windows.Controls
;
using
Unity
;
namespace
FLY.Thick.Base.UI.UiModule
{
/// <summary>
/// DynAreaThick.xaml 的交互逻辑
/// </summary>
public
partial
class
DynAreaThick
:
UserControl
{
private
DynArea
dynArea
;
private
FLY
.
Thick
.
Base
.
IService
.
IInitParamService
initParamService
;
private
IUnityContainer
container
;
public
DynAreaThick
()
{
InitializeComponent
();
}
//public void Init(int id)
//{
// //获取设备
// TDGage gage = Application.Current.Properties["Gage"] as TDGage;
// this.DataContext = gage.mDynArea;
// grid_initparam.DataContext = gage.mInitParam;
//}
[
InjectionMethod
]
public
void
Init
(
IUnityContainer
container
,
FLY
.
Thick
.
Base
.
IService
.
IDynAreaService
dynAreaService
,
FLY
.
Thick
.
Base
.
IService
.
IInitParamService
initParamService
)
{
this
.
container
=
container
;
this
.
dynArea
=
dynAreaService
.
DynArea
;
this
.
initParamService
=
initParamService
;
this
.
DataContext
=
this
.
dynArea
;
grid_initparam
.
DataContext
=
this
.
initParamService
;
}
}
public
class
UiModule2_DynAreaThick
:
IUiModule2
{
public
string
Title
=>
"面密度状态"
;
public
ComponentType
Type
=>
ComponentType
.
DynArea
;
public
bool
IsUnique
=>
true
;
public
FrameworkElement
GetComponent
(
int
id
,
IUnityContainer
container
)
{
DynAreaThick
graph
=
new
DynAreaThick
();
container
.
BuildUp
(
graph
);
return
graph
;
}
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 @
f866cdb1
using
FLY.Thick.Base.IService
;
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
...
...
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