Browse Source

调试修改

master
pry 2 years ago
parent
commit
9bbaf9c34e
3 changed files with 120 additions and 157 deletions
  1. +109
    -153
      HBLConsole/View/MainView.xaml
  2. +4
    -4
      HBLConsole/View/MainView.xaml.cs
  3. +7
    -0
      HBLConsole/ViewModel/ViewModelBase.cs

+ 109
- 153
HBLConsole/View/MainView.xaml View File

@@ -146,11 +146,12 @@

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.18*" />
<RowDefinition Height="0.09*" />
<RowDefinition Height="0.09*" />
<RowDefinition />
</Grid.RowDefinitions>

<Grid>
<Grid Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
@@ -169,108 +170,6 @@
Foreground="{Binding NetworkConnectState, Converter={StaticResource NetworkColorConvert}}"
Text="上位机监控系统" />

<Grid
Name="gr"
Grid.Row="1"
Margin="10"
VerticalAlignment="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<!--<ColumnDefinition Width="0.3*" />-->
</Grid.ColumnDefinitions>

<StackPanel Orientation="Horizontal">

<RadioButton
Command="{Binding NavChangedCommand}"
CommandParameter="MessageLogView"
Content="消息日志"
IsChecked="True"
Style="{StaticResource BeveledRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="OrderStatusView"
Content="订单状态"
Style="{StaticResource ParallelogramRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="AlarmView"
Content="报警记录"
Style="{StaticResource ParallelogramRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Content="参数设置"
Style="{StaticResource ParallelogramRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="DebugContainer"
Content="调试模式"
Style="{StaticResource ParallelogramRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="ProcessMonitoringView"
Content="流程监控"
Style="{StaticResource ParallelogramRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="DeviceManageView"
Content="设备管理"
Style="{StaticResource ParallelogramRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="VariableConfig"
Content="变量管理"
Style="{StaticResource ParallelogramRadioButtonStyle}" />


<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="BatchingAddView"
Content="物料补充"
Style="{StaticResource ParallelogramRadioButtonStyle}" />
</StackPanel>

<!--<StackPanel
Grid.Column="1"
Margin="0,0,10,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock
FontSize="16"
Foreground="#00c2f4"
Text="当前订单量:" />
<TextBlock
FontSize="16"
Foreground="#00c2f4"
Text="{Binding OrderCount}" />

<TextBlock
Margin="10,0,0,0"
FontSize="16"
Foreground="#00c2f4"
Text="网络状态:" />
<TextBlock
FontSize="16"
Foreground="{Binding NetworkConnectState, Converter={StaticResource NetworkColorConvert}}"
Text="{Binding NetworkConnectState, Converter={StaticResource NetworkTextConvert}}" />
</StackPanel>-->
</Grid>

<Grid>
<Grid.RowDefinitions>
<RowDefinition />
@@ -278,7 +177,7 @@
</Grid.RowDefinitions>

<StackPanel
Grid.Row="1"
Grid.Row="1"
Margin="10,5,10,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
@@ -291,33 +190,14 @@
FontSize="16"
Foreground="#00c2f4"
Text="{Binding OrderCount}" />

<!--<TextBlock
Margin="10,0,0,0"
FontSize="16"
Foreground="#00c2f4"
Text="网络状态:" />
<TextBlock
FontSize="16"
Foreground="{Binding NetworkConnectState, Converter={StaticResource NetworkColorConvert}}"
Text="{Binding NetworkConnectState, Converter={StaticResource NetworkTextConvert}}" />-->
</StackPanel>

<StackPanel
Grid.Row="1"
Grid.Row="1"
Margin="10,5,10,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<!--<TextBlock
FontSize="16"
Foreground="#00c2f4"
Text="当前订单量:" />
<TextBlock
FontSize="16"
Foreground="#00c2f4"
Text="{Binding OrderCount}" />-->

<TextBlock
Margin="10,0,0,0"
FontSize="16"
@@ -350,40 +230,116 @@

</Grid>

<Grid Grid.Row="1" Margin="10">
<Grid
Grid.Row="1"
Grid.RowSpan="2"
Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="0.06*" />
<RowDefinition Height="{Binding ContentHeight}" />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock
Margin="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="20"
Foreground="#00C2F4"
Text="{Binding WindowName}" />

<Image
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
Source="../Resources/Images/tittle.png" />

<Image
Grid.RowSpan="2"
HorizontalAlignment="Center"
Source="../Resources/Images/阴影边框.png"
Stretch="Fill" />
<StackPanel
Margin="0,10"
VerticalAlignment="Top"
Orientation="Horizontal">
<RadioButton
Command="{Binding NavChangedCommand}"
CommandParameter="MessageLogView"
Content="消息日志"
IsChecked="True"
Style="{StaticResource BeveledRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="OrderStatusView"
Content="订单状态"
Style="{StaticResource ParallelogramRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="AlarmView"
Content="报警记录"
Style="{StaticResource ParallelogramRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Content="参数设置"
Style="{StaticResource ParallelogramRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="DebugContainer"
Content="调试模式"
Style="{StaticResource ParallelogramRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="ProcessMonitoringView"
Content="流程监控"
Style="{StaticResource ParallelogramRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="DeviceManageView"
Content="设备管理"
Style="{StaticResource ParallelogramRadioButtonStyle}" />

<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="VariableConfig"
Content="变量管理"
Style="{StaticResource ParallelogramRadioButtonStyle}" />


<RadioButton
Margin="-10,0,0,0"
Command="{Binding NavChangedCommand}"
CommandParameter="BatchingAddView"
Content="物料补充"
Style="{StaticResource ParallelogramRadioButtonStyle}" />
</StackPanel>

<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="0.06*" />
<RowDefinition />
</Grid.RowDefinitions>

<Image
Grid.RowSpan="2"
HorizontalAlignment="Center"
Source="../Resources/Images/边角.png"
Stretch="Fill" />
<TextBlock
Margin="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="20"
Foreground="#00C2F4"
Text="{Binding WindowName}" />

<Image HorizontalAlignment="Center" Source="../Resources/Images/tittle.png" />

<Image
Grid.RowSpan="2"
HorizontalAlignment="Center"
Source="../Resources/Images/阴影边框.png"
Stretch="Fill" />

<Image
Grid.RowSpan="2"
HorizontalAlignment="Center"
Source="../Resources/Images/边角.png"
Stretch="Fill" />

<ContentControl
Grid.Row="1"
Margin="15"
Content="{Binding MainContent}" />
</Grid>

<ContentControl
Grid.Row="1"
Margin="15"
Content="{Binding MainContent}" />

</Grid>
</Grid>


+ 4
- 4
HBLConsole/View/MainView.xaml.cs View File

@@ -45,13 +45,13 @@ namespace HBLConsole.View
{
if (e.ClickCount > 1)
{
if (gr.Visibility == Visibility.Visible)
if (ViewModelBase.ContentHeight == 50)
{
gr.Visibility = Visibility.Collapsed;
ViewModelBase.ContentHeight = 0;
}
else if (gr.Visibility == Visibility.Collapsed)
else if (ViewModelBase.ContentHeight == 0)
{
gr.Visibility = Visibility.Visible;
ViewModelBase.ContentHeight = 50;
}
}
};


+ 7
- 0
HBLConsole/ViewModel/ViewModelBase.cs View File

@@ -55,6 +55,13 @@ namespace HBLConsole.ViewModel
public static int OrderCount { get { return _mOrderCount; } set { _mOrderCount = value; OnStaticPropertyChanged(); } }
private static int _mOrderCount;

/// <summary>
/// 内容高度显示
/// </summary>
public static int ContentHeight { get { return _mContentHeight; } set { _mContentHeight = value; OnStaticPropertyChanged(); } }
private static int _mContentHeight = 0;


/// <summary>
/// 订单状态列表
/// </summary>


Loading…
Cancel
Save