fyf 2 years ago
parent
commit
270fbdbf74
5 changed files with 95 additions and 35 deletions
  1. +92
    -0
      BPASmartClient.SCADAControl/EnumClass/DataTypeEnum.cs
  2. +1
    -12
      BeDesignerSCADA/Controls/CanvasPanelNew.xaml.cs
  3. +0
    -8
      BeDesignerSCADA/Controls/MainCanvasPanel.xaml.cs
  4. +1
    -10
      BeDesignerSCADA/View/PropertyBindingWindow.xaml.cs
  5. +1
    -5
      BeDesignerSCADA/ViewModel/DataBusModel.cs

+ 92
- 0
BPASmartClient.SCADAControl/EnumClass/DataTypeEnum.cs View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -107,4 +108,95 @@ namespace BPASmartClient.SCADAControl
{
public List<PublishModel> PublishModels { get; set; } = new List<PublishModel>();
}

/// <summary>
/// 通讯参数配置
/// </summary>
public class CommunicationPar
{
public ObservableCollection<CommunicationModel> CommunicationDevices { get; set; } = new ObservableCollection<CommunicationModel>();
}

public class CommunicationModel
{
/// <summary>
/// 是否激活
/// </summary>
public bool IsActive { get { return _mIsActive; } set { _mIsActive = value;} }
private bool _mIsActive = true;


/// <summary>
/// 新增设备名称
/// </summary>
public string DeviceName { get { return _mDeviceName; } set { _mDeviceName = value; } }
private string _mDeviceName;

/// <summary>
/// 通讯模块名称
/// </summary>
public string ModelName { get { return _mModelName; } set { _mModelName = value; } }
private string _mModelName;

/// <summary>
/// 变量表数据
/// </summary>
public ObservableCollection<VariableInfo> VarTableModels { get; set; } = new ObservableCollection<VariableInfo>();

}

public class VariableInfo
{
public VariableInfo(params object[] s)
{
}

public int ID { get { return _mID; } set { _mID = value; } }
private int _mID;

/// <summary>
/// 变量名
/// </summary>
public string VarName
{
get { return _mVarName.Trim()?.Replace(" ", ""); }
set
{
_mVarName = value;
}
}
private string _mVarName = string.Empty;

/// <summary>
/// 地址
/// </summary>
public string Address
{
get { return _mAddress.Trim()?.Replace(" ", "").ToUpper(); }
set
{
_mAddress = value;
}
}
private string _mAddress = string.Empty;

/// <summary>
/// 实际地址
/// </summary>
public string RealAddress { get; set; }

/// <summary>
/// 数据类型
/// </summary>
public string DataType { get { return _mDataType; } set { _mDataType = value; } }
private string _mDataType = string.Empty;

/// <summary>
/// 是否启用报警
/// </summary>
public bool IsEnableAlarm { get { return _mIsEnableAlarm; } set { _mIsEnableAlarm = value; } }
private bool _mIsEnableAlarm;

}
}

+ 1
- 12
BeDesignerSCADA/Controls/CanvasPanelNew.xaml.cs View File

@@ -1,33 +1,22 @@
using BeDesignerSCADA.Common;
using BeDesignerSCADA.View;
using Newtonsoft.Json;
using BeDesignerSCADA.ViewModel;
using BPASmart.Model;
using BPASmartClient.Compiler;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Media.Effects;
using BeDesignerSCADA.Helper;

namespace BeDesignerSCADA.Controls
{


+ 0
- 8
BeDesignerSCADA/Controls/MainCanvasPanel.xaml.cs View File

@@ -1,29 +1,21 @@
using BeDesignerSCADA.Common;
using BeDesignerSCADA.View;
using BeDesignerSCADA.ViewModel;
using BPASmart.Model;
using BPASmartClient.Compiler;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BeDesignerSCADA.Controls
{


+ 1
- 10
BeDesignerSCADA/View/PropertyBindingWindow.xaml.cs View File

@@ -1,20 +1,11 @@
using BeDesignerSCADA.Common;
using BeDesignerSCADA.ViewModel;
using BPASmart.Model;
using BPASmartClient.SCADAControl;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
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.Shapes;

namespace BeDesignerSCADA.View
{


+ 1
- 5
BeDesignerSCADA/ViewModel/DataBusModel.cs View File

@@ -1,12 +1,8 @@
using BPASmart.Model;
using BPASmartClient.SCADAControl;
using Newtonsoft.Json;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BeDesignerSCADA.ViewModel
{


Loading…
Cancel
Save