diff --git a/HBLConsole/View/MainView.xaml b/HBLConsole/View/MainView.xaml index f0a3633..c7c33a0 100644 --- a/HBLConsole/View/MainView.xaml +++ b/HBLConsole/View/MainView.xaml @@ -146,11 +146,12 @@ - + + - + @@ -169,108 +170,6 @@ Foreground="{Binding NetworkConnectState, Converter={StaticResource NetworkColorConvert}}" Text="上位机监控系统" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -278,7 +177,7 @@ - - - - - + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - diff --git a/HBLConsole/View/MainView.xaml.cs b/HBLConsole/View/MainView.xaml.cs index 7dc6bd9..c362ac3 100644 --- a/HBLConsole/View/MainView.xaml.cs +++ b/HBLConsole/View/MainView.xaml.cs @@ -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; } } }; diff --git a/HBLConsole/ViewModel/ViewModelBase.cs b/HBLConsole/ViewModel/ViewModelBase.cs index a5b049e..830c827 100644 --- a/HBLConsole/ViewModel/ViewModelBase.cs +++ b/HBLConsole/ViewModel/ViewModelBase.cs @@ -55,6 +55,13 @@ namespace HBLConsole.ViewModel public static int OrderCount { get { return _mOrderCount; } set { _mOrderCount = value; OnStaticPropertyChanged(); } } private static int _mOrderCount; + /// + /// 内容高度显示 + /// + public static int ContentHeight { get { return _mContentHeight; } set { _mContentHeight = value; OnStaticPropertyChanged(); } } + private static int _mContentHeight = 0; + + /// /// 订单状态列表 ///