|
|
|
@ -27,50 +27,5 @@ namespace SmartAquaViewer.View
|
|
|
|
{
|
|
|
|
{
|
|
|
|
InitializeComponent();
|
|
|
|
InitializeComponent();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void btnVisibility_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Button button = sender as Button;
|
|
|
|
|
|
|
|
if (button == null) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isDown = button.Tag != null && button.Tag.ToString() == "down";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_state = isDown
|
|
|
|
|
|
|
|
? _state switch
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PanelState.Hidden => PanelState.Normal,
|
|
|
|
|
|
|
|
//PanelState.Normal => PanelState.Expanded,
|
|
|
|
|
|
|
|
_ => PanelState.Hidden
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
: _state switch
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PanelState.Hidden => PanelState.Normal,
|
|
|
|
|
|
|
|
//PanelState.Expanded => PanelState.Normal,
|
|
|
|
|
|
|
|
_ => PanelState.Hidden
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ApplyState();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|