From 3bdfc7ff5b0a0f3d5374643b245ad79757c745e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=82=E6=84=8F=20=E5=BD=AD?= <2417589739@qq.com> Date: Thu, 30 Mar 2023 11:23:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BC=94=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BPASmart.ConfigurationSoftware.csproj | 2 +- BPASmart.PageLoad/BPASmart.PageLoad.csproj | 2 +- BPASmart.Server/BPASmart.Server.csproj | 2 +- .../BPASmart.VariableManager.csproj | 2 +- .../BPASmartClient.Business.csproj | 2 +- .../BPASmartClient.CustomResource.csproj | 2 +- .../Pages/Model/MessageNotify.cs | 62 ++++++++------ .../BPASmartClient.DosingSystemSingle.csproj | 2 +- .../BPASmartClient.SmallBatchingSystem.csproj | 2 +- BPASmartClient.Update/App.xaml | 8 ++ BPASmartClient.Update/App.xaml.cs | 17 ++++ BPASmartClient.Update/AssemblyInfo.cs | 10 +++ .../BPASmartClient.Update.csproj | 14 +++ BPASmartClient.Update/MainViewsModel.cs | 21 +++++ BPASmartClient.Update/MainWindow.xaml | 68 +++++++++++++++ BPASmartClient.Update/MainWindow.xaml.cs | 85 +++++++++++++++++++ BPASmartClient.Update/Models/UpdateModel.cs | 41 +++++++++ BPASmartClient/App.config | 8 +- ComputerTestDemo/ComputerTestDemo.csproj | 2 +- DosingSystem/App.xaml.cs | 27 +++++- .../BPASmartClient.DosingSystem.csproj | 3 +- DosingSystem/Model/DeviceInquire.cs | 17 ++-- DosingSystem/View/DeviceMaterialParView.xaml | 3 +- SmartClient.sln | 23 +++++ 24 files changed, 371 insertions(+), 54 deletions(-) create mode 100644 BPASmartClient.Update/App.xaml create mode 100644 BPASmartClient.Update/App.xaml.cs create mode 100644 BPASmartClient.Update/AssemblyInfo.cs create mode 100644 BPASmartClient.Update/BPASmartClient.Update.csproj create mode 100644 BPASmartClient.Update/MainViewsModel.cs create mode 100644 BPASmartClient.Update/MainWindow.xaml create mode 100644 BPASmartClient.Update/MainWindow.xaml.cs create mode 100644 BPASmartClient.Update/Models/UpdateModel.cs diff --git a/BPASmart.ConfigurationSoftware/BPASmart.ConfigurationSoftware.csproj b/BPASmart.ConfigurationSoftware/BPASmart.ConfigurationSoftware.csproj index 190af161..f442881c 100644 --- a/BPASmart.ConfigurationSoftware/BPASmart.ConfigurationSoftware.csproj +++ b/BPASmart.ConfigurationSoftware/BPASmart.ConfigurationSoftware.csproj @@ -20,7 +20,7 @@ - + diff --git a/BPASmart.PageLoad/BPASmart.PageLoad.csproj b/BPASmart.PageLoad/BPASmart.PageLoad.csproj index 729ab884..53196873 100644 --- a/BPASmart.PageLoad/BPASmart.PageLoad.csproj +++ b/BPASmart.PageLoad/BPASmart.PageLoad.csproj @@ -8,7 +8,7 @@ - + diff --git a/BPASmart.Server/BPASmart.Server.csproj b/BPASmart.Server/BPASmart.Server.csproj index ce7c3363..c47c5a34 100644 --- a/BPASmart.Server/BPASmart.Server.csproj +++ b/BPASmart.Server/BPASmart.Server.csproj @@ -9,7 +9,7 @@ - + diff --git a/BPASmart.VariableManager/BPASmart.VariableManager.csproj b/BPASmart.VariableManager/BPASmart.VariableManager.csproj index c633d45b..caac5a94 100644 --- a/BPASmart.VariableManager/BPASmart.VariableManager.csproj +++ b/BPASmart.VariableManager/BPASmart.VariableManager.csproj @@ -30,7 +30,7 @@ - + diff --git a/BPASmartClient.Business/BPASmartClient.Business.csproj b/BPASmartClient.Business/BPASmartClient.Business.csproj index 25dfbd1c..0d77ddd4 100644 --- a/BPASmartClient.Business/BPASmartClient.Business.csproj +++ b/BPASmartClient.Business/BPASmartClient.Business.csproj @@ -8,7 +8,7 @@ - + diff --git a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj index 609d0a2a..86047719 100644 --- a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj +++ b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj @@ -409,7 +409,7 @@ - + diff --git a/BPASmartClient.CustomResource/Pages/Model/MessageNotify.cs b/BPASmartClient.CustomResource/Pages/Model/MessageNotify.cs index f0688f09..4e15c59e 100644 --- a/BPASmartClient.CustomResource/Pages/Model/MessageNotify.cs +++ b/BPASmartClient.CustomResource/Pages/Model/MessageNotify.cs @@ -81,7 +81,7 @@ namespace BPASmartClient.CustomResource.Pages.Model catch (Exception) { - // throw; + // throw; } } } @@ -109,34 +109,40 @@ namespace BPASmartClient.CustomResource.Pages.Model public bool ShowDialog(string info, DialogType dialogType = DialogType.Information) { - PromptView PV = new PromptView(); - PV.TextBlockInfo = info; - switch (dialogType) + bool result = false; + Application.Current.Dispatcher.Invoke(() => { - case DialogType.Warning: - PV.TextBlockIcon = ""; - PV.TextBlockForeground = Brushes.Yellow; - PV.infoType.Text = "警告:"; - //PV.Cancel.Visibility = Visibility.Collapsed; - break; - case DialogType.Error: - PV.TextBlockIcon = ""; - PV.TextBlockForeground = Brushes.Red; - PV.infoType.Text = "错误:"; - //PV.Cancel.Visibility = Visibility.Collapsed; - break; - case DialogType.Information: - PV.TextBlockIcon = ""; - PV.TextBlockForeground = Brushes.DeepSkyBlue; - PV.infoType.Text = "提示:"; - //PV.Cancel.Visibility = Visibility.Visible; - break; - default: - break; - } - PV.infoType.Foreground = PV.TextBlockForeground; - var res = PV.ShowDialog(); - return res == null ? false : (bool)res; + PromptView PV = new PromptView(); + PV.TextBlockInfo = info; + switch (dialogType) + { + case DialogType.Warning: + PV.TextBlockIcon = ""; + PV.TextBlockForeground = Brushes.Yellow; + PV.infoType.Text = "警告:"; + //PV.Cancel.Visibility = Visibility.Collapsed; + break; + case DialogType.Error: + PV.TextBlockIcon = ""; + PV.TextBlockForeground = Brushes.Red; + PV.infoType.Text = "错误:"; + //PV.Cancel.Visibility = Visibility.Collapsed; + break; + case DialogType.Information: + PV.TextBlockIcon = ""; + PV.TextBlockForeground = Brushes.DeepSkyBlue; + PV.infoType.Text = "提示:"; + //PV.Cancel.Visibility = Visibility.Visible; + break; + default: + break; + } + PV.infoType.Foreground = PV.TextBlockForeground; + + var res = PV.ShowDialog(); + result = res == null ? false : (bool)res; + }); + return result; } } diff --git a/BPASmartClient.DosingSystemSingle/BPASmartClient.DosingSystemSingle.csproj b/BPASmartClient.DosingSystemSingle/BPASmartClient.DosingSystemSingle.csproj index 46d83b78..472a4704 100644 --- a/BPASmartClient.DosingSystemSingle/BPASmartClient.DosingSystemSingle.csproj +++ b/BPASmartClient.DosingSystemSingle/BPASmartClient.DosingSystemSingle.csproj @@ -16,7 +16,7 @@ - + diff --git a/BPASmartClient.SmallBatchingSystem/BPASmartClient.SmallBatchingSystem.csproj b/BPASmartClient.SmallBatchingSystem/BPASmartClient.SmallBatchingSystem.csproj index 00d07de3..3a434956 100644 --- a/BPASmartClient.SmallBatchingSystem/BPASmartClient.SmallBatchingSystem.csproj +++ b/BPASmartClient.SmallBatchingSystem/BPASmartClient.SmallBatchingSystem.csproj @@ -22,7 +22,7 @@ - + diff --git a/BPASmartClient.Update/App.xaml b/BPASmartClient.Update/App.xaml new file mode 100644 index 00000000..ef55777f --- /dev/null +++ b/BPASmartClient.Update/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/BPASmartClient.Update/App.xaml.cs b/BPASmartClient.Update/App.xaml.cs new file mode 100644 index 00000000..d59b4ae7 --- /dev/null +++ b/BPASmartClient.Update/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace BPASmartClient.Update +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/BPASmartClient.Update/AssemblyInfo.cs b/BPASmartClient.Update/AssemblyInfo.cs new file mode 100644 index 00000000..8b5504ec --- /dev/null +++ b/BPASmartClient.Update/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/BPASmartClient.Update/BPASmartClient.Update.csproj b/BPASmartClient.Update/BPASmartClient.Update.csproj new file mode 100644 index 00000000..01761f98 --- /dev/null +++ b/BPASmartClient.Update/BPASmartClient.Update.csproj @@ -0,0 +1,14 @@ + + + + WinExe + net6.0-windows + enable + true + + + + + + + diff --git a/BPASmartClient.Update/MainViewsModel.cs b/BPASmartClient.Update/MainViewsModel.cs new file mode 100644 index 00000000..a4c464ce --- /dev/null +++ b/BPASmartClient.Update/MainViewsModel.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using BPA.Helper; +using BPASmartClient.Update.Model; + +namespace BPASmartClient.Update +{ + public class MainViewsModel : NotifyBase + { + public MainViewsModel() + { + + } + public UpdateModel um { get { return _mum; } set { _mum = value; OnPropertyChanged(); } } + private UpdateModel _mum = new UpdateModel(); + + } +} diff --git a/BPASmartClient.Update/MainWindow.xaml b/BPASmartClient.Update/MainWindow.xaml new file mode 100644 index 00000000..004b2e85 --- /dev/null +++ b/BPASmartClient.Update/MainWindow.xaml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +