Commit dfec0311 authored by 潘栩锋's avatar 潘栩锋 🚴

1.修改winder 主界面 dynarea 显示的单位

2.旋转塔,反向限位 与 反转信号 调换了
parent ea683036
......@@ -76,6 +76,7 @@ namespace ThickTcpUiInWindow
/// </summary>
/// <param name="tabControl"></param>
/// <param name="stackpanel_dynarea"></param>
/// <param name="stackpanel_menu"></param>
/// <param name="layout"></param>
public void Init(TabControl tabControl, StackPanel stackpanel_dynarea, StackPanel stackpanel_menu,
UIModule.FLYLayout layout)
......
......@@ -26,7 +26,7 @@ namespace ThickTcpUiInWindow.UIModule
public List<GraphTabItem> Items { get; } = new List<GraphTabItem>();
private int dynareawidth = 400;
private int dynareawidth = 250;
/// <summary>
/// 动态区宽度
/// </summary>
......@@ -52,7 +52,12 @@ namespace ThickTcpUiInWindow.UIModule
/// <summary>
/// 动态区显示
/// </summary>
public bool IsDynAreaVisible { get; set; }
public bool IsDynAreaVisible { get; set; } = true;
/// <summary>
/// 当前选了menu, 这个不需要保存
/// </summary>
public bool IsInMenuSelect { get; set; }
/// <summary>
/// 测厚仪的状态不同状态,显示的页面
/// </summary>
......@@ -64,7 +69,7 @@ namespace ThickTcpUiInWindow.UIModule
public int Top { get; set; }
public int Width { get; set; } = 1024;
public int Height { get; set; } = 768;
public WindowState WindowState { get; set; }
public WindowState WindowState { get; set; } = WindowState.Maximized;
#endregion
/// <summary>
/// 文件路径
......@@ -92,7 +97,6 @@ namespace ThickTcpUiInWindow.UIModule
/// </summary>
public FLYLayout()
{
Load();
}
/// <summary>
......
......@@ -7,6 +7,8 @@
xmlns:iservice="clr-namespace:FLY.Thick.Blowing.IService;assembly=FLY.Thick.Blowing"
xmlns:common="clr-namespace:FLY.Thick.Base.Common;assembly=FLY.Thick.Base"
xmlns:blowing_common="clr-namespace:FLY.Thick.Blowing.Common;assembly=FLY.Thick.Blowing"
xmlns:base_uimodule="clr-namespace:ThickTcpUiInWindow.UIModule;assembly=ThickTcpUiInWindow"
xmlns:misc="clr-namespace:Misc;assembly=MISC"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="1024"
......@@ -38,10 +40,16 @@
</ControlTemplate>
<blowing_common:BlowingFixProfileParam x:Key="profile_param" MMode="Bag"/>
<base_uimodule:FLYLayout
x:Key="flylayout_unittests"
DynAreaWidth="250"
IsInMenuSelect ="True"
/>
</ResourceDictionary>
</Page.Resources>
<Grid>
<Grid Name="grid_initparam"/>
<Grid Name="grid_layout" d:DataContext="{StaticResource flylayout_unittests}"/>
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
......@@ -70,7 +78,7 @@
</Style>
</ResourceDictionary>
</Grid.Resources>
<StackPanel Name="stackpanel_button" Background="#282828">
<StackPanel Background="#282828" >
<Button Click="button_sysparam_click" >
<StackPanel >
<Path Data="{StaticResource Geometry_settings}" />
......@@ -83,11 +91,11 @@
<TextBlock Text="产品" />
</StackPanel>
</Button>
<StackPanel >
<StackPanel Visibility="{Binding DataContext.EPCType, ElementName=Border_Blowing, Converter={StaticResource e2visconv_collapsed}, ConverterParameter={x:Static iservice:RenZiJiaFixEPCType.EPCA10}}">
<StackPanel DataContext="{Binding ElementName=Border_Blowing,Path=DataContext}">
<StackPanel Visibility="{Binding EPCType, Converter={StaticResource e2visconv_collapsed}, ConverterParameter={x:Static iservice:RenZiJiaFixEPCType.EPCA10}}">
<Button
Click="button_epc_start_click"
Visibility="{Binding DataContext.EPCIsRunning, ElementName=Border_Blowing, Converter={StaticResource visbilityconv}, ConverterParameter=HiddenWhenTrue}"
Visibility="{Binding EPCIsRunning, Converter={StaticResource visbilityconv}, ConverterParameter=HiddenWhenTrue}"
>
<StackPanel >
......@@ -98,7 +106,7 @@
<Button
Click="button_epc_stop_click"
Visibility="{Binding DataContext.EPCIsRunning, ElementName=Border_Blowing, Converter={StaticResource visbilityconv}, ConverterParameter=Hidden}"
Visibility="{Binding EPCIsRunning, Converter={StaticResource visbilityconv}, ConverterParameter=Hidden}"
>
<StackPanel >
<Path Data="{StaticResource Geometry_close-circle}" Fill="Red" />
......@@ -110,7 +118,7 @@
</StackPanel>
</StackPanel>
<StackPanel Name="stackpanel_menuselect" Background="#282828" Visibility="{Binding IsInMenuSelect,Converter={StaticResource visbilityconv}}">
<StackPanel Background="#282828" DataContext="{Binding ElementName=grid_layout,Path=DataContext}" Visibility="{Binding IsInMenuSelect,Converter={StaticResource visbilityconv}}">
<Button Click="button_backmenu_click">
<StackPanel >
<Path Data="{StaticResource Geometry_arrow-left}" />
......@@ -133,8 +141,7 @@
<ColumnDefinition Width="395*" />
</Grid.ColumnDefinitions>
<Grid>
<Grid Name="grid_initparam"/>
<Grid Name="grid_layout"/>
<Viewbox Name="viewbox_dynarea" DataContext="{Binding DataContext,ElementName=grid_layout}" MaxWidth="{Binding DynAreaWidth}" Visibility="{Binding IsDynAreaVisible,Converter={StaticResource visbilityconv}, ConverterParameter=Collapsed}" VerticalAlignment="Top" HorizontalAlignment="Left" SnapsToDevicePixels="True" >
<StackPanel Name="stackpanel_dynarea" Orientation="Vertical" Margin="5" Width="250">
<StackPanel.Resources>
......@@ -511,7 +518,7 @@
</Grid>
<Button RenderTransformOrigin="0.25,0.5" Click="button_option_click" Template="{StaticResource ResourceKey=picture_button}" HorizontalAlignment="Left" VerticalAlignment="Bottom" >
<Button RenderTransformOrigin="0.25,0.5" Click="button_option_click" Style="{StaticResource ButtonStyle_empty}" HorizontalAlignment="Left" VerticalAlignment="Bottom" >
<Button.RenderTransform>
<TransformGroup>
<RotateTransform Angle="-90"/>
......
......@@ -33,25 +33,12 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
private ThickTcpUiInWindow.UIModule.FLYLayout mLayout;
private FLYLayoutManager mManager;
private bool isInMenuSelect = false;
public bool IsInMenuSelect
{
get { return isInMenuSelect; }
set {
if (isInMenuSelect != value)
{
isInMenuSelect = value;
NotifyPropertyChanged("IsInMenuSelect");
}
}
}
TDGage gage;
public Page_Main()
{
InitializeComponent();
stackpanel_menuselect.DataContext = this;
}
public void Init(TDGage gage)
{
......@@ -61,7 +48,6 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
{
this.gage = gage;
stackpanel_dynarea.DataContext = gage.mDynArea;
stackpanel_button.DataContext = gage.mSysParam;
Init_Border_Blowing();
Init_Border_Profile();
......@@ -72,6 +58,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
System.Windows.Application.Current.Dispatcher.Invoke(new Action(() =>
{
mLayout = new ThickTcpUiInWindow.UIModule.FLYLayout();
mLayout.Load();
grid_layout.DataContext = mLayout;
mManager = new FLYLayoutManager();
mManager.myUIModules.Add("scangraph",
......@@ -188,7 +175,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
{
if (stackpanel_menu.Children.Count > 0)
{
IsInMenuSelect = true;
mLayout.IsInMenuSelect = true;
}
else
{
......@@ -197,7 +184,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
}
private void button_backmenu_click(object sender, RoutedEventArgs e)
{
IsInMenuSelect = false;
mLayout.IsInMenuSelect = false;
}
private void button_menu_click(object sender, RoutedEventArgs e)
{
......
......@@ -72,7 +72,7 @@
<Viewbox Margin="5,0" MaxWidth="80" MaxHeight="26">
<StackPanel Orientation="Horizontal" >
<TextBlock Text="{Binding MeasureLen, StringFormat={}{0:F0}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="White" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" Foreground="LightGray"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="m" FontSize="12" Foreground="LightGray"/>
</StackPanel>
</Viewbox>
......@@ -98,7 +98,7 @@
<Viewbox Margin="5,0" MaxWidth="80" MaxHeight="26">
<StackPanel Orientation="Horizontal" >
<TextBlock Text="{Binding MeasureLen, StringFormat={}{0:F0}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="White" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" Foreground="LightGray"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="m" FontSize="12" Foreground="LightGray"/>
</StackPanel>
</Viewbox>
......
<?xml version="1.0" encoding="utf-8"?>
<FLYLayout DynAreaWidth="400" IsDynAreaVisible="False" Left="0" Top="0" Width="1024" Height="768" WindowState="Normal">
<Items />
<ControllerStates />
<DynAreaItems />
</FLYLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment