|
@@ -3,6 +3,9 @@ using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Controls;
|
|
|
+using System.Windows.Media.Animation;
|
|
|
+using System.Windows.Shapes;
|
|
|
+using Venus_Core;
|
|
|
using Venus_Themes.Unity;
|
|
|
|
|
|
namespace Venus_Themes.UserControls
|
|
@@ -84,12 +87,26 @@ namespace Venus_Themes.UserControls
|
|
|
}
|
|
|
|
|
|
public static readonly DependencyProperty PercentValueProperty = DependencyProperty.Register(
|
|
|
- "PercentValue", typeof(double), typeof(TMChamber));
|
|
|
+ "PercentValue", typeof(double), typeof(TMChamber),new PropertyMetadata(0.0,OnDataChanged));
|
|
|
+
|
|
|
+ private static void OnDataChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
|
|
+ {
|
|
|
+ if (d is TMChamber chamber)
|
|
|
+ {
|
|
|
+
|
|
|
+ DoubleAnimation doubleAnimation = new DoubleAnimation((double)e.OldValue, (double)e.NewValue, new Duration(TimeSpan.FromSeconds(1)));
|
|
|
+ chamber.rec_Water.BeginAnimation(HeightProperty, doubleAnimation);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
public double PercentValue
|
|
|
{
|
|
|
get { return (double)this.GetValue(PercentValueProperty); }
|
|
|
- set { this.SetValue(PercentValueProperty, value); }
|
|
|
+ set
|
|
|
+ {
|
|
|
+
|
|
|
+ this.SetValue(PercentValueProperty, value);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public static readonly DependencyProperty IsShowPressureValueProperty = DependencyProperty.Register(
|