@@ -20,7 +20,7 @@ | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.54" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -8,7 +8,7 @@ | |||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.54" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -9,7 +9,7 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Communication" Version="1.0.36" /> | <PackageReference Include="BPA.Communication" Version="1.0.36" /> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.54" /> | |||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.9" /> | <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.9" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -30,7 +30,7 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Communication" Version="1.0.36" /> | <PackageReference Include="BPA.Communication" Version="1.0.36" /> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.54" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -8,7 +8,7 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.ApolloClient" Version="1.0.12" /> | <PackageReference Include="BPA.ApolloClient" Version="1.0.12" /> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.33" /> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.54" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.86" /> | <PackageReference Include="BPA.Message" Version="1.0.86" /> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" /> | <PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" /> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" /> | ||||
@@ -409,7 +409,7 @@ | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.54" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.86" /> | <PackageReference Include="BPA.Message" Version="1.0.86" /> | ||||
<PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="4.11.0" /> | <PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="4.11.0" /> | ||||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | <PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | ||||
@@ -81,7 +81,7 @@ namespace BPASmartClient.CustomResource.Pages.Model | |||||
catch (Exception) | catch (Exception) | ||||
{ | { | ||||
// throw; | |||||
// throw; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -109,34 +109,40 @@ namespace BPASmartClient.CustomResource.Pages.Model | |||||
public bool ShowDialog(string info, DialogType dialogType = DialogType.Information) | 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; | |||||
} | } | ||||
} | } | ||||
@@ -16,7 +16,7 @@ | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.33" /> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.54" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.86" /> | <PackageReference Include="BPA.Message" Version="1.0.86" /> | ||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -22,7 +22,7 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Communication" Version="1.0.36" /> | <PackageReference Include="BPA.Communication" Version="1.0.36" /> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.54" /> | |||||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | <PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -0,0 +1,8 @@ | |||||
<Application | |||||
x:Class="BPASmartClient.Update.App" | |||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||||
xmlns:local="clr-namespace:BPASmartClient.Update" | |||||
StartupUri="MainWindow.xaml"> | |||||
<Application.Resources /> | |||||
</Application> |
@@ -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 | |||||
{ | |||||
/// <summary> | |||||
/// Interaction logic for App.xaml | |||||
/// </summary> | |||||
public partial class App : Application | |||||
{ | |||||
} | |||||
} |
@@ -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) | |||||
)] |
@@ -0,0 +1,14 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | |||||
<PropertyGroup> | |||||
<OutputType>WinExe</OutputType> | |||||
<TargetFramework>net6.0-windows</TargetFramework> | |||||
<Nullable>enable</Nullable> | |||||
<UseWPF>true</UseWPF> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.54" /> | |||||
</ItemGroup> | |||||
</Project> |
@@ -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(); | |||||
} | |||||
} |
@@ -0,0 +1,68 @@ | |||||
<Window | |||||
x:Class="BPASmartClient.Update.MainWindow" | |||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |||||
xmlns:local="clr-namespace:BPASmartClient.Update" | |||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |||||
Title="Update" | |||||
Width="600" | |||||
Height="400" | |||||
mc:Ignorable="d"> | |||||
<Window.DataContext> | |||||
<local:MainViewsModel /> | |||||
</Window.DataContext> | |||||
<Grid Margin="20"> | |||||
<Grid.RowDefinitions> | |||||
<RowDefinition Height="40" /> | |||||
<RowDefinition Height="40" /> | |||||
<RowDefinition /> | |||||
<RowDefinition Height="80"/> | |||||
<RowDefinition Height="40" /> | |||||
</Grid.RowDefinitions> | |||||
<TextBlock Grid.Row="0" Text="{Binding um.Version, StringFormat=当前软件版本号:\{0\}}" /> | |||||
<TextBlock Grid.Row="1" Text="{Binding um.UpgradeVersion, StringFormat=更新软件版本号:\{0\}}" /> | |||||
<TextBlock | |||||
Grid.Row="2" | |||||
Text="{Binding um.UpdateDescription}" | |||||
TextWrapping="Wrap" /> | |||||
<Grid Name="grProgressbar" Margin="0 0 0 20" Grid.Row="3"> | |||||
<Grid.RowDefinitions> | |||||
<RowDefinition/> | |||||
<RowDefinition/> | |||||
</Grid.RowDefinitions> | |||||
<TextBlock Name="tb" Text="当前更新进度:1/4" VerticalAlignment="Bottom"/> | |||||
<ProgressBar Name="progressbar" Grid.Row="1" Height="15" VerticalAlignment="Center" Minimum="0" Maximum="100" Value="10"/> | |||||
</Grid> | |||||
<Grid Grid.Row="4"> | |||||
<Grid.ColumnDefinitions> | |||||
<ColumnDefinition /> | |||||
<ColumnDefinition /> | |||||
</Grid.ColumnDefinitions> | |||||
<Button | |||||
Name="cancel" | |||||
Grid.Column="0" | |||||
Width="100" | |||||
Background="DeepSkyBlue" | |||||
Click="cancel_Click" | |||||
BorderThickness="0" | |||||
Content="取消更新" | |||||
Foreground="#272727" /> | |||||
<Button | |||||
Name="ok" | |||||
Grid.Column="1" | |||||
Width="100" | |||||
Click="ok_Click" | |||||
Background="DeepSkyBlue" | |||||
BorderThickness="0" | |||||
Content="开始更新" | |||||
Foreground="#272727" /> | |||||
</Grid> | |||||
</Grid> | |||||
</Window> |
@@ -0,0 +1,85 @@ | |||||
using BPA.Helper; | |||||
using BPASmartClient.Update.Model; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Diagnostics; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading; | |||||
using System.Threading.Tasks; | |||||
using System.Windows; | |||||
using System.Windows.Controls; | |||||
using System.Windows.Data; | |||||
using System.Windows.Documents; | |||||
using System.Windows.Input; | |||||
using System.Windows.Media; | |||||
using System.Windows.Media.Imaging; | |||||
using System.Windows.Navigation; | |||||
using System.Windows.Shapes; | |||||
namespace BPASmartClient.Update | |||||
{ | |||||
/// <summary> | |||||
/// Interaction logic for MainWindow.xaml | |||||
/// </summary> | |||||
public partial class MainWindow : Window | |||||
{ | |||||
public MainWindow() | |||||
{ | |||||
InitializeComponent(); | |||||
this.grProgressbar.Visibility = Visibility.Collapsed; | |||||
} | |||||
private void cancel_Click(object sender, RoutedEventArgs e) | |||||
{ | |||||
this.Close(); | |||||
} | |||||
private async void ok_Click(object sender, RoutedEventArgs e) | |||||
{ | |||||
this.cancel.Visibility = Visibility.Collapsed; | |||||
this.grProgressbar.Visibility = Visibility.Visible; | |||||
await Task.Run(() => | |||||
{ | |||||
App.Current.Dispatcher.Invoke(() => | |||||
{ | |||||
this.progressbar.Value = 25; | |||||
this.tb.Text = "当前更新进度:1/4"; | |||||
}); | |||||
Thread.Sleep(2000); | |||||
App.Current.Dispatcher.Invoke(() => | |||||
{ | |||||
this.progressbar.Value = 50; | |||||
this.tb.Text = "当前更新进度:2/4"; | |||||
}); | |||||
Thread.Sleep(1500); | |||||
App.Current.Dispatcher.Invoke(() => | |||||
{ | |||||
this.progressbar.Value = 75; | |||||
this.tb.Text = "当前更新进度:3/4"; | |||||
}); | |||||
Thread.Sleep(3000); | |||||
App.Current.Dispatcher.Invoke(() => | |||||
{ | |||||
this.progressbar.Value = 100; | |||||
this.tb.Text = "当前更新进度:4/4"; | |||||
}); | |||||
Thread.Sleep(1500); | |||||
App.Current.Dispatcher.Invoke(() => | |||||
{ | |||||
this.progressbar.Value = 100; | |||||
this.tb.Text = "当前更新进度:更新完成"; | |||||
}); | |||||
Thread.Sleep(1500); | |||||
}); | |||||
string directory = AppDomain.CurrentDomain.BaseDirectory; | |||||
Process.Start($"{directory}BPASmartClient.DosingSystem.exe"); | |||||
Json<UpdateModel>.Save(); | |||||
this.Close(); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,41 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
using BPA.Helper; | |||||
namespace BPASmartClient.Update.Model | |||||
{ | |||||
public class UpdateModel : NotifyBase | |||||
{ | |||||
/// <summary> | |||||
/// 软件名称 | |||||
/// </summary> | |||||
public string Name { get { return _mName; } set { _mName = value; OnPropertyChanged(); } } | |||||
private string _mName = "味魔方管理系统软件[简称:味魔方] "; | |||||
/// <summary> | |||||
/// 软件当前版本号 | |||||
/// </summary> | |||||
public string Version { get { return _mVersion; } set { _mVersion = value; OnPropertyChanged(); } } | |||||
private string _mVersion = "V1.0.1"; | |||||
/// <summary> | |||||
/// 软件升级版本号 | |||||
/// </summary> | |||||
public string UpgradeVersion { get { return _mUpgradeVersion; } set { _mUpgradeVersion = value; OnPropertyChanged(); } } | |||||
private string _mUpgradeVersion = "V1.0.2"; | |||||
/// <summary> | |||||
/// 软件更新说明 | |||||
/// </summary> | |||||
public string UpdateDescription { get { return _mUpdateDescription; } set { _mUpdateDescription = value; OnPropertyChanged(); } } | |||||
private string _mUpdateDescription = "下列 Bug 问题已修复:\n1、当在某些语言环境中保存文档后重新打开时,Canvas的缩放级别与文件保存时不同。\n2、删除样本数据后执行“另存为”时,有时无法使用串行打印机打印。\n3、如果显示放大率设置为100%以外的值,有时仅部分显示最小化、最大化和关闭按钮。\n4、其他小Bug。"; | |||||
} | |||||
} |
@@ -7,9 +7,9 @@ | |||||
<add key="IsEnableTest" value="false"/> | <add key="IsEnableTest" value="false"/> | ||||
<!--测试环境--> | <!--测试环境--> | ||||
<!--<add key="apollouri" value="http://10.2.1.21:28080/"/> | |||||
<add key="apollouri" value="http://10.2.1.21:28080/"/> | |||||
<add key="AppId" value="test1_HostComputer"/> | <add key="AppId" value="test1_HostComputer"/> | ||||
<add key ="Namespaces" value="DEV.test1.Config"/>--> | |||||
<add key ="Namespaces" value="DEV.test1.Config"/> | |||||
<!--开发环境--> | <!--开发环境--> | ||||
<!--<add key="apollouri" value="http://10.2.1.21:28080/"/> | <!--<add key="apollouri" value="http://10.2.1.21:28080/"/> | ||||
@@ -17,9 +17,9 @@ | |||||
<add key ="Namespaces" value="DEV.Config"/>--> | <add key ="Namespaces" value="DEV.Config"/>--> | ||||
<!--正式环境--> | <!--正式环境--> | ||||
<add key="apollouri" value="http://47.108.65.220:28080/"/> | |||||
<!--<add key="apollouri" value="http://47.108.65.220:28080/"/> | |||||
<add key="appid" value="hostcomputer"/> | <add key="appid" value="hostcomputer"/> | ||||
<add key ="namespaces" value="test1.config"/> | |||||
<add key ="namespaces" value="test1.config"/>--> | |||||
<!--阿里云上报启动方式:API 或者 LOCAL--> | <!--阿里云上报启动方式:API 或者 LOCAL--> | ||||
<!--API :通过客户端ID,调用接口查询“设备连接信息”--> | <!--API :通过客户端ID,调用接口查询“设备连接信息”--> | ||||
@@ -10,7 +10,7 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Communication" Version="1.0.36" /> | <PackageReference Include="BPA.Communication" Version="1.0.36" /> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.54" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -13,6 +13,10 @@ using BPASmartClient.CustomResource.Pages.View; | |||||
using BPASmartClient.CustomResource.Pages.ViewModel; | using BPASmartClient.CustomResource.Pages.ViewModel; | ||||
using BPASmartClient.DosingSystem.View; | using BPASmartClient.DosingSystem.View; | ||||
using BPA.Helper; | using BPA.Helper; | ||||
using BPASmartClient.DosingSystem.Model; | |||||
using System.Diagnostics; | |||||
using System.IO; | |||||
using BPASmartClient.Update.Model; | |||||
namespace BPASmartClient.DosingSystem | namespace BPASmartClient.DosingSystem | ||||
{ | { | ||||
@@ -40,11 +44,32 @@ namespace BPASmartClient.DosingSystem | |||||
DataInit(); | DataInit(); | ||||
DeviceInquire.GetInstance.Init();//配料机设备上线监听,设备列表初始化 | DeviceInquire.GetInstance.Init();//配料机设备上线监听,设备列表初始化 | ||||
MainView mv = new MainView(); | MainView mv = new MainView(); | ||||
mv.TitleName = "味魔方管理系统软件[简称:味魔方] 1.0.1"; | |||||
mv.TitleName = $"味魔方管理系统软件[简称:味魔方] V1.0.1"; | |||||
LoginView lv = new LoginView(); | LoginView lv = new LoginView(); | ||||
var res = lv.ShowDialog(); | var res = lv.ShowDialog(); | ||||
if (res != null && res == true) | if (res != null && res == true) | ||||
{ | { | ||||
#region 更新测试 | |||||
//string directory = $"{AppDomain.CurrentDomain.BaseDirectory}AccessFile\\JSON\\UpdateModel.json"; | |||||
//if (File.Exists(directory)) | |||||
// mv.TitleName = $"味魔方管理系统软件[简称:味魔方] {Json<UpdateModel>.Data.UpgradeVersion}"; | |||||
//else | |||||
//{ | |||||
// mv.TitleName = $"味魔方管理系统软件[简称:味魔方] V1.0.1"; | |||||
// Task.Run(() => | |||||
// { | |||||
// Thread.Sleep(3000); | |||||
// var tt = MessageNotify.GetInstance.ShowDialog("检测到新版本,请问是否现在更新?", DialogType.Information); | |||||
// if (tt) | |||||
// { | |||||
// string directory = AppDomain.CurrentDomain.BaseDirectory; | |||||
// Process.Start($"{directory}BPASmartClient.Update.exe"); | |||||
// App.Current.Dispatcher.Invoke(() => { mv.Close(); }); | |||||
// } | |||||
// }); | |||||
//} | |||||
#endregion | |||||
BPASmartClient.CustomResource.Pages.Model.MessageNotify.GetInstance.ShowUserLog("用户登录"); | BPASmartClient.CustomResource.Pages.Model.MessageNotify.GetInstance.ShowUserLog("用户登录"); | ||||
mv.Show(); | mv.Show(); | ||||
} | } | ||||
@@ -21,7 +21,7 @@ | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.54" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.86" /> | <PackageReference Include="BPA.Message" Version="1.0.86" /> | ||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -30,6 +30,7 @@ | |||||
<ProjectReference Include="..\BPASmartClient.CustomResource\BPASmartClient.CustomResource.csproj" /> | <ProjectReference Include="..\BPASmartClient.CustomResource\BPASmartClient.CustomResource.csproj" /> | ||||
<ProjectReference Include="..\BPASmartClient.Modbus\BPASmartClient.Modbus.csproj" /> | <ProjectReference Include="..\BPASmartClient.Modbus\BPASmartClient.Modbus.csproj" /> | ||||
<ProjectReference Include="..\BPASmartClient.S7Net\BPASmartClient.S7Net.csproj" /> | <ProjectReference Include="..\BPASmartClient.S7Net\BPASmartClient.S7Net.csproj" /> | ||||
<ProjectReference Include="..\BPASmartClient.Update\BPASmartClient.Update.csproj" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -87,14 +87,13 @@ namespace BPASmartClient.DosingSystem | |||||
private void TestData() | private void TestData() | ||||
{ | { | ||||
//aa(1, "盐"); | |||||
//aa(2, "郫县豆瓣"); | |||||
//aa(3, "芥菜"); | |||||
//aa(4, "调味剂"); | |||||
//aa(5, "香料"); | |||||
//aa(6, "鸡精"); | |||||
//aa(7, "味精"); | |||||
aa(1, "盐"); | |||||
aa(2, "郫县豆瓣"); | |||||
aa(3, "芥菜"); | |||||
aa(4, "调味剂"); | |||||
aa(5, "香料"); | |||||
aa(6, "鸡精"); | |||||
aa(7, "味精"); | |||||
for (int i = 0; i < 8; i++) | for (int i = 0; i < 8; i++) | ||||
{ | { | ||||
DeviceLists.TryAdd($"192.168.1.{i + 1}", new DeviceStatus() { DeviceName = $"测试设备{i + 1}" }); | DeviceLists.TryAdd($"192.168.1.{i + 1}", new DeviceStatus() { DeviceName = $"测试设备{i + 1}" }); | ||||
@@ -144,7 +143,7 @@ namespace BPASmartClient.DosingSystem | |||||
{ | { | ||||
if (!string.IsNullOrEmpty(Json<DevicePar>.Data.BaseParModel.NetworkSegAddress)) IPSegment = Json<DevicePar>.Data.BaseParModel.NetworkSegAddress; | if (!string.IsNullOrEmpty(Json<DevicePar>.Data.BaseParModel.NetworkSegAddress)) IPSegment = Json<DevicePar>.Data.BaseParModel.NetworkSegAddress; | ||||
else Json<DevicePar>.Data.BaseParModel.NetworkSegAddress = IPSegment; | else Json<DevicePar>.Data.BaseParModel.NetworkSegAddress = IPSegment; | ||||
//TestData(); | |||||
TestData(); | |||||
IpAddressLines(); | IpAddressLines(); | ||||
SiemensDevice.GetInstance.Connect(Json<DevicePar>.Data.BaseParModel.DeviceAddress); | SiemensDevice.GetInstance.Connect(Json<DevicePar>.Data.BaseParModel.DeviceAddress); | ||||
DeviceDataInit(); | DeviceDataInit(); | ||||
@@ -62,8 +62,7 @@ | |||||
<Style x:Key="InputTextboxStyle" TargetType="TextBox"> | <Style x:Key="InputTextboxStyle" TargetType="TextBox"> | ||||
<Setter Property="Margin" Value="5,0,0,0" /> | <Setter Property="Margin" Value="5,0,0,0" /> | ||||
<Setter Property="BorderThickness" Value="0" /> | <Setter Property="BorderThickness" Value="0" /> | ||||
<Setter Property="HorizontalAlignment" Value="Left" /> | |||||
<Setter Property="Width" Value="150" /> | |||||
<Setter Property="HorizontalContentAlignment" Value="Left" /> | |||||
<Setter Property="Height" Value="40" /> | <Setter Property="Height" Value="40" /> | ||||
<Setter Property="CaretBrush" Value="{StaticResource TitleBorderColor}" /> | <Setter Property="CaretBrush" Value="{StaticResource TitleBorderColor}" /> | ||||
<Setter Property="Foreground" Value="{StaticResource TitleBorderColor}" /> | <Setter Property="Foreground" Value="{StaticResource TitleBorderColor}" /> | ||||
@@ -212,6 +212,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.RobotGripper | |||||
EndProject | EndProject | ||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MilkTeaCube", "BPASmartClient.MilkTeaCube\BPASmartClient.MilkTeaCube.csproj", "{915F0718-B7AC-428D-ACD5-7DAACC28539F}" | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MilkTeaCube", "BPASmartClient.MilkTeaCube\BPASmartClient.MilkTeaCube.csproj", "{915F0718-B7AC-428D-ACD5-7DAACC28539F}" | ||||
EndProject | EndProject | ||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.Update", "BPASmartClient.Update\BPASmartClient.Update.csproj", "{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}" | |||||
EndProject | |||||
Global | Global | ||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||||
Debug|Any CPU = Debug|Any CPU | Debug|Any CPU = Debug|Any CPU | ||||
@@ -1986,6 +1988,26 @@ Global | |||||
{915F0718-B7AC-428D-ACD5-7DAACC28539F}.Release|x64.Build.0 = Release|Any CPU | {915F0718-B7AC-428D-ACD5-7DAACC28539F}.Release|x64.Build.0 = Release|Any CPU | ||||
{915F0718-B7AC-428D-ACD5-7DAACC28539F}.Release|x86.ActiveCfg = Release|Any CPU | {915F0718-B7AC-428D-ACD5-7DAACC28539F}.Release|x86.ActiveCfg = Release|Any CPU | ||||
{915F0718-B7AC-428D-ACD5-7DAACC28539F}.Release|x86.Build.0 = Release|Any CPU | {915F0718-B7AC-428D-ACD5-7DAACC28539F}.Release|x86.Build.0 = Release|Any CPU | ||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Debug|ARM.ActiveCfg = Debug|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Debug|ARM.Build.0 = Debug|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Debug|ARM64.ActiveCfg = Debug|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Debug|ARM64.Build.0 = Debug|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Debug|x64.ActiveCfg = Debug|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Debug|x64.Build.0 = Debug|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Debug|x86.ActiveCfg = Debug|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Debug|x86.Build.0 = Debug|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Release|Any CPU.Build.0 = Release|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Release|ARM.ActiveCfg = Release|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Release|ARM.Build.0 = Release|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Release|ARM64.ActiveCfg = Release|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Release|ARM64.Build.0 = Release|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Release|x64.ActiveCfg = Release|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Release|x64.Build.0 = Release|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Release|x86.ActiveCfg = Release|Any CPU | |||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7}.Release|x86.Build.0 = Release|Any CPU | |||||
EndGlobalSection | EndGlobalSection | ||||
GlobalSection(SolutionProperties) = preSolution | GlobalSection(SolutionProperties) = preSolution | ||||
HideSolutionNode = FALSE | HideSolutionNode = FALSE | ||||
@@ -2084,6 +2106,7 @@ Global | |||||
{B38F72AE-3C15-4C4E-A47E-DB2B9B318F02} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} | {B38F72AE-3C15-4C4E-A47E-DB2B9B318F02} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} | ||||
{5EBC34EB-4EE8-4C70-BAAA-C7F637D5E10F} = {666CB1A9-562E-453A-A2C7-FD9D77CFDFDD} | {5EBC34EB-4EE8-4C70-BAAA-C7F637D5E10F} = {666CB1A9-562E-453A-A2C7-FD9D77CFDFDD} | ||||
{915F0718-B7AC-428D-ACD5-7DAACC28539F} = {666CB1A9-562E-453A-A2C7-FD9D77CFDFDD} | {915F0718-B7AC-428D-ACD5-7DAACC28539F} = {666CB1A9-562E-453A-A2C7-FD9D77CFDFDD} | ||||
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} | |||||
EndGlobalSection | EndGlobalSection | ||||
GlobalSection(ExtensibilityGlobals) = postSolution | GlobalSection(ExtensibilityGlobals) = postSolution | ||||
SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC} | SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC} | ||||