pry преди 1 година
родител
ревизия
8d95c34a50
променени са 6 файла, в които са добавени 8 реда и са изтрити 9 реда
  1. +1
    -1
      BPASmartClient.Business/Plugin/DeviceMgr.cs
  2. +2
    -2
      BPASmartClient.MilkWithTea/MainWindow.xaml.cs
  3. +1
    -1
      BPASmartClient.MilkWithTea/ViewModel/PatrameterSettiongViewModel.cs
  4. +0
    -2
      BPASmartClient.ViewModel/LogOrAlarmViewModel.cs
  5. +2
    -1
      BPASmartClient.ViewModel/NewShopWindowModel.cs
  6. +2
    -2
      BPASmartClient/Control/ShopDeviceConfigView.xaml.cs

+ 1
- 1
BPASmartClient.Business/Plugin/DeviceMgr.cs Целия файл

@@ -51,7 +51,7 @@ namespace BPASmartClient.Business
{
var result = Plugin.GetInstance().GetPlugin<ConfigMgr>()?.deviceConfigModelJsons;
//var text = TextHelper.GetInstance.ReadTextInfo("StartShop", "DeviceConfig");
//string path = $"{LocaPath.GetInstance().GetDeviceConfigPath}{text}.json";
//string path = $"{LocaPath.GetDeviceConfigPath}{text}.json";
//if (File.Exists(path))
//{
//string JsonString = File.ReadAllText(path);


+ 2
- 2
BPASmartClient.MilkWithTea/MainWindow.xaml.cs Целия файл

@@ -50,7 +50,7 @@ namespace BPASmartClient.MilkWithTea

private void CreateDevice()
{
DirectoryInfo directoryInfo = new DirectoryInfo(LocaPath.GetInstance().GetDeviceConfigPath);
DirectoryInfo directoryInfo = new DirectoryInfo(LocaPath.GetDeviceConfigPath);
if(!File.Exists($"{directoryInfo}Moc.json"))
{
File.WriteAllText($"{directoryInfo}Moc.json", JsonConvert.SerializeObject(GLobal.deviceConfig));
@@ -89,7 +89,7 @@ namespace BPASmartClient.MilkWithTea
ReadLeng = 0
});
}
File.WriteAllText($"{LocaPath.GetInstance().GetDeviceConfigPath}MOC.json", JsonConvert.SerializeObject(GLobal.deviceConfig));
File.WriteAllText($"{LocaPath.GetDeviceConfigPath}MOC.json", JsonConvert.SerializeObject(GLobal.deviceConfig));
}
}



+ 1
- 1
BPASmartClient.MilkWithTea/ViewModel/PatrameterSettiongViewModel.cs Целия файл

@@ -187,7 +187,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel
GLobal.deviceConfig.ElementAtOrDefault(0).deviceModels.ElementAtOrDefault(0).communicationDevcies.ElementAtOrDefault(0).communicationPar.IPAddress = PLCAdress;
}
}
File.WriteAllText($"{LocaPath.GetInstance().GetDeviceConfigPath}MOC.json", JsonConvert.SerializeObject(GLobal.deviceConfig));
File.WriteAllText($"{LocaPath.GetDeviceConfigPath}MOC.json", JsonConvert.SerializeObject(GLobal.deviceConfig));


}


+ 0
- 2
BPASmartClient.ViewModel/LogOrAlarmViewModel.cs Целия файл

@@ -2,8 +2,6 @@
using BPASmartClient.CustomResource.UserControls.MessageShow;
using BPA.Helper;
using BPASmartClient.Model;
using BPA.Helper;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;


+ 2
- 1
BPASmartClient.ViewModel/NewShopWindowModel.cs Целия файл

@@ -6,6 +6,7 @@ using System.Threading.Tasks;
using BPA.Helper;
using System.Windows;
using System.IO;
using BPASmartClient.Model;

namespace BPASmartClient.ViewModel
{
@@ -17,7 +18,7 @@ namespace BPASmartClient.ViewModel
CancelCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("CloseWindow"); });
DefineCommand = new BPARelayCommand(() =>
{
DirectoryInfo directoryInfo = new DirectoryInfo(LocaPath.GetInstance().GetDeviceConfigPath);
DirectoryInfo directoryInfo = new DirectoryInfo(LocaPath.GetDeviceConfigPath);
var files = directoryInfo.GetFiles();
if (files != null && files.FirstOrDefault(p => p.FullName.Contains(ShopName)) != null)
{


+ 2
- 2
BPASmartClient/Control/ShopDeviceConfigView.xaml.cs Целия файл

@@ -139,7 +139,7 @@ namespace BPASmartClient.Control
private void ComboBox_DropDownOpened(object sender, EventArgs e)
{
ShopDeviceConfigViewModel.Shops.Clear();
DirectoryInfo directoryInfo = new DirectoryInfo(LocaPath.GetInstance().GetDeviceConfigPath);
DirectoryInfo directoryInfo = new DirectoryInfo(LocaPath.GetDeviceConfigPath);
var files = directoryInfo.GetFiles();
foreach (var item in files)
{
@@ -152,7 +152,7 @@ namespace BPASmartClient.Control
{
var text = TextHelper.GetInstance.ReadTextInfo("StartShop", "DeviceConfig");
if (this.shop.Items.Contains(text)) this.shop.SelectedValue = text;
DirectoryInfo directoryInfo = new DirectoryInfo(LocaPath.GetInstance().GetDeviceConfigPath);
DirectoryInfo directoryInfo = new DirectoryInfo(LocaPath.GetDeviceConfigPath);
var files = directoryInfo.GetFiles();
if (files != null && this.shop.SelectedValue != null && this.shop.SelectedValue.ToString().Length > 0)
{


Зареждане…
Отказ
Запис