diff --git a/Correlator/App.xaml.cs b/Correlator/App.xaml.cs index cfb0428..84de221 100644 --- a/Correlator/App.xaml.cs +++ b/Correlator/App.xaml.cs @@ -57,6 +57,7 @@ containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); + containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); diff --git a/Correlator/App.xaml.cs b/Correlator/App.xaml.cs index cfb0428..84de221 100644 --- a/Correlator/App.xaml.cs +++ b/Correlator/App.xaml.cs @@ -57,6 +57,7 @@ containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); + containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 653b0a9..df30666 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -217,6 +217,9 @@ AlertMessageDialog.xaml + + ApplicationInfoDialog.xaml + CheckResponseDialog.xaml @@ -286,6 +289,7 @@ + @@ -312,6 +316,7 @@ + Designer MSBuild:Compile diff --git a/Correlator/App.xaml.cs b/Correlator/App.xaml.cs index cfb0428..84de221 100644 --- a/Correlator/App.xaml.cs +++ b/Correlator/App.xaml.cs @@ -57,6 +57,7 @@ containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); + containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 653b0a9..df30666 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -217,6 +217,9 @@ AlertMessageDialog.xaml + + ApplicationInfoDialog.xaml + CheckResponseDialog.xaml @@ -286,6 +289,7 @@ + @@ -312,6 +316,7 @@ + Designer MSBuild:Compile diff --git a/Correlator/Dialog/ApplicationInfoDialog.xaml b/Correlator/Dialog/ApplicationInfoDialog.xaml new file mode 100644 index 0000000..8af203e --- /dev/null +++ b/Correlator/Dialog/ApplicationInfoDialog.xaml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Correlator/App.xaml.cs b/Correlator/App.xaml.cs index cfb0428..84de221 100644 --- a/Correlator/App.xaml.cs +++ b/Correlator/App.xaml.cs @@ -57,6 +57,7 @@ containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); + containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 653b0a9..df30666 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -217,6 +217,9 @@ AlertMessageDialog.xaml + + ApplicationInfoDialog.xaml + CheckResponseDialog.xaml @@ -286,6 +289,7 @@ + @@ -312,6 +316,7 @@ + Designer MSBuild:Compile diff --git a/Correlator/Dialog/ApplicationInfoDialog.xaml b/Correlator/Dialog/ApplicationInfoDialog.xaml new file mode 100644 index 0000000..8af203e --- /dev/null +++ b/Correlator/Dialog/ApplicationInfoDialog.xaml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Correlator/Dialog/ApplicationInfoDialog.xaml.cs b/Correlator/Dialog/ApplicationInfoDialog.xaml.cs new file mode 100644 index 0000000..682cdd8 --- /dev/null +++ b/Correlator/Dialog/ApplicationInfoDialog.xaml.cs @@ -0,0 +1,12 @@ +using System.Windows.Controls; + +namespace Correlator.Dialog +{ + public partial class ApplicationInfoDialog : UserControl + { + public ApplicationInfoDialog() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/Correlator/App.xaml.cs b/Correlator/App.xaml.cs index cfb0428..84de221 100644 --- a/Correlator/App.xaml.cs +++ b/Correlator/App.xaml.cs @@ -57,6 +57,7 @@ containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); + containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 653b0a9..df30666 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -217,6 +217,9 @@ AlertMessageDialog.xaml + + ApplicationInfoDialog.xaml + CheckResponseDialog.xaml @@ -286,6 +289,7 @@ + @@ -312,6 +316,7 @@ + Designer MSBuild:Compile diff --git a/Correlator/Dialog/ApplicationInfoDialog.xaml b/Correlator/Dialog/ApplicationInfoDialog.xaml new file mode 100644 index 0000000..8af203e --- /dev/null +++ b/Correlator/Dialog/ApplicationInfoDialog.xaml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Correlator/Dialog/ApplicationInfoDialog.xaml.cs b/Correlator/Dialog/ApplicationInfoDialog.xaml.cs new file mode 100644 index 0000000..682cdd8 --- /dev/null +++ b/Correlator/Dialog/ApplicationInfoDialog.xaml.cs @@ -0,0 +1,12 @@ +using System.Windows.Controls; + +namespace Correlator.Dialog +{ + public partial class ApplicationInfoDialog : UserControl + { + public ApplicationInfoDialog() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/Correlator/ViewModels/ApplicationInfoDialogViewModel.cs b/Correlator/ViewModels/ApplicationInfoDialogViewModel.cs new file mode 100644 index 0000000..c7afc56 --- /dev/null +++ b/Correlator/ViewModels/ApplicationInfoDialogViewModel.cs @@ -0,0 +1,63 @@ +using System; +using System.Windows; +using Correlator.Util; +using Prism.Mvvm; +using Prism.Services.Dialogs; + +namespace Correlator.ViewModels +{ + public class ApplicationInfoDialogViewModel : BindableBase, IDialogAware + { + public string Title => "软件信息"; + public event Action RequestClose; + + #region VM + + private string _applicationVersion = "1.0.0"; + + public string ApplicationVersion + { + get => _applicationVersion; + private set + { + _applicationVersion = value; + RaisePropertyChanged(); + } + } + + private string _protocolVersion= "1.0"; + + public string ProtocolVersion + { + get => _protocolVersion; + private set + { + _protocolVersion = value; + RaisePropertyChanged(); + } + } + + #endregion + + public ApplicationInfoDialogViewModel() + { + //获取版本号 + ApplicationVersion = Application.ResourceAssembly.GetName().Version.ToString(); + + ProtocolVersion = RuntimeCache.ProtocolVersion; + } + + public bool CanCloseDialog() + { + return true; + } + + public void OnDialogClosed() + { + } + + public void OnDialogOpened(IDialogParameters parameters) + { + } + } +} \ No newline at end of file diff --git a/Correlator/App.xaml.cs b/Correlator/App.xaml.cs index cfb0428..84de221 100644 --- a/Correlator/App.xaml.cs +++ b/Correlator/App.xaml.cs @@ -57,6 +57,7 @@ containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); + containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 653b0a9..df30666 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -217,6 +217,9 @@ AlertMessageDialog.xaml + + ApplicationInfoDialog.xaml + CheckResponseDialog.xaml @@ -286,6 +289,7 @@ + @@ -312,6 +316,7 @@ + Designer MSBuild:Compile diff --git a/Correlator/Dialog/ApplicationInfoDialog.xaml b/Correlator/Dialog/ApplicationInfoDialog.xaml new file mode 100644 index 0000000..8af203e --- /dev/null +++ b/Correlator/Dialog/ApplicationInfoDialog.xaml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Correlator/Dialog/ApplicationInfoDialog.xaml.cs b/Correlator/Dialog/ApplicationInfoDialog.xaml.cs new file mode 100644 index 0000000..682cdd8 --- /dev/null +++ b/Correlator/Dialog/ApplicationInfoDialog.xaml.cs @@ -0,0 +1,12 @@ +using System.Windows.Controls; + +namespace Correlator.Dialog +{ + public partial class ApplicationInfoDialog : UserControl + { + public ApplicationInfoDialog() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/Correlator/ViewModels/ApplicationInfoDialogViewModel.cs b/Correlator/ViewModels/ApplicationInfoDialogViewModel.cs new file mode 100644 index 0000000..c7afc56 --- /dev/null +++ b/Correlator/ViewModels/ApplicationInfoDialogViewModel.cs @@ -0,0 +1,63 @@ +using System; +using System.Windows; +using Correlator.Util; +using Prism.Mvvm; +using Prism.Services.Dialogs; + +namespace Correlator.ViewModels +{ + public class ApplicationInfoDialogViewModel : BindableBase, IDialogAware + { + public string Title => "软件信息"; + public event Action RequestClose; + + #region VM + + private string _applicationVersion = "1.0.0"; + + public string ApplicationVersion + { + get => _applicationVersion; + private set + { + _applicationVersion = value; + RaisePropertyChanged(); + } + } + + private string _protocolVersion= "1.0"; + + public string ProtocolVersion + { + get => _protocolVersion; + private set + { + _protocolVersion = value; + RaisePropertyChanged(); + } + } + + #endregion + + public ApplicationInfoDialogViewModel() + { + //获取版本号 + ApplicationVersion = Application.ResourceAssembly.GetName().Version.ToString(); + + ProtocolVersion = RuntimeCache.ProtocolVersion; + } + + public bool CanCloseDialog() + { + return true; + } + + public void OnDialogClosed() + { + } + + public void OnDialogOpened(IDialogParameters parameters) + { + } + } +} \ No newline at end of file diff --git a/Correlator/ViewModels/MainWindowViewModel.cs b/Correlator/ViewModels/MainWindowViewModel.cs index 6233e59..e295fa2 100644 --- a/Correlator/ViewModels/MainWindowViewModel.cs +++ b/Correlator/ViewModels/MainWindowViewModel.cs @@ -419,18 +419,6 @@ } } - private string _applicationVersion = "Ver 1.0.0.0"; - - public string ApplicationVersion - { - get => _applicationVersion; - private set - { - _applicationVersion = value; - RaisePropertyChanged(); - } - } - private CorrelatorDataModel _correlatorData = new CorrelatorDataModel(); public CorrelatorDataModel CorrelatorData @@ -482,9 +470,6 @@ _dialogService = dialogService; _serialPortService = serialPortService; - //获取版本号 - ApplicationVersion = "Ver " + Application.ResourceAssembly.GetName().Version; - RegisterMessage(); TimerTick();