using System; using System.ComponentModel; using System.Windows.Forms; namespace BaseLibRWFile { public class SysSettingPara { private ushort iMotionCardIOPage = 1; private ushort iPLCIOPage = 1; private ushort iIOCardIOPage = 1; private ushort iRobotIOPage = 1; public static SysSettingPara Instance { set; get; } = new SysSettingPara(); [Browsable(false)] public string StrSysSettingFilePath { get; } = $"{GlobalPara.BaseFilePath}\\Config\\SystemConfig.xml"; [Category("界面")] [Description("手动CPK界面")] public bool CPK界面 { set; get; } = false; [Category("界面")] [Description("手动GRR界面")] public bool GRR界面 { set; get; } = false; [Category("界面")] [Description("手动网口界面")] public bool 网口界面 { set; get; } = false; [Category("界面")] [Description("手动串口界面")] public bool 串口界面 { set; get; } = false; [Category("IO页数")] [Description("轴卡IO界面页数")] public ushort 轴卡 { get { return iMotionCardIOPage; } set { iMotionCardIOPage = value; if (iMotionCardIOPage > 10) { iMotionCardIOPage = 1; MessageBox.Show($"页数不能大于10","Tips"); } } } [Category("IO页数")] [Description("PLCIO界面页数")] public ushort PLC { get { return iPLCIOPage; } set { iPLCIOPage = value; if (iPLCIOPage > 10) { iPLCIOPage = 1; MessageBox.Show($"页数不能大于10", "Tips"); } } } [Category("IO页数")] [Description("机械手IO界面页数")] public ushort 机械手 { get { return iRobotIOPage; } set { iRobotIOPage = value; if (iRobotIOPage > 10) { iRobotIOPage = 1; MessageBox.Show($"页数不能大于10", "Tips"); } } } [Category("IO页数")] [Description("IO卡IO界面页数")] public ushort IO卡 { get { return iIOCardIOPage; } set { iIOCardIOPage = value; if (iIOCardIOPage > 10) { iIOCardIOPage = 1; MessageBox.Show($"页数不能大于10", "Tips"); } } } } }