diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index 1db03ed..a82d912 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -37,8 +37,7 @@
4
-
-
+ Image\favicon.ico
true
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index 1db03ed..a82d912 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -37,8 +37,7 @@
4
-
-
+ Image\favicon.ico
true
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 88f4298..106b68c 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -46,24 +46,23 @@
Height="18"
Margin="0,0,5,0"
Source="/Image/return_g.png" />
-
+
-
-
-
-
-
-
+
-
-
+
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index 1db03ed..a82d912 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -37,8 +37,7 @@
4
-
-
+ Image\favicon.ico
true
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 88f4298..106b68c 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -46,24 +46,23 @@
Height="18"
Margin="0,0,5,0"
Source="/Image/return_g.png" />
-
+
-
-
-
-
-
-
+
-
-
+
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml.cs b/Correlator/Dialog/CheckResponseDialog.xaml.cs
index c2aa94c..151e273 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml.cs
+++ b/Correlator/Dialog/CheckResponseDialog.xaml.cs
@@ -23,11 +23,33 @@
Interval = TimeSpan.FromSeconds(1)
};
+ private readonly DispatcherTimer _statusTimer = new DispatcherTimer
+ {
+ Interval = TimeSpan.FromSeconds(1)
+ };
+
+ private bool _isAllRight = true;
+
public CheckResponseDialog()
{
InitializeComponent();
- GoBackButton.Click += delegate { Close(); };
+ GoBackButton.Click += delegate
+ {
+ if (_redResponseTimer.IsEnabled || _blueResponseTimer.IsEnabled)
+ {
+ var boxResult = MessageBox.Show("数据未校验结束,确定要退出吗?", "温馨提示", MessageBoxButton.OKCancel,
+ MessageBoxImage.Error);
+ if (boxResult == MessageBoxResult.OK)
+ {
+ Close();
+ }
+ }
+ else
+ {
+ Close();
+ }
+ };
for (var i = 0; i < 60; i++)
{
@@ -98,6 +120,26 @@
}
}
};
+
+ _statusTimer.Tick += delegate
+ {
+ foreach (Ellipse child in RedResponsePanel.Children)
+ {
+ _isAllRight = child.Fill == new SolidColorBrush(Colors.LimeGreen);
+ }
+
+ foreach (Ellipse child in BlueResponsePanel.Children)
+ {
+ _isAllRight = child.Fill == new SolidColorBrush(Colors.LimeGreen);
+ }
+
+ if (_isAllRight)
+ {
+ _redResponseTimer.Stop();
+ _blueResponseTimer.Stop();
+ }
+ };
+ _statusTimer.Start();
}
private void CheckResponseDialog_OnLoaded(object sender, RoutedEventArgs e)
@@ -108,6 +150,7 @@
private void CheckResponseDialog_OnClosed(object sender, EventArgs e)
{
FlowStatus.IsShowing = false;
+ _statusTimer.Stop();
}
}
}
\ No newline at end of file
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index 1db03ed..a82d912 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -37,8 +37,7 @@
4
-
-
+ Image\favicon.ico
true
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 88f4298..106b68c 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -46,24 +46,23 @@
Height="18"
Margin="0,0,5,0"
Source="/Image/return_g.png" />
-
+
-
-
-
-
-
-
+
-
-
+
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml.cs b/Correlator/Dialog/CheckResponseDialog.xaml.cs
index c2aa94c..151e273 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml.cs
+++ b/Correlator/Dialog/CheckResponseDialog.xaml.cs
@@ -23,11 +23,33 @@
Interval = TimeSpan.FromSeconds(1)
};
+ private readonly DispatcherTimer _statusTimer = new DispatcherTimer
+ {
+ Interval = TimeSpan.FromSeconds(1)
+ };
+
+ private bool _isAllRight = true;
+
public CheckResponseDialog()
{
InitializeComponent();
- GoBackButton.Click += delegate { Close(); };
+ GoBackButton.Click += delegate
+ {
+ if (_redResponseTimer.IsEnabled || _blueResponseTimer.IsEnabled)
+ {
+ var boxResult = MessageBox.Show("数据未校验结束,确定要退出吗?", "温馨提示", MessageBoxButton.OKCancel,
+ MessageBoxImage.Error);
+ if (boxResult == MessageBoxResult.OK)
+ {
+ Close();
+ }
+ }
+ else
+ {
+ Close();
+ }
+ };
for (var i = 0; i < 60; i++)
{
@@ -98,6 +120,26 @@
}
}
};
+
+ _statusTimer.Tick += delegate
+ {
+ foreach (Ellipse child in RedResponsePanel.Children)
+ {
+ _isAllRight = child.Fill == new SolidColorBrush(Colors.LimeGreen);
+ }
+
+ foreach (Ellipse child in BlueResponsePanel.Children)
+ {
+ _isAllRight = child.Fill == new SolidColorBrush(Colors.LimeGreen);
+ }
+
+ if (_isAllRight)
+ {
+ _redResponseTimer.Stop();
+ _blueResponseTimer.Stop();
+ }
+ };
+ _statusTimer.Start();
}
private void CheckResponseDialog_OnLoaded(object sender, RoutedEventArgs e)
@@ -108,6 +150,7 @@
private void CheckResponseDialog_OnClosed(object sender, EventArgs e)
{
FlowStatus.IsShowing = false;
+ _statusTimer.Stop();
}
}
}
\ No newline at end of file
diff --git a/Correlator/Dialog/SoundSpeedDialog.xaml b/Correlator/Dialog/SoundSpeedDialog.xaml
index 385a68b..55f98c4 100644
--- a/Correlator/Dialog/SoundSpeedDialog.xaml
+++ b/Correlator/Dialog/SoundSpeedDialog.xaml
@@ -58,7 +58,10 @@
-
+
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index 1db03ed..a82d912 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -37,8 +37,7 @@
4
-
-
+ Image\favicon.ico
true
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 88f4298..106b68c 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -46,24 +46,23 @@
Height="18"
Margin="0,0,5,0"
Source="/Image/return_g.png" />
-
+
-
-
-
-
-
-
+
-
-
+
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml.cs b/Correlator/Dialog/CheckResponseDialog.xaml.cs
index c2aa94c..151e273 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml.cs
+++ b/Correlator/Dialog/CheckResponseDialog.xaml.cs
@@ -23,11 +23,33 @@
Interval = TimeSpan.FromSeconds(1)
};
+ private readonly DispatcherTimer _statusTimer = new DispatcherTimer
+ {
+ Interval = TimeSpan.FromSeconds(1)
+ };
+
+ private bool _isAllRight = true;
+
public CheckResponseDialog()
{
InitializeComponent();
- GoBackButton.Click += delegate { Close(); };
+ GoBackButton.Click += delegate
+ {
+ if (_redResponseTimer.IsEnabled || _blueResponseTimer.IsEnabled)
+ {
+ var boxResult = MessageBox.Show("数据未校验结束,确定要退出吗?", "温馨提示", MessageBoxButton.OKCancel,
+ MessageBoxImage.Error);
+ if (boxResult == MessageBoxResult.OK)
+ {
+ Close();
+ }
+ }
+ else
+ {
+ Close();
+ }
+ };
for (var i = 0; i < 60; i++)
{
@@ -98,6 +120,26 @@
}
}
};
+
+ _statusTimer.Tick += delegate
+ {
+ foreach (Ellipse child in RedResponsePanel.Children)
+ {
+ _isAllRight = child.Fill == new SolidColorBrush(Colors.LimeGreen);
+ }
+
+ foreach (Ellipse child in BlueResponsePanel.Children)
+ {
+ _isAllRight = child.Fill == new SolidColorBrush(Colors.LimeGreen);
+ }
+
+ if (_isAllRight)
+ {
+ _redResponseTimer.Stop();
+ _blueResponseTimer.Stop();
+ }
+ };
+ _statusTimer.Start();
}
private void CheckResponseDialog_OnLoaded(object sender, RoutedEventArgs e)
@@ -108,6 +150,7 @@
private void CheckResponseDialog_OnClosed(object sender, EventArgs e)
{
FlowStatus.IsShowing = false;
+ _statusTimer.Stop();
}
}
}
\ No newline at end of file
diff --git a/Correlator/Dialog/SoundSpeedDialog.xaml b/Correlator/Dialog/SoundSpeedDialog.xaml
index 385a68b..55f98c4 100644
--- a/Correlator/Dialog/SoundSpeedDialog.xaml
+++ b/Correlator/Dialog/SoundSpeedDialog.xaml
@@ -58,7 +58,10 @@
-
+
diff --git a/Correlator/Util/SerialPortManager.cs b/Correlator/Util/SerialPortManager.cs
index 248847f..82903d5 100644
--- a/Correlator/Util/SerialPortManager.cs
+++ b/Correlator/Util/SerialPortManager.cs
@@ -321,6 +321,14 @@
///
private void HandleHydrophoneData(string devCode, List tags)
{
+ if (DevCode.Dev1 == devCode)
+ {
+ }
+ else
+ {
+ }
+
+ Debug.WriteLine("SerialPortManager => " + devCode);
}
///
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index 1db03ed..a82d912 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -37,8 +37,7 @@
4
-
-
+ Image\favicon.ico
true
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 88f4298..106b68c 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -46,24 +46,23 @@
Height="18"
Margin="0,0,5,0"
Source="/Image/return_g.png" />
-
+
-
-
-
-
-
-
+
-
-
+
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml.cs b/Correlator/Dialog/CheckResponseDialog.xaml.cs
index c2aa94c..151e273 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml.cs
+++ b/Correlator/Dialog/CheckResponseDialog.xaml.cs
@@ -23,11 +23,33 @@
Interval = TimeSpan.FromSeconds(1)
};
+ private readonly DispatcherTimer _statusTimer = new DispatcherTimer
+ {
+ Interval = TimeSpan.FromSeconds(1)
+ };
+
+ private bool _isAllRight = true;
+
public CheckResponseDialog()
{
InitializeComponent();
- GoBackButton.Click += delegate { Close(); };
+ GoBackButton.Click += delegate
+ {
+ if (_redResponseTimer.IsEnabled || _blueResponseTimer.IsEnabled)
+ {
+ var boxResult = MessageBox.Show("数据未校验结束,确定要退出吗?", "温馨提示", MessageBoxButton.OKCancel,
+ MessageBoxImage.Error);
+ if (boxResult == MessageBoxResult.OK)
+ {
+ Close();
+ }
+ }
+ else
+ {
+ Close();
+ }
+ };
for (var i = 0; i < 60; i++)
{
@@ -98,6 +120,26 @@
}
}
};
+
+ _statusTimer.Tick += delegate
+ {
+ foreach (Ellipse child in RedResponsePanel.Children)
+ {
+ _isAllRight = child.Fill == new SolidColorBrush(Colors.LimeGreen);
+ }
+
+ foreach (Ellipse child in BlueResponsePanel.Children)
+ {
+ _isAllRight = child.Fill == new SolidColorBrush(Colors.LimeGreen);
+ }
+
+ if (_isAllRight)
+ {
+ _redResponseTimer.Stop();
+ _blueResponseTimer.Stop();
+ }
+ };
+ _statusTimer.Start();
}
private void CheckResponseDialog_OnLoaded(object sender, RoutedEventArgs e)
@@ -108,6 +150,7 @@
private void CheckResponseDialog_OnClosed(object sender, EventArgs e)
{
FlowStatus.IsShowing = false;
+ _statusTimer.Stop();
}
}
}
\ No newline at end of file
diff --git a/Correlator/Dialog/SoundSpeedDialog.xaml b/Correlator/Dialog/SoundSpeedDialog.xaml
index 385a68b..55f98c4 100644
--- a/Correlator/Dialog/SoundSpeedDialog.xaml
+++ b/Correlator/Dialog/SoundSpeedDialog.xaml
@@ -58,7 +58,10 @@
-
+
diff --git a/Correlator/Util/SerialPortManager.cs b/Correlator/Util/SerialPortManager.cs
index 248847f..82903d5 100644
--- a/Correlator/Util/SerialPortManager.cs
+++ b/Correlator/Util/SerialPortManager.cs
@@ -321,6 +321,14 @@
///
private void HandleHydrophoneData(string devCode, List tags)
{
+ if (DevCode.Dev1 == devCode)
+ {
+ }
+ else
+ {
+ }
+
+ Debug.WriteLine("SerialPortManager => " + devCode);
}
///
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
index 2ce6a03..736f37c 100644
--- a/Correlator/View/AudioFileWindow.xaml
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -45,7 +45,10 @@
-
+
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index 1db03ed..a82d912 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -37,8 +37,7 @@
4
-
-
+ Image\favicon.ico
true
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 88f4298..106b68c 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -46,24 +46,23 @@
Height="18"
Margin="0,0,5,0"
Source="/Image/return_g.png" />
-
+
-
-
-
-
-
-
+
-
-
+
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml.cs b/Correlator/Dialog/CheckResponseDialog.xaml.cs
index c2aa94c..151e273 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml.cs
+++ b/Correlator/Dialog/CheckResponseDialog.xaml.cs
@@ -23,11 +23,33 @@
Interval = TimeSpan.FromSeconds(1)
};
+ private readonly DispatcherTimer _statusTimer = new DispatcherTimer
+ {
+ Interval = TimeSpan.FromSeconds(1)
+ };
+
+ private bool _isAllRight = true;
+
public CheckResponseDialog()
{
InitializeComponent();
- GoBackButton.Click += delegate { Close(); };
+ GoBackButton.Click += delegate
+ {
+ if (_redResponseTimer.IsEnabled || _blueResponseTimer.IsEnabled)
+ {
+ var boxResult = MessageBox.Show("数据未校验结束,确定要退出吗?", "温馨提示", MessageBoxButton.OKCancel,
+ MessageBoxImage.Error);
+ if (boxResult == MessageBoxResult.OK)
+ {
+ Close();
+ }
+ }
+ else
+ {
+ Close();
+ }
+ };
for (var i = 0; i < 60; i++)
{
@@ -98,6 +120,26 @@
}
}
};
+
+ _statusTimer.Tick += delegate
+ {
+ foreach (Ellipse child in RedResponsePanel.Children)
+ {
+ _isAllRight = child.Fill == new SolidColorBrush(Colors.LimeGreen);
+ }
+
+ foreach (Ellipse child in BlueResponsePanel.Children)
+ {
+ _isAllRight = child.Fill == new SolidColorBrush(Colors.LimeGreen);
+ }
+
+ if (_isAllRight)
+ {
+ _redResponseTimer.Stop();
+ _blueResponseTimer.Stop();
+ }
+ };
+ _statusTimer.Start();
}
private void CheckResponseDialog_OnLoaded(object sender, RoutedEventArgs e)
@@ -108,6 +150,7 @@
private void CheckResponseDialog_OnClosed(object sender, EventArgs e)
{
FlowStatus.IsShowing = false;
+ _statusTimer.Stop();
}
}
}
\ No newline at end of file
diff --git a/Correlator/Dialog/SoundSpeedDialog.xaml b/Correlator/Dialog/SoundSpeedDialog.xaml
index 385a68b..55f98c4 100644
--- a/Correlator/Dialog/SoundSpeedDialog.xaml
+++ b/Correlator/Dialog/SoundSpeedDialog.xaml
@@ -58,7 +58,10 @@
-
+
diff --git a/Correlator/Util/SerialPortManager.cs b/Correlator/Util/SerialPortManager.cs
index 248847f..82903d5 100644
--- a/Correlator/Util/SerialPortManager.cs
+++ b/Correlator/Util/SerialPortManager.cs
@@ -321,6 +321,14 @@
///
private void HandleHydrophoneData(string devCode, List tags)
{
+ if (DevCode.Dev1 == devCode)
+ {
+ }
+ else
+ {
+ }
+
+ Debug.WriteLine("SerialPortManager => " + devCode);
}
///
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
index 2ce6a03..736f37c 100644
--- a/Correlator/View/AudioFileWindow.xaml
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -45,7 +45,10 @@
-
+
diff --git a/Correlator/View/PictureFileWindow.xaml b/Correlator/View/PictureFileWindow.xaml
index fb6085a..8aa0988 100644
--- a/Correlator/View/PictureFileWindow.xaml
+++ b/Correlator/View/PictureFileWindow.xaml
@@ -42,7 +42,10 @@
-
+