diff --git a/SmartAquaViewer/Controls/SegmentedControl.xaml.cs b/SmartAquaViewer/Controls/SegmentedControl.xaml.cs
index 09dde83..2015411 100644
--- a/SmartAquaViewer/Controls/SegmentedControl.xaml.cs
+++ b/SmartAquaViewer/Controls/SegmentedControl.xaml.cs
@@ -13,6 +13,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using static SmartAquaViewer.Model.Enums;
namespace SmartAquaViewer.Controls
{
@@ -36,11 +37,21 @@ namespace SmartAquaViewer.Controls
DependencyProperty.Register(nameof(SelectedValue), typeof(string), typeof(SegmentedControl),
new PropertyMetadata(null));
+ public MonitorTab SelectedTab
+ {
+ get { return (MonitorTab)GetValue(SelectedTabProperty); }
+ set { SetValue(SelectedTabProperty, value); }
+ }
+
+ public static readonly DependencyProperty SelectedTabProperty =
+ DependencyProperty.Register(nameof(SelectedTab), typeof(MonitorTab), typeof(SegmentedControl),
+ new PropertyMetadata(null));
+
private void RadioButton_Checked(object sender, RoutedEventArgs e)
{
if (sender is RadioButton rb && rb.Tag != null)
{
- SelectedValue = rb.Tag.ToString();
+ SelectedTab = (MonitorTab)Enum.Parse(typeof(MonitorTab), rb.Tag.ToString());
}
}
}
diff --git a/SmartAquaViewer/Model/Enums.cs b/SmartAquaViewer/Model/Enums.cs
index c5e42fc..139b68e 100644
--- a/SmartAquaViewer/Model/Enums.cs
+++ b/SmartAquaViewer/Model/Enums.cs
@@ -6,13 +6,13 @@ using System.Threading.Tasks;
namespace SmartAquaViewer.Model
{
- class Enums
+ public class Enums
{
- public enum PanelState
+ public enum MonitorTab
{
- Hidden,
- Normal,
- Expanded
+ Tank,
+ Filter,
+ Sterilizer
}
}
}
diff --git a/SmartAquaViewer/Resources/Generic.xaml b/SmartAquaViewer/Resources/Generic.xaml
index 133b2d2..3b5e037 100644
--- a/SmartAquaViewer/Resources/Generic.xaml
+++ b/SmartAquaViewer/Resources/Generic.xaml
@@ -1,6 +1,9 @@
+ xmlns:helper="clr-namespace:SmartAquaViewer.Helper"
+ xmlns:vm="clr-namespace:SmartAquaViewer.ViewModel"
+ xmlns:model="clr-namespace:SmartAquaViewer.Model"
+ xmlns:da="clr-namespace:SmartAquaViewer.DataAnalysis">
pack://application:,,,/Fonts/#S-Core Dream 1 Thin
pack://application:,,,/Fonts/#S-Core Dream 2 ExtraLight
@@ -104,4 +107,14 @@
+
+
\ No newline at end of file
diff --git a/SmartAquaViewer/View/MonitoringView.xaml b/SmartAquaViewer/View/MonitoringView.xaml
index 98e6c52..77983c7 100644
--- a/SmartAquaViewer/View/MonitoringView.xaml
+++ b/SmartAquaViewer/View/MonitoringView.xaml
@@ -21,12 +21,12 @@
+ SelectedTab="{Binding SelectedTab, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
-
+ HorizontalAlignment="Center" Visibility="Collapsed">
@@ -44,11 +44,7 @@
+ Style="{StaticResource DataGridStyle}">
@@ -58,7 +54,7 @@
-
+
@@ -71,6 +67,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+