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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +