diff --git a/SmartAquaViewer/SmartAquaViewer.csproj b/SmartAquaViewer/SmartAquaViewer.csproj
index 89624fe..27a713d 100644
--- a/SmartAquaViewer/SmartAquaViewer.csproj
+++ b/SmartAquaViewer/SmartAquaViewer.csproj
@@ -30,6 +30,7 @@
+
diff --git a/SmartAquaViewer/View/MonitoringView.xaml b/SmartAquaViewer/View/MonitoringView.xaml
index e92e827..243698f 100644
--- a/SmartAquaViewer/View/MonitoringView.xaml
+++ b/SmartAquaViewer/View/MonitoringView.xaml
@@ -5,39 +5,39 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SmartAquaViewer.View"
xmlns:helper="clr-namespace:SmartAquaViewer.Helper"
+ xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
d:DesignHeight="940" d:DesignWidth="1650">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/SmartAquaViewer/View/MonitoringView.xaml.cs b/SmartAquaViewer/View/MonitoringView.xaml.cs
index 76bee61..3d7e126 100644
--- a/SmartAquaViewer/View/MonitoringView.xaml.cs
+++ b/SmartAquaViewer/View/MonitoringView.xaml.cs
@@ -54,23 +54,23 @@ namespace SmartAquaViewer.View
private void ApplyState()
{
- switch (_state)
- {
- case PanelState.Hidden:
- rdGraph.Height = new GridLength(0, GridUnitType.Pixel);
- btnVisibilityDown.Visibility = Visibility.Collapsed;
- btnVisibilityUp.Visibility = Visibility.Visible;
- break;
- case PanelState.Normal:
- rdGraph.Height = new GridLength(450, GridUnitType.Pixel);
- btnVisibilityDown.Visibility = Visibility.Visible;
- btnVisibilityUp.Visibility = Visibility.Collapsed;
- break;
- //case PanelState.Expanded:
- // this.Visibility = Visibility.Visible;
- // this.Height = 400; // Expanded height
- // break;
- }
+ //switch (_state)
+ //{
+ // case PanelState.Hidden:
+ // rdGraph.Height = new GridLength(0, GridUnitType.Pixel);
+ // btnVisibilityDown.Visibility = Visibility.Collapsed;
+ // btnVisibilityUp.Visibility = Visibility.Visible;
+ // break;
+ // case PanelState.Normal:
+ // rdGraph.Height = new GridLength(450, GridUnitType.Pixel);
+ // btnVisibilityDown.Visibility = Visibility.Visible;
+ // btnVisibilityUp.Visibility = Visibility.Collapsed;
+ // break;
+ // //case PanelState.Expanded:
+ // // this.Visibility = Visibility.Visible;
+ // // this.Height = 400; // Expanded height
+ // // break;
+ //}
}
}
}
diff --git a/SmartAquaViewer/ViewModel/MonitoringViewModel.cs b/SmartAquaViewer/ViewModel/MonitoringViewModel.cs
index af32925..c207363 100644
--- a/SmartAquaViewer/ViewModel/MonitoringViewModel.cs
+++ b/SmartAquaViewer/ViewModel/MonitoringViewModel.cs
@@ -5,14 +5,67 @@ using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Input;
+using SmartAquaViewer.Controls;
namespace SmartAquaViewer.ViewModel
{
public class MonitoringViewModel : INotifyPropertyChanged
{
+ private bool _isOpenMode;
+ public bool IsOpenMode
+ {
+ get => _isOpenMode;
+ set
+ {
+ if (_isOpenMode != value)
+ {
+ _isOpenMode = value;
+ OnPropertyChanged();
+
+ BtnVisibilityDown = _isOpenMode ? Visibility.Visible : Visibility.Collapsed;
+ BtnVisibilityUp = _isOpenMode ? Visibility.Collapsed : Visibility.Visible;
+ }
+ }
+ }
+
+ private Visibility _btnVisibilityDown;
+ public Visibility BtnVisibilityDown
+ {
+ get => _btnVisibilityDown;
+ set
+ {
+ if (_btnVisibilityDown != value)
+ {
+ _btnVisibilityDown = value;
+ OnPropertyChanged();
+ }
+ }
+ }
+
+ private Visibility _btnVisibilityUp;
+ public Visibility BtnVisibilityUp
+ {
+ get => _btnVisibilityUp;
+ set
+ {
+ if (_btnVisibilityUp != value)
+ {
+ _btnVisibilityUp = value;
+ OnPropertyChanged();
+ }
+ }
+ }
+
+ public ICommand ChangeDrawerStatusCommand { get; }
+
public MonitoringViewModel()
{
- // Initialization logic for MonitoringViewModel can go here
+ IsOpenMode = true;
+ BtnVisibilityUp = Visibility.Collapsed;
+
+ ChangeDrawerStatusCommand = new RelayCommand(_ => IsOpenMode = !IsOpenMode);
}
public event PropertyChangedEventHandler? PropertyChanged;