diff --git a/Correlator/Dialog/LoadingDialog.xaml b/Correlator/Dialog/LoadingDialog.xaml
index 47e5bdf..fb137a1 100644
--- a/Correlator/Dialog/LoadingDialog.xaml
+++ b/Correlator/Dialog/LoadingDialog.xaml
@@ -7,62 +7,30 @@
Title="相关仪"
Width="400"
Height="144"
- AllowsTransparency="True"
- Background="Transparent"
+ Background="White"
Closed="LoadingDialog_OnClosed"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
+
+
diff --git a/Correlator/Dialog/LoadingDialog.xaml b/Correlator/Dialog/LoadingDialog.xaml
index 47e5bdf..fb137a1 100644
--- a/Correlator/Dialog/LoadingDialog.xaml
+++ b/Correlator/Dialog/LoadingDialog.xaml
@@ -7,62 +7,30 @@
Title="相关仪"
Width="400"
Height="144"
- AllowsTransparency="True"
- Background="Transparent"
+ Background="White"
Closed="LoadingDialog_OnClosed"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
+
+
diff --git a/Correlator/Dialog/LoadingDialog.xaml.cs b/Correlator/Dialog/LoadingDialog.xaml.cs
index 63363b3..db1659f 100644
--- a/Correlator/Dialog/LoadingDialog.xaml.cs
+++ b/Correlator/Dialog/LoadingDialog.xaml.cs
@@ -1,6 +1,5 @@
using System;
using System.Windows;
-using System.Windows.Input;
using System.Windows.Threading;
namespace Correlator.Dialog
@@ -34,11 +33,5 @@
{
_runningTimer.Stop();
}
-
- protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
- {
- base.OnMouseLeftButtonDown(e);
- DragMove();
- }
}
}
\ No newline at end of file
diff --git a/Correlator/Dialog/LoadingDialog.xaml b/Correlator/Dialog/LoadingDialog.xaml
index 47e5bdf..fb137a1 100644
--- a/Correlator/Dialog/LoadingDialog.xaml
+++ b/Correlator/Dialog/LoadingDialog.xaml
@@ -7,62 +7,30 @@
Title="相关仪"
Width="400"
Height="144"
- AllowsTransparency="True"
- Background="Transparent"
+ Background="White"
Closed="LoadingDialog_OnClosed"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
+
+
diff --git a/Correlator/Dialog/LoadingDialog.xaml.cs b/Correlator/Dialog/LoadingDialog.xaml.cs
index 63363b3..db1659f 100644
--- a/Correlator/Dialog/LoadingDialog.xaml.cs
+++ b/Correlator/Dialog/LoadingDialog.xaml.cs
@@ -1,6 +1,5 @@
using System;
using System.Windows;
-using System.Windows.Input;
using System.Windows.Threading;
namespace Correlator.Dialog
@@ -34,11 +33,5 @@
{
_runningTimer.Stop();
}
-
- protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
- {
- base.OnMouseLeftButtonDown(e);
- DragMove();
- }
}
}
\ No newline at end of file
diff --git a/Correlator/Properties/AssemblyInfo.cs b/Correlator/Properties/AssemblyInfo.cs
index 7c66752..0c6d511 100644
--- a/Correlator/Properties/AssemblyInfo.cs
+++ b/Correlator/Properties/AssemblyInfo.cs
@@ -49,6 +49,6 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.3")]
-[assembly: AssemblyFileVersion("1.0.0.3")]
+[assembly: AssemblyVersion("1.0.0.4")]
+[assembly: AssemblyFileVersion("1.0.0.4")]
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
\ No newline at end of file
diff --git a/Correlator/Dialog/LoadingDialog.xaml b/Correlator/Dialog/LoadingDialog.xaml
index 47e5bdf..fb137a1 100644
--- a/Correlator/Dialog/LoadingDialog.xaml
+++ b/Correlator/Dialog/LoadingDialog.xaml
@@ -7,62 +7,30 @@
Title="相关仪"
Width="400"
Height="144"
- AllowsTransparency="True"
- Background="Transparent"
+ Background="White"
Closed="LoadingDialog_OnClosed"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
+
+
diff --git a/Correlator/Dialog/LoadingDialog.xaml.cs b/Correlator/Dialog/LoadingDialog.xaml.cs
index 63363b3..db1659f 100644
--- a/Correlator/Dialog/LoadingDialog.xaml.cs
+++ b/Correlator/Dialog/LoadingDialog.xaml.cs
@@ -1,6 +1,5 @@
using System;
using System.Windows;
-using System.Windows.Input;
using System.Windows.Threading;
namespace Correlator.Dialog
@@ -34,11 +33,5 @@
{
_runningTimer.Stop();
}
-
- protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
- {
- base.OnMouseLeftButtonDown(e);
- DragMove();
- }
}
}
\ No newline at end of file
diff --git a/Correlator/Properties/AssemblyInfo.cs b/Correlator/Properties/AssemblyInfo.cs
index 7c66752..0c6d511 100644
--- a/Correlator/Properties/AssemblyInfo.cs
+++ b/Correlator/Properties/AssemblyInfo.cs
@@ -49,6 +49,6 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.3")]
-[assembly: AssemblyFileVersion("1.0.0.3")]
+[assembly: AssemblyVersion("1.0.0.4")]
+[assembly: AssemblyFileVersion("1.0.0.4")]
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
\ No newline at end of file
diff --git a/Correlator/Util/MethodExtensions.cs b/Correlator/Util/MethodExtensions.cs
index 4641ce2..72fa7c3 100644
--- a/Correlator/Util/MethodExtensions.cs
+++ b/Correlator/Util/MethodExtensions.cs
@@ -6,6 +6,7 @@
using System.IO;
using System.Linq;
using System.Text;
+using System.Text.RegularExpressions;
using System.Windows.Forms;
using Correlator.Model;
using Correlator.SensorHubTag;
@@ -499,7 +500,7 @@
//其实就3个Tag,[CellTag,TimeTag,UploadTag]
return tags.Where(tag => tag is UploadTag).Cast().First();
}
-
+
///
/// 本地数据读取
///
@@ -528,5 +529,21 @@
{
return (count + RuntimeCache.PerPageItemCount - 1) / RuntimeCache.PerPageItemCount;
}
+
+ ///
+ /// 判断是否是数字
+ ///
+ ///
+ ///
+ public static bool IsNumber(this string value)
+ {
+ if (string.IsNullOrEmpty(value))
+ {
+ return false;
+ }
+
+ var regex = new Regex("^[0-9]*[1-9][0-9]*$");
+ return regex.IsMatch(value.Trim());
+ }
}
}
\ No newline at end of file
diff --git a/Correlator/Dialog/LoadingDialog.xaml b/Correlator/Dialog/LoadingDialog.xaml
index 47e5bdf..fb137a1 100644
--- a/Correlator/Dialog/LoadingDialog.xaml
+++ b/Correlator/Dialog/LoadingDialog.xaml
@@ -7,62 +7,30 @@
Title="相关仪"
Width="400"
Height="144"
- AllowsTransparency="True"
- Background="Transparent"
+ Background="White"
Closed="LoadingDialog_OnClosed"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
+
+
diff --git a/Correlator/Dialog/LoadingDialog.xaml.cs b/Correlator/Dialog/LoadingDialog.xaml.cs
index 63363b3..db1659f 100644
--- a/Correlator/Dialog/LoadingDialog.xaml.cs
+++ b/Correlator/Dialog/LoadingDialog.xaml.cs
@@ -1,6 +1,5 @@
using System;
using System.Windows;
-using System.Windows.Input;
using System.Windows.Threading;
namespace Correlator.Dialog
@@ -34,11 +33,5 @@
{
_runningTimer.Stop();
}
-
- protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
- {
- base.OnMouseLeftButtonDown(e);
- DragMove();
- }
}
}
\ No newline at end of file
diff --git a/Correlator/Properties/AssemblyInfo.cs b/Correlator/Properties/AssemblyInfo.cs
index 7c66752..0c6d511 100644
--- a/Correlator/Properties/AssemblyInfo.cs
+++ b/Correlator/Properties/AssemblyInfo.cs
@@ -49,6 +49,6 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.3")]
-[assembly: AssemblyFileVersion("1.0.0.3")]
+[assembly: AssemblyVersion("1.0.0.4")]
+[assembly: AssemblyFileVersion("1.0.0.4")]
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
\ No newline at end of file
diff --git a/Correlator/Util/MethodExtensions.cs b/Correlator/Util/MethodExtensions.cs
index 4641ce2..72fa7c3 100644
--- a/Correlator/Util/MethodExtensions.cs
+++ b/Correlator/Util/MethodExtensions.cs
@@ -6,6 +6,7 @@
using System.IO;
using System.Linq;
using System.Text;
+using System.Text.RegularExpressions;
using System.Windows.Forms;
using Correlator.Model;
using Correlator.SensorHubTag;
@@ -499,7 +500,7 @@
//其实就3个Tag,[CellTag,TimeTag,UploadTag]
return tags.Where(tag => tag is UploadTag).Cast().First();
}
-
+
///
/// 本地数据读取
///
@@ -528,5 +529,21 @@
{
return (count + RuntimeCache.PerPageItemCount - 1) / RuntimeCache.PerPageItemCount;
}
+
+ ///
+ /// 判断是否是数字
+ ///
+ ///
+ ///
+ public static bool IsNumber(this string value)
+ {
+ if (string.IsNullOrEmpty(value))
+ {
+ return false;
+ }
+
+ var regex = new Regex("^[0-9]*[1-9][0-9]*$");
+ return regex.IsMatch(value.Trim());
+ }
}
}
\ No newline at end of file
diff --git a/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs b/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs
index 3a33af4..5ef574e 100644
--- a/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs
+++ b/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs
@@ -73,9 +73,7 @@
if (string.IsNullOrEmpty(_minDiameter) || string.IsNullOrEmpty(_maxDiameter) ||
string.IsNullOrEmpty(_soundSpeed))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Warning }, { "Title", "温馨提示" }, { "Message", "不允许为空" }
},
@@ -86,9 +84,7 @@
if (!Regex.IsMatch(_minDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -99,9 +95,7 @@
if (!Regex.IsMatch(_maxDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -112,9 +106,7 @@
if (int.Parse(_minDiameter) > int.Parse(_maxDiameter))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径下限不能大于管径上限" }
},
@@ -125,9 +117,7 @@
if (!Regex.IsMatch(_soundSpeed, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "速度输入错误" }
},
diff --git a/Correlator/Dialog/LoadingDialog.xaml b/Correlator/Dialog/LoadingDialog.xaml
index 47e5bdf..fb137a1 100644
--- a/Correlator/Dialog/LoadingDialog.xaml
+++ b/Correlator/Dialog/LoadingDialog.xaml
@@ -7,62 +7,30 @@
Title="相关仪"
Width="400"
Height="144"
- AllowsTransparency="True"
- Background="Transparent"
+ Background="White"
Closed="LoadingDialog_OnClosed"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
+
+
diff --git a/Correlator/Dialog/LoadingDialog.xaml.cs b/Correlator/Dialog/LoadingDialog.xaml.cs
index 63363b3..db1659f 100644
--- a/Correlator/Dialog/LoadingDialog.xaml.cs
+++ b/Correlator/Dialog/LoadingDialog.xaml.cs
@@ -1,6 +1,5 @@
using System;
using System.Windows;
-using System.Windows.Input;
using System.Windows.Threading;
namespace Correlator.Dialog
@@ -34,11 +33,5 @@
{
_runningTimer.Stop();
}
-
- protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
- {
- base.OnMouseLeftButtonDown(e);
- DragMove();
- }
}
}
\ No newline at end of file
diff --git a/Correlator/Properties/AssemblyInfo.cs b/Correlator/Properties/AssemblyInfo.cs
index 7c66752..0c6d511 100644
--- a/Correlator/Properties/AssemblyInfo.cs
+++ b/Correlator/Properties/AssemblyInfo.cs
@@ -49,6 +49,6 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.3")]
-[assembly: AssemblyFileVersion("1.0.0.3")]
+[assembly: AssemblyVersion("1.0.0.4")]
+[assembly: AssemblyFileVersion("1.0.0.4")]
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
\ No newline at end of file
diff --git a/Correlator/Util/MethodExtensions.cs b/Correlator/Util/MethodExtensions.cs
index 4641ce2..72fa7c3 100644
--- a/Correlator/Util/MethodExtensions.cs
+++ b/Correlator/Util/MethodExtensions.cs
@@ -6,6 +6,7 @@
using System.IO;
using System.Linq;
using System.Text;
+using System.Text.RegularExpressions;
using System.Windows.Forms;
using Correlator.Model;
using Correlator.SensorHubTag;
@@ -499,7 +500,7 @@
//其实就3个Tag,[CellTag,TimeTag,UploadTag]
return tags.Where(tag => tag is UploadTag).Cast().First();
}
-
+
///
/// 本地数据读取
///
@@ -528,5 +529,21 @@
{
return (count + RuntimeCache.PerPageItemCount - 1) / RuntimeCache.PerPageItemCount;
}
+
+ ///
+ /// 判断是否是数字
+ ///
+ ///
+ ///
+ public static bool IsNumber(this string value)
+ {
+ if (string.IsNullOrEmpty(value))
+ {
+ return false;
+ }
+
+ var regex = new Regex("^[0-9]*[1-9][0-9]*$");
+ return regex.IsMatch(value.Trim());
+ }
}
}
\ No newline at end of file
diff --git a/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs b/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs
index 3a33af4..5ef574e 100644
--- a/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs
+++ b/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs
@@ -73,9 +73,7 @@
if (string.IsNullOrEmpty(_minDiameter) || string.IsNullOrEmpty(_maxDiameter) ||
string.IsNullOrEmpty(_soundSpeed))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Warning }, { "Title", "温馨提示" }, { "Message", "不允许为空" }
},
@@ -86,9 +84,7 @@
if (!Regex.IsMatch(_minDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -99,9 +95,7 @@
if (!Regex.IsMatch(_maxDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -112,9 +106,7 @@
if (int.Parse(_minDiameter) > int.Parse(_maxDiameter))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径下限不能大于管径上限" }
},
@@ -125,9 +117,7 @@
if (!Regex.IsMatch(_soundSpeed, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "速度输入错误" }
},
diff --git a/Correlator/ViewModels/EditSoundSpeedDialogViewModel.cs b/Correlator/ViewModels/EditSoundSpeedDialogViewModel.cs
index 9080227..e7cfb0c 100644
--- a/Correlator/ViewModels/EditSoundSpeedDialogViewModel.cs
+++ b/Correlator/ViewModels/EditSoundSpeedDialogViewModel.cs
@@ -74,9 +74,7 @@
if (string.IsNullOrEmpty(_minDiameter) || string.IsNullOrEmpty(_maxDiameter) ||
string.IsNullOrEmpty(_soundSpeed))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Warning }, { "Title", "温馨提示" }, { "Message", "不允许为空" }
},
@@ -87,9 +85,7 @@
if (!Regex.IsMatch(_minDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -100,9 +96,7 @@
if (!Regex.IsMatch(_maxDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -113,9 +107,7 @@
if (int.Parse(_minDiameter) > int.Parse(_maxDiameter))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径下限不能大于管径上限" }
},
@@ -126,9 +118,7 @@
if (!Regex.IsMatch(_soundSpeed, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "速度输入错误" }
},
diff --git a/Correlator/Dialog/LoadingDialog.xaml b/Correlator/Dialog/LoadingDialog.xaml
index 47e5bdf..fb137a1 100644
--- a/Correlator/Dialog/LoadingDialog.xaml
+++ b/Correlator/Dialog/LoadingDialog.xaml
@@ -7,62 +7,30 @@
Title="相关仪"
Width="400"
Height="144"
- AllowsTransparency="True"
- Background="Transparent"
+ Background="White"
Closed="LoadingDialog_OnClosed"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
+
+
diff --git a/Correlator/Dialog/LoadingDialog.xaml.cs b/Correlator/Dialog/LoadingDialog.xaml.cs
index 63363b3..db1659f 100644
--- a/Correlator/Dialog/LoadingDialog.xaml.cs
+++ b/Correlator/Dialog/LoadingDialog.xaml.cs
@@ -1,6 +1,5 @@
using System;
using System.Windows;
-using System.Windows.Input;
using System.Windows.Threading;
namespace Correlator.Dialog
@@ -34,11 +33,5 @@
{
_runningTimer.Stop();
}
-
- protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
- {
- base.OnMouseLeftButtonDown(e);
- DragMove();
- }
}
}
\ No newline at end of file
diff --git a/Correlator/Properties/AssemblyInfo.cs b/Correlator/Properties/AssemblyInfo.cs
index 7c66752..0c6d511 100644
--- a/Correlator/Properties/AssemblyInfo.cs
+++ b/Correlator/Properties/AssemblyInfo.cs
@@ -49,6 +49,6 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.3")]
-[assembly: AssemblyFileVersion("1.0.0.3")]
+[assembly: AssemblyVersion("1.0.0.4")]
+[assembly: AssemblyFileVersion("1.0.0.4")]
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
\ No newline at end of file
diff --git a/Correlator/Util/MethodExtensions.cs b/Correlator/Util/MethodExtensions.cs
index 4641ce2..72fa7c3 100644
--- a/Correlator/Util/MethodExtensions.cs
+++ b/Correlator/Util/MethodExtensions.cs
@@ -6,6 +6,7 @@
using System.IO;
using System.Linq;
using System.Text;
+using System.Text.RegularExpressions;
using System.Windows.Forms;
using Correlator.Model;
using Correlator.SensorHubTag;
@@ -499,7 +500,7 @@
//其实就3个Tag,[CellTag,TimeTag,UploadTag]
return tags.Where(tag => tag is UploadTag).Cast().First();
}
-
+
///
/// 本地数据读取
///
@@ -528,5 +529,21 @@
{
return (count + RuntimeCache.PerPageItemCount - 1) / RuntimeCache.PerPageItemCount;
}
+
+ ///
+ /// 判断是否是数字
+ ///
+ ///
+ ///
+ public static bool IsNumber(this string value)
+ {
+ if (string.IsNullOrEmpty(value))
+ {
+ return false;
+ }
+
+ var regex = new Regex("^[0-9]*[1-9][0-9]*$");
+ return regex.IsMatch(value.Trim());
+ }
}
}
\ No newline at end of file
diff --git a/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs b/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs
index 3a33af4..5ef574e 100644
--- a/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs
+++ b/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs
@@ -73,9 +73,7 @@
if (string.IsNullOrEmpty(_minDiameter) || string.IsNullOrEmpty(_maxDiameter) ||
string.IsNullOrEmpty(_soundSpeed))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Warning }, { "Title", "温馨提示" }, { "Message", "不允许为空" }
},
@@ -86,9 +84,7 @@
if (!Regex.IsMatch(_minDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -99,9 +95,7 @@
if (!Regex.IsMatch(_maxDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -112,9 +106,7 @@
if (int.Parse(_minDiameter) > int.Parse(_maxDiameter))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径下限不能大于管径上限" }
},
@@ -125,9 +117,7 @@
if (!Regex.IsMatch(_soundSpeed, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "速度输入错误" }
},
diff --git a/Correlator/ViewModels/EditSoundSpeedDialogViewModel.cs b/Correlator/ViewModels/EditSoundSpeedDialogViewModel.cs
index 9080227..e7cfb0c 100644
--- a/Correlator/ViewModels/EditSoundSpeedDialogViewModel.cs
+++ b/Correlator/ViewModels/EditSoundSpeedDialogViewModel.cs
@@ -74,9 +74,7 @@
if (string.IsNullOrEmpty(_minDiameter) || string.IsNullOrEmpty(_maxDiameter) ||
string.IsNullOrEmpty(_soundSpeed))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Warning }, { "Title", "温馨提示" }, { "Message", "不允许为空" }
},
@@ -87,9 +85,7 @@
if (!Regex.IsMatch(_minDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -100,9 +96,7 @@
if (!Regex.IsMatch(_maxDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -113,9 +107,7 @@
if (int.Parse(_minDiameter) > int.Parse(_maxDiameter))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径下限不能大于管径上限" }
},
@@ -126,9 +118,7 @@
if (!Regex.IsMatch(_soundSpeed, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "速度输入错误" }
},
diff --git a/Correlator/ViewModels/ImportResponseDialogViewModel.cs b/Correlator/ViewModels/ImportResponseDialogViewModel.cs
index 0162a21..a8a2b66 100644
--- a/Correlator/ViewModels/ImportResponseDialogViewModel.cs
+++ b/Correlator/ViewModels/ImportResponseDialogViewModel.cs
@@ -316,8 +316,7 @@
DetermineParamCommand = new DelegateCommand(delegate
{
- RequestClose?.Invoke(new DialogResult(
- ButtonResult.OK, new DialogParameters
+ RequestClose?.Invoke(new DialogResult(ButtonResult.OK, new DialogParameters
{
{ "ParamConfigModel", _configModel }
}
@@ -433,9 +432,7 @@
//测试是否转化成功
if (!data.Equals(BitConverter.ToString(bytes).Replace("-", "")))
{
- _dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ _dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Warning }, { "Title", "温馨提示" }, { "Message", "数据转化失败" }
},
diff --git a/Correlator/Dialog/LoadingDialog.xaml b/Correlator/Dialog/LoadingDialog.xaml
index 47e5bdf..fb137a1 100644
--- a/Correlator/Dialog/LoadingDialog.xaml
+++ b/Correlator/Dialog/LoadingDialog.xaml
@@ -7,62 +7,30 @@
Title="相关仪"
Width="400"
Height="144"
- AllowsTransparency="True"
- Background="Transparent"
+ Background="White"
Closed="LoadingDialog_OnClosed"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
+
+
diff --git a/Correlator/Dialog/LoadingDialog.xaml.cs b/Correlator/Dialog/LoadingDialog.xaml.cs
index 63363b3..db1659f 100644
--- a/Correlator/Dialog/LoadingDialog.xaml.cs
+++ b/Correlator/Dialog/LoadingDialog.xaml.cs
@@ -1,6 +1,5 @@
using System;
using System.Windows;
-using System.Windows.Input;
using System.Windows.Threading;
namespace Correlator.Dialog
@@ -34,11 +33,5 @@
{
_runningTimer.Stop();
}
-
- protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
- {
- base.OnMouseLeftButtonDown(e);
- DragMove();
- }
}
}
\ No newline at end of file
diff --git a/Correlator/Properties/AssemblyInfo.cs b/Correlator/Properties/AssemblyInfo.cs
index 7c66752..0c6d511 100644
--- a/Correlator/Properties/AssemblyInfo.cs
+++ b/Correlator/Properties/AssemblyInfo.cs
@@ -49,6 +49,6 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.3")]
-[assembly: AssemblyFileVersion("1.0.0.3")]
+[assembly: AssemblyVersion("1.0.0.4")]
+[assembly: AssemblyFileVersion("1.0.0.4")]
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
\ No newline at end of file
diff --git a/Correlator/Util/MethodExtensions.cs b/Correlator/Util/MethodExtensions.cs
index 4641ce2..72fa7c3 100644
--- a/Correlator/Util/MethodExtensions.cs
+++ b/Correlator/Util/MethodExtensions.cs
@@ -6,6 +6,7 @@
using System.IO;
using System.Linq;
using System.Text;
+using System.Text.RegularExpressions;
using System.Windows.Forms;
using Correlator.Model;
using Correlator.SensorHubTag;
@@ -499,7 +500,7 @@
//其实就3个Tag,[CellTag,TimeTag,UploadTag]
return tags.Where(tag => tag is UploadTag).Cast().First();
}
-
+
///
/// 本地数据读取
///
@@ -528,5 +529,21 @@
{
return (count + RuntimeCache.PerPageItemCount - 1) / RuntimeCache.PerPageItemCount;
}
+
+ ///
+ /// 判断是否是数字
+ ///
+ ///
+ ///
+ public static bool IsNumber(this string value)
+ {
+ if (string.IsNullOrEmpty(value))
+ {
+ return false;
+ }
+
+ var regex = new Regex("^[0-9]*[1-9][0-9]*$");
+ return regex.IsMatch(value.Trim());
+ }
}
}
\ No newline at end of file
diff --git a/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs b/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs
index 3a33af4..5ef574e 100644
--- a/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs
+++ b/Correlator/ViewModels/AddSoundSpeedDialogViewModel.cs
@@ -73,9 +73,7 @@
if (string.IsNullOrEmpty(_minDiameter) || string.IsNullOrEmpty(_maxDiameter) ||
string.IsNullOrEmpty(_soundSpeed))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Warning }, { "Title", "温馨提示" }, { "Message", "不允许为空" }
},
@@ -86,9 +84,7 @@
if (!Regex.IsMatch(_minDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -99,9 +95,7 @@
if (!Regex.IsMatch(_maxDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -112,9 +106,7 @@
if (int.Parse(_minDiameter) > int.Parse(_maxDiameter))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径下限不能大于管径上限" }
},
@@ -125,9 +117,7 @@
if (!Regex.IsMatch(_soundSpeed, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "速度输入错误" }
},
diff --git a/Correlator/ViewModels/EditSoundSpeedDialogViewModel.cs b/Correlator/ViewModels/EditSoundSpeedDialogViewModel.cs
index 9080227..e7cfb0c 100644
--- a/Correlator/ViewModels/EditSoundSpeedDialogViewModel.cs
+++ b/Correlator/ViewModels/EditSoundSpeedDialogViewModel.cs
@@ -74,9 +74,7 @@
if (string.IsNullOrEmpty(_minDiameter) || string.IsNullOrEmpty(_maxDiameter) ||
string.IsNullOrEmpty(_soundSpeed))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Warning }, { "Title", "温馨提示" }, { "Message", "不允许为空" }
},
@@ -87,9 +85,7 @@
if (!Regex.IsMatch(_minDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -100,9 +96,7 @@
if (!Regex.IsMatch(_maxDiameter, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径输入错误" }
},
@@ -113,9 +107,7 @@
if (int.Parse(_minDiameter) > int.Parse(_maxDiameter))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "管径下限不能大于管径上限" }
},
@@ -126,9 +118,7 @@
if (!Regex.IsMatch(_soundSpeed, "^(([1-9]\\d{0,3})|10000|0)$"))
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "速度输入错误" }
},
diff --git a/Correlator/ViewModels/ImportResponseDialogViewModel.cs b/Correlator/ViewModels/ImportResponseDialogViewModel.cs
index 0162a21..a8a2b66 100644
--- a/Correlator/ViewModels/ImportResponseDialogViewModel.cs
+++ b/Correlator/ViewModels/ImportResponseDialogViewModel.cs
@@ -316,8 +316,7 @@
DetermineParamCommand = new DelegateCommand(delegate
{
- RequestClose?.Invoke(new DialogResult(
- ButtonResult.OK, new DialogParameters
+ RequestClose?.Invoke(new DialogResult(ButtonResult.OK, new DialogParameters
{
{ "ParamConfigModel", _configModel }
}
@@ -433,9 +432,7 @@
//测试是否转化成功
if (!data.Equals(BitConverter.ToString(bytes).Replace("-", "")))
{
- _dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ _dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Warning }, { "Title", "温馨提示" }, { "Message", "数据转化失败" }
},
diff --git a/Correlator/ViewModels/SoundSpeedDialogViewModel.cs b/Correlator/ViewModels/SoundSpeedDialogViewModel.cs
index 1cc6cde..f927081 100644
--- a/Correlator/ViewModels/SoundSpeedDialogViewModel.cs
+++ b/Correlator/ViewModels/SoundSpeedDialogViewModel.cs
@@ -73,9 +73,7 @@
{
if (_materialVelocity == null)
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "未选择任何项,无法删除" }
},
@@ -84,9 +82,7 @@
return;
}
- dialogService.ShowDialog(
- "AlertControlDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertControlDialog", new DialogParameters
{
{ "AlertType", AlertType.Warning }, { "Title", "温馨提示" }, { "Message", "是否删除?删除后无法恢复" }
},
@@ -105,9 +101,10 @@
AddSpeedCommand = new DelegateCommand(delegate
{
- dialogService.ShowDialog(
- "AddSoundSpeedDialog",
- new DialogParameters { { "MaterialName", _materialName } },
+ dialogService.ShowDialog("AddSoundSpeedDialog", new DialogParameters
+ {
+ { "MaterialName", _materialName }
+ },
delegate { VelocityCollection = dataService.GetVelocityCollection(_materialName); }
);
});
@@ -116,9 +113,7 @@
{
if (_materialVelocity == null)
{
- dialogService.ShowDialog(
- "AlertMessageDialog",
- new DialogParameters
+ dialogService.ShowDialog("AlertMessageDialog", new DialogParameters
{
{ "AlertType", AlertType.Error }, { "Title", "温馨提示" }, { "Message", "未选择任何项,无法编辑" }
},
@@ -127,9 +122,10 @@
return;
}
- dialogService.ShowDialog(
- "EditSoundSpeedDialog",
- new DialogParameters { { "MaterialVelocity", _materialVelocity } },
+ dialogService.ShowDialog("EditSoundSpeedDialog", new DialogParameters
+ {
+ { "MaterialVelocity", _materialVelocity }
+ },
delegate { VelocityCollection = dataService.GetVelocityCollection(_materialName); }
);
});