| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672 | 
							- using System;
 
- using System.Collections.Generic;
 
- using System.Collections.ObjectModel;
 
- using System.Linq;
 
- using System.Windows;
 
- using Aitex.Core.RT.IOCore;
 
- using Caliburn.Micro;
 
- using Caliburn.Micro.Core;
 
- using MECF.Framework.Common.DataCenter;
 
- using MECF.Framework.Common.IOCore;
 
- using MECF.Framework.Common.OperationCenter;
 
- using MECF.Framework.UI.Client.CenterViews.Dialogs;
 
- using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
 
- using MECF.Framework.UI.Client.CenterViews.Editors.Sequence;
 
- using MECF.Framework.UI.Client.ClientBase;
 
- using OpenSEMI.ClientBase;
 
- using OpenSEMI.ClientBase.Command;
 
- using OpenSEMI.ClientBase.IO;
 
- namespace MECF.Framework.UI.Client.CenterViews.Configs.SystemConfig
 
- {
 
-     public class SystemConfigViewModel : UiViewModelBase, ISupportMultipleSystem
 
-     {
 
-         #region Properties
 
-         public bool IsPermission { get => this.Permission == 3; }
 
-         private SystemConfigView view1;
 
-         private Visibility _isShowTable = Visibility.Hidden;
 
-         public Visibility IsShowTable
 
-         {
 
-             get => _isShowTable;
 
-             set
 
-             {
 
-                 _isShowTable = value;
 
-                 NotifyOfPropertyChange(nameof(IsShowTable));
 
-             }
 
-         }
 
-         private Visibility _isListData = Visibility.Hidden;
 
-         public Visibility IsListData
 
-         {
 
-             get => _isListData;
 
-             set
 
-             {
 
-                 _isListData = value;
 
-                 NotifyOfPropertyChange(nameof(IsListData));
 
-             }
 
-         }
 
-         private Visibility _isShowData = Visibility.Hidden;
 
-         public Visibility IsShowData
 
-         {
 
-             get => _isShowData;
 
-             set
 
-             {
 
-                 _isShowData = value;
 
-                 NotifyOfPropertyChange(nameof(IsShowData));
 
-             }
 
-         }
 
-         private Visibility _isShowAUX = Visibility.Hidden;
 
-         public Visibility IsShowAUX
 
-         {
 
-             get => _isShowAUX;
 
-             set
 
-             {
 
-                 _isShowAUX = value;
 
-                 NotifyOfPropertyChange(nameof(IsShowAUX));
 
-             }
 
-         }
 
-         private List<ConfigNode> _ConfigNodes = new List<ConfigNode>();
 
-         public List<ConfigNode> ConfigNodes
 
-         {
 
-             get { return _ConfigNodes; }
 
-             set { _ConfigNodes = value; NotifyOfPropertyChange("ConfigNodes"); }
 
-         }
 
-         private ObservableCollection<ConfigItem> _configItems = new ObservableCollection<ConfigItem>();
 
-         public ObservableCollection<ConfigItem> ConfigItems
 
-         {
 
-             get { return _configItems; }
 
-             set { _configItems = value; NotifyOfPropertyChange("ConfigItems"); }
 
-         }
 
-         private ObservableCollection<ConfigItem> _configAUXItems = new ObservableCollection<ConfigItem>();
 
-         public ObservableCollection<ConfigItem> ConfigAUXItems
 
-         {
 
-             get { return _configAUXItems; }
 
-             set { _configAUXItems = value; NotifyOfPropertyChange("ConfigAUXItems"); }
 
-         }
 
-         string _CurrentNodeName = string.Empty;
 
-         public BaseCommand<ConfigNode> TreeViewSelectedItemChangedCmd { private set; get; }
 
-         private ObservableCollection<PageValue> valueList { get; set; } = new ObservableCollection<PageValue>();
 
-         public ObservableCollection<ListName> NameList { get; set; } = new ObservableCollection<ListName>();
 
-         public ObservableCollection<AOItemFloat> AOs { get; private set; }
 
-         private string _currentCriteria = String.Empty;
 
-         public string CurrentCriteria
 
-         {
 
-             get { return _currentCriteria; }
 
-             set
 
-             {
 
-                 if (value == _currentCriteria)
 
-                     return;
 
-                 _currentCriteria = value;
 
-                 NotifyOfPropertyChange("CurrentCriteria");
 
-                 ApplyFilter();
 
-             }
 
-         }
 
-         public string SystemName { get; set; }
 
-         private void ApplyFilter()
 
-         {
 
-             foreach (var node in ConfigNodes)
 
-                 node.ApplyCriteria(CurrentCriteria, new Stack<ConfigNode>());
 
-         }
 
-         #endregion
 
-         #region Functions
 
-         public SystemConfigViewModel()
 
-         {
 
-             this.DisplayName = "System Config";
 
-             TreeViewSelectedItemChangedCmd = new BaseCommand<ConfigNode>(TreeViewSelectedItemChanged);
 
-         }
 
-         protected override void OnInitialize()
 
-         {
 
-             base.OnInitialize();
 
-             ConfigNodes = SystemConfigProvider.Instance.GetConfigTree(SystemName).SubNodes;
 
-         }
 
-         protected override void OnActivate()
 
-         {
 
-             base.OnActivate();
 
-             ConfigNodes = SystemConfigProvider.Instance.GetConfigTree(SystemName).SubNodes;
 
-         }
 
-         protected override void OnViewLoaded(object view)
 
-         {
 
-             base.OnViewLoaded(view);
 
-             view1 = (SystemConfigView)view;
 
-         }
 
-         private void SetShowView(string name)
 
-         {
 
-             switch (name)
 
-             {
 
-                 case "IsShowTable":
 
-                     IsShowTable = Visibility.Visible;
 
-                     IsShowData = Visibility.Hidden;
 
-                     IsListData = Visibility.Hidden;
 
-                     IsShowAUX = Visibility.Hidden;
 
-                     break;
 
-                 case "IsShowData":
 
-                     IsShowTable = Visibility.Hidden;
 
-                     IsShowData = Visibility.Visible;
 
-                     IsListData = Visibility.Hidden;
 
-                     IsShowAUX = Visibility.Hidden;
 
-                     if (view1 != null)
 
-                     {
 
-                         view1.ShowAUX.ItemsSource = null;
 
-                         view1.ShowData.ItemsSource = ConfigItems;
 
-                     }
 
-                     break;
 
-                 case "IsListData":
 
-                     IsShowTable = Visibility.Hidden;
 
-                     IsShowData = Visibility.Hidden;
 
-                     IsListData = Visibility.Visible;
 
-                     IsShowAUX = Visibility.Hidden;
 
-                     break;
 
-                 case "IsShowAUX":
 
-                     IsShowTable = Visibility.Hidden;
 
-                     IsShowData = Visibility.Hidden;
 
-                     IsListData = Visibility.Hidden;
 
-                     IsShowAUX = Visibility.Visible;
 
-                     if (view1 != null)
 
-                     {
 
-                         view1.ShowData.ItemsSource = null;
 
-                         view1.ShowAUX.ItemsSource = ConfigItems;
 
-                     }
 
-                     break;
 
-                 default:
 
-                     break;
 
-             }
 
-         }
 
-         private void TreeViewSelectedItemChanged(ConfigNode node)
 
-         {
 
-             valueList.Clear();
 
-             _CurrentNodeName = string.IsNullOrEmpty(node.Path) ? node.Name : $"{node.Path}.{node.Name}";
 
-             ConfigItems.Clear();
 
-             node.Items.ForEach(x => ConfigItems.Add(x));
 
-             if (_CurrentNodeName.Contains("WaferCycleTime"))
 
-             {
 
-                 SetShowView("IsShowTable");
 
-             }
 
-             else if (_CurrentNodeName.Contains("Step Name"))
 
-             {
 
-                 int count = int.Parse(ConfigItems.FirstOrDefault(x => x.Name == "Count").DefaultValue);
 
-                 string names = ConfigItems.FirstOrDefault(x => x.Name == "Name").StringValue;
 
-                 NameList.Clear();
 
-                 int index = 1;
 
-                 for (int i = 0; i < count; i++)
 
-                 {
 
-                     NameList.Add(new ListName()
 
-                     { No = index, Name = "" });
 
-                     index++;
 
-                 }
 
-                 if (!string.IsNullOrEmpty(names))
 
-                 {
 
-                 }
 
-                 SetShowView("IsListData");
 
-             }
 
-             else if (_CurrentNodeName.Contains("AUX"))
 
-             {
 
-                 //if (ConfigAUXItems.Count() == 0)
 
-                 //{
 
-                 node.Items.ForEach(x => ConfigAUXItems.Add(x));
 
-                 for (int i = 0; i < ConfigAUXItems.Count; i++)
 
-                 {
 
-                     ConfigAUXItems[i].CurrentValueParam.Value = ConfigAUXItems[i].CurrentValue;
 
-                     ConfigAUXItems[i].Unit = (i + 1).ToString();
 
-                 }
 
-                 //}
 
-                 GetDataOfConfigAUXItems();
 
-                 SetShowView("IsShowAUX");
 
-                 return;
 
-             }
 
-             else
 
-             {
 
-                 SetShowView("IsShowData");
 
-             }
 
-             GetDataOfConfigItems();
 
-         }
 
-         private void GetDataOfConfigItems()
 
-         {
 
-             if (ConfigItems == null || ConfigItems.Count == 0)
 
-                 return;
 
-             for (int i = 0; i < ConfigItems.Count; i++)
 
-             {
 
-                 string key = String.Format("{0}{1}{2}", _CurrentNodeName, ".", ConfigItems[i].Name);
 
-                 ConfigItems[i].CurrentValue = SystemConfigProvider.Instance.GetValueByName(SystemName, key);
 
-                 if (ConfigItems[i].Type == DataType.Bool)
 
-                 {
 
-                     bool value;
 
-                     if (bool.TryParse(ConfigItems[i].CurrentValue, out value))
 
-                     {
 
-                         ConfigItems[i].BoolValue = value;
 
-                         ConfigItems[i].CurrentValue = value ? "Yes" : "No";
 
-                     }
 
-                 }
 
-                 else
 
-                     ConfigItems[i].StringValue = ConfigItems[i].CurrentValue;
 
-             }
 
-         }
 
-         private void GetDataOfConfigAUXItems()
 
-         {
 
-             if (ConfigAUXItems == null || ConfigAUXItems.Count == 0)
 
-                 return;
 
-             for (int i = 0; i < ConfigAUXItems.Count; i++)
 
-             {
 
-                 string key = String.Format("{0}{1}{2}", _CurrentNodeName, ".", ConfigAUXItems[i].Name);
 
-                 ConfigAUXItems[i].CurrentValueParam.Value = SystemConfigProvider.Instance.GetValueByName(SystemName, key);
 
-             }
 
-         }
 
-         public void SetValue(ConfigItem item)
 
-         {
 
-             InputDialogViewModel dialog = new InputDialogViewModel();
 
-             RecipeSelectDialogViewModel selectDialog = new RecipeSelectDialogViewModel();
 
-             WindowManager wm = new WindowManager();
 
-             bool? bret = null;
 
-             if (item.Name == "Idle Recipe" || item.Name == "Abort Recipe" || item.Name == "Reset Recipe")
 
-             {
 
-                 selectDialog.DisplayName = "Select Recipe";
 
-                 var recipeProvider = new RecipeProvider();
 
-                 string selectRecipeType = "";
 
-                 if (item.Name == "Idle Recipe")
 
-                     selectRecipeType = "Idle";
 
-                 else if (item.Name == "Abort Recipe")
 
-                     selectRecipeType = "Abort";
 
-                 else
 
-                     selectRecipeType = "Reset";
 
-                 var processType = QueryDataClient.Instance.Service.GetConfig($"System.Recipe.{selectRecipeType}");
 
-                 if (processType == null)
 
-                 {
 
-                     processType = selectRecipeType;
 
-                 }
 
-                 var ProcessTypeFileList = new ObservableCollection<ProcessTypeFileItem>();
 
-                 string[] recipeProcessType = ((string)processType).Split(',');
 
-                 for (int i = 0; i < recipeProcessType.Length; i++)
 
-                 {
 
-                     var type = new ProcessTypeFileItem();
 
-                     type.ProcessType = recipeProcessType[i];
 
-                     var prefix = $"Furnace\\{recipeProcessType[i]}";
 
-                     var recipes = recipeProvider.GetXmlRecipeList(prefix);
 
-                     type.FileListByProcessType = RecipeSequenceTreeBuilder.BuildFileNode(prefix, "", false, recipes)[0].Files;
 
-                     ProcessTypeFileList.Add(type);
 
-                 }
 
-                 selectDialog.ProcessTypeFileList = ProcessTypeFileList;
 
-                 bret = wm.ShowDialog(selectDialog);
 
-             }
 
-             else
 
-             {
 
-                 if (item.Type == DataType.String) dialog.KeyboardType = "FullKeyboard";
 
-                 dialog.Item = item;
 
-                 dialog.DisplayName = "Set Value";
 
-                 bret = wm.ShowDialog(dialog);
 
-             }
 
-             string strOldValue = item.CurrentValue;
 
-             if ((bool)bret)
 
-             {
 
-                 item.StringValue = dialog.DialogResult;
 
-                 string value = string.Empty;
 
-                 switch (item.Type)
 
-                 {
 
-                     case DataType.Int:
 
-                         int iValue;
 
-                         if (int.TryParse(item.StringValue, out iValue))
 
-                         {
 
-                             if (!double.IsNaN(item.Max) && !double.IsNaN(item.Min))
 
-                             {
 
-                                 if (iValue > item.Max || iValue < item.Min)
 
-                                 {
 
-                                     DialogBox.ShowWarning(string.Format("The value should be between {0}  and {1}.", ((int)item.Min).ToString(), ((int)item.Max).ToString()));
 
-                                     return;
 
-                                 }
 
-                             }
 
-                         }
 
-                         else
 
-                         {
 
-                             DialogBox.ShowWarning("Please input valid data.");
 
-                             return;
 
-                         }
 
-                         value = item.StringValue;
 
-                         break;
 
-                     case DataType.Double:
 
-                         double fValue;
 
-                         if (double.TryParse(item.StringValue, out fValue))
 
-                         {
 
-                             if (!double.IsNaN(item.Max) && !double.IsNaN(item.Min))
 
-                             {
 
-                                 if (fValue > item.Max || fValue < item.Min)
 
-                                 {
 
-                                     DialogBox.ShowWarning(string.Format("The value should be between {0}  and {1}.", item.Min.ToString(), item.Max.ToString()));
 
-                                     return;
 
-                                 }
 
-                                 string[] box = fValue.ToString().Split('.');
 
-                                 if (box.Length > 1 && box[1].Length > 3)
 
-                                 {
 
-                                     DialogBox.ShowWarning(string.Format("The value should be more than three decimal places"));
 
-                                     return;
 
-                                 }
 
-                             }
 
-                         }
 
-                         else
 
-                         {
 
-                             DialogBox.ShowWarning("Please input valid data.");
 
-                             return;
 
-                         }
 
-                         value = item.StringValue;
 
-                         break;
 
-                     case DataType.Bool:
 
-                         if (item.StringValue.Equals("Yes", StringComparison.CurrentCultureIgnoreCase))
 
-                             item.BoolValue = true;
 
-                         else if (item.StringValue.Equals("No", StringComparison.CurrentCultureIgnoreCase))
 
-                             item.BoolValue = false;
 
-                         else
 
-                         {
 
-                             DialogBox.ShowWarning("The Value Should be Yes Or No.");
 
-                             return;
 
-                         }
 
-                         value = item.BoolValue.ToString().ToLower();
 
-                         break;
 
-                     case DataType.String:
 
-                         if (item.StringValue != null)
 
-                             value = item.StringValue;
 
-                         else
 
-                             value = selectDialog.DialogResult;
 
-                         break;
 
-                 }
 
-                 if (_CurrentNodeName == "System.ShutDown" && item.StringValue == "ShutDown")
 
-                     InvokeClient.Instance.Service.DoOperation("System.ShutDown");
 
-                 //压力单位改变时候,已有设置根据改变进行值转换
 
-                 if (item.Name == "PressureUnit")
 
-                     ChangePressureUnit(value);
 
-                 string key = String.Format("{0}{1}{2}", _CurrentNodeName, ".", item.Name);
 
-                 valueList.Add(new PageValue() { Path = key, CurrentValue = value });
 
-                 InvokeClient.Instance.Service.DoOperation($"{SystemName}.SetConfig", key, value);
 
-                 if (item.Name == "Idle Recipe" || item.Name == "Abort Recipe" || item.Name == "Reset Recipe")
 
-                 {
 
-                     GetDataOfConfigItems();
 
-                 }
 
-             }
 
-         }
 
-         private void ChangePressureUnit(string strNewValue)
 
-         {
 
-             //double dValue = 0;
 
-             //if (strNewValue.Equals("Torr"))//从Pa转换成Torr
 
-             //    dValue = 0.0075006;
 
-             //else                           //从Torr转换成Pa
 
-             //    dValue = 133.322;
 
-             //for (int i = 1; i <= 5; i++)
 
-             //{
 
-             //    string key = $"PM1.RecipeEditParameter.PressureStabilizeTable.Table{i}.MaxScale";
 
-             //    double newValue = dValue * double.Parse(SystemConfigProvider.Instance.GetValueByName(SystemName, key));
 
-             //    InvokeClient.Instance.Service.DoOperation($"{SystemName}.SetConfig", key, newValue);
 
-             //}
 
-             InvokeClient.Instance.Service.DoOperation($"PM1.APC.SetUnit", strNewValue);
 
-         }
 
-         public void Reload()
 
-         {
 
-             GetDataOfConfigItems();
 
-         }
 
-         public void SaveAll()
 
-         {
 
-             if (ConfigItems == null)
 
-                 return;
 
-             ConfigItems.ToList().ForEach(item => SetValue(item));
 
-         }
 
-         public void SaveParameter()
 
-         {
 
-             foreach (var item in valueList)
 
-             {
 
-                 InvokeClient.Instance.Service.DoOperation($"{SystemName}.SetConfig", item.Path, item.CurrentValue);
 
-             }
 
-             Reload();
 
-         }
 
-         public void Cancel()
 
-         {
 
-             valueList.Clear();
 
-             Reload();
 
-         }
 
-         public void CollapseAll()
 
-         {
 
-             SetExpand(ConfigNodes, false);
 
-         }
 
-         public void ExpandAll()
 
-         {
 
-             SetExpand(ConfigNodes, true);
 
-         }
 
-         public void ClearFilter()
 
-         {
 
-             CurrentCriteria = "";
 
-         }
 
-         public void SetExpand(List<ConfigNode> configs, bool expand)
 
-         {
 
-             if (configs == null)
 
-                 return;
 
-             foreach (var configNode in configs)
 
-             {
 
-                 configNode.IsExpanded = expand;
 
-                 if (configNode.SubNodes != null)
 
-                     SetExpand(configNode.SubNodes, expand);
 
-             }
 
-         }
 
-         #endregion
 
-         protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
 
-         {
 
-             base.InvokeAfterUpdateProperty(data);
 
-             string _aoKey = $"{SystemName}.PM1.AOList";
 
-             if (data[_aoKey] != null && _isReadPLC)
 
-             {
 
-                 List<NotifiableIoItem> lstData = (List<NotifiableIoItem>)data[_aoKey];
 
-                 for (int i = 0; i < lstData.Count; i++)
 
-                 {
 
-                     var findConfigAUX = ConfigAUXItems.FirstOrDefault(x => $"PM1.{x.Name}" == lstData[i].Name);
 
-                     if (findConfigAUX != null)
 
-                     {
 
-                         if (findConfigAUX.CurrentValueParam.Value != lstData[i].FloatValue.ToString())
 
-                         {
 
-                             findConfigAUX.CurrentValueParam.SetValue(lstData[i].FloatValue.ToString());
 
-                         }
 
-                     }
 
-                 }
 
-                 _isReadPLC = false;
 
-             }
 
-         }
 
-         public void AUXSaveClick()
 
-         {
 
-             SaveValueToSC();
 
-             if (DialogBox.Confirm("Save SC Value To PLC?"))
 
-             {
 
-                 SaveValueToPLC(true);
 
-             }
 
-         }
 
-         public void AUXUploadClick()
 
-         {
 
-             if (DialogBox.Confirm("Upload save PLC data to SC?"))
 
-             {
 
-                 GetPLCToSC();
 
-             }
 
-         }
 
-         public void AUXDownloadClick()
 
-         {
 
-             if (DialogBox.Confirm("Save SC data and download to PLC?"))
 
-             {
 
-                 SaveValueToSC();
 
-                 SaveValueToPLC();
 
-             }
 
-         }
 
-         private void SaveValueToSC()
 
-         {
 
-             foreach (var item in ConfigAUXItems)
 
-             {
 
-                 InvokeClient.Instance.Service.DoOperation($"{SystemName}.SetConfig", $"{item.Path}.{item.Name}", item.CurrentValueParam.Value);
 
-             }
 
-         }
 
-         private void SaveValueToPLC(bool isSaveAll = false)
 
-         {
 
-             if (isSaveAll)
 
-             {
 
-                 foreach (var item in ConfigAUXItems)
 
-                 {
 
-                     float tempValue = 0;
 
-                     float.TryParse(item.CurrentValueParam.Value, out tempValue);
 
-                     InvokeClient.Instance.Service.DoOperation("System.SetAoValueFloat", $"PM1.{item.Name}", tempValue);
 
-                     item.CurrentValueParam.IsSaved = true;
 
-                 }
 
-             }
 
-             else
 
-             {
 
-                 foreach (var item in ConfigAUXItems)
 
-                 {
 
-                     if (!item.CurrentValueParam.IsSaved)
 
-                     {
 
-                         float tempValue = 0;
 
-                         float.TryParse(item.CurrentValueParam.Value, out tempValue);
 
-                         InvokeClient.Instance.Service.DoOperation("System.SetAoValueFloat", $"PM1.{item.Name}", tempValue);
 
-                         item.CurrentValueParam.IsSaved = true;
 
-                     }
 
-                 }
 
-             }
 
-         }
 
-         private static bool _isReadPLC = false;
 
-         private void GetPLCToSC()
 
-         {
 
-             _isReadPLC = true;
 
-             string _aoKey = $"{SystemName}.PM1.AOItemList";
 
-             this.AOs = InitIOData(IOType.AO, _aoKey);
 
-             _aoKey = $"{SystemName}.PM1.AOList";
 
-             Subscribe(_aoKey);
 
-         }
 
-         public ObservableCollection<AOItemFloat> InitIOData(IOType type, string dataName)
 
-         {
 
-             //get the whole informations
 
-             ObservableCollection<AOItemFloat> da = new ObservableCollection<AOItemFloat>();
 
-             if (type == IOType.AO)
 
-             {
 
-                 var diList = QueryDataClient.Instance.Service.GetData(dataName);
 
-                 if (diList != null)
 
-                 {
 
-                     List<NotifiableIoItem> item = (List<NotifiableIoItem>)diList;
 
-                     for (int i = 0; i < item.Count; i++)
 
-                     {
 
-                         {
 
-                             da.Add(new AOItemFloat()
 
-                             {
 
-                                 Index = da.Count,
 
-                                 Name = item[i].Name,
 
-                                 //DisplayName = item[i].Name.Substring(item[i].Name.IndexOf('.') + 1),
 
-                                 DisplayName = item[i].Description,
 
-                                 Value = item[i].FloatValue,
 
-                                 Address = item[i].Address
 
-                             });
 
-                         }
 
-                     }
 
-                 }
 
-             }
 
-             return da;
 
-         }
 
-     }
 
-     public class ListName : PropertyChangedBase
 
-     {
 
-         private int _no;
 
-         public int No
 
-         {
 
-             get => _no;
 
-             set
 
-             {
 
-                 _no = value;
 
-                 NotifyOfPropertyChange(nameof(No));
 
-             }
 
-         }
 
-         private string _name;
 
-         public string Name
 
-         {
 
-             get => _name;
 
-             set
 
-             {
 
-                 _name = value;
 
-                 NotifyOfPropertyChange(nameof(Name));
 
-             }
 
-         }
 
-     }
 
-     public class PageValue
 
-     {
 
-         public string Path { get; set; }
 
-         public double Min { get; set; }
 
-         public double Max { get; set; }
 
-         public DataType Type { get; set; }
 
-         public string CurrentValue { get; set; }
 
-         public List<string> Parameters { get; set; }
 
-     }
 
- }
 
 
  |