|
@@ -112,6 +112,9 @@ namespace Aitex.Core.UI.Control
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
private static void OnDeviceDataChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
|
|
{
|
|
|
var self = (AnalogControl4Jet)d;
|
|
@@ -164,7 +167,7 @@ namespace Aitex.Core.UI.Control
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
return (AnalogDeviceDataItem)this.GetValue(DeviceDataProperty);
|
|
|
}
|
|
|
set
|
|
@@ -205,7 +208,8 @@ namespace Aitex.Core.UI.Control
|
|
|
RefreshMFCData();
|
|
|
}
|
|
|
|
|
|
- private void RefreshMFCData()
|
|
|
+
|
|
|
+ public void RefreshMFCData()
|
|
|
{
|
|
|
#region FeedBack
|
|
|
if (DeviceData == null) return;
|
|
@@ -267,8 +271,21 @@ namespace Aitex.Core.UI.Control
|
|
|
break;
|
|
|
case GasPanelStateType.Recipe:
|
|
|
ShowValue = DeviceData.VirtualFeedBack.ToString("f3");
|
|
|
- topBorder.Background = (float.Parse(ShowValue) > 0 && "RecipeView".Equals(ViewName)) ? (Brush)brushConverter.ConvertFromString("#FFFFD2") : (Brush)brushConverter.ConvertFromString("#B0D1F1");
|
|
|
- downBorder.Background = (float.Parse(ShowValue) > 0 && "RecipeView".Equals(ViewName)) ? (Brush)brushConverter.ConvertFromString("#FFFFD2") : (Brush)brushConverter.ConvertFromString("#B0D1F1");
|
|
|
+
|
|
|
+ if ("RecipeView".Equals(ViewName))
|
|
|
+ {
|
|
|
+ if (DeviceData.IsCharge || (float.Parse(ShowValue) > 0))
|
|
|
+ {
|
|
|
+ topBorder.Background = (Brush)brushConverter.ConvertFromString("#FFFFD2");
|
|
|
+ downBorder.Background = (Brush)brushConverter.ConvertFromString("#FFFFD2");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ topBorder.Background = (Brush)brushConverter.ConvertFromString("#B0D1F1");
|
|
|
+ downBorder.Background = (Brush)brushConverter.ConvertFromString("#B0D1F1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
break;
|
|
|
default:
|
|
|
ShowValue = 0.ToString("f3");
|
|
@@ -354,6 +371,12 @@ namespace Aitex.Core.UI.Control
|
|
|
}
|
|
|
|
|
|
|
|
|
+ private void ExecuteOrNull(double value, double? ramp)
|
|
|
+ {
|
|
|
+
|
|
|
+ Execute(value, ramp);
|
|
|
+
|
|
|
+ }
|
|
|
private void Execute(double value, double? ramp)
|
|
|
{
|
|
|
if (!IsExecute)
|
|
@@ -414,7 +437,7 @@ namespace Aitex.Core.UI.Control
|
|
|
BrushConverter brushConverter = new BrushConverter();
|
|
|
InputDialogBox dialogBox = new InputDialogBox
|
|
|
{
|
|
|
- CommandDelegate = Execute,
|
|
|
+ CommandDelegate = ExecuteOrNull,
|
|
|
DeviceName = string.Format("{0}: {1}", DeviceData.Type, DeviceData.DisplayName),
|
|
|
DeviceId = DeviceData.DeviceId,
|
|
|
DefaultValue = DeviceData.DefaultValue,
|
|
@@ -473,7 +496,7 @@ namespace Aitex.Core.UI.Control
|
|
|
//SetCursorPos(0, 0);
|
|
|
dialogBox.Close();
|
|
|
dialogBox.Dispose();
|
|
|
-
|
|
|
+ RefreshMFCData();
|
|
|
|
|
|
}
|
|
|
}
|