CZ_Power/ClassSync.cs

(开头部分) 20KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Net;
using System.Windows.Forms;
using ComLibiary;
using DevComponents.DotNetBar;

namespace CZ_Power
{
    /// <summary>
    /// 同步管理方法(无构造体)
    /// 作者:刘宏科
    /// </summary>
    class ClassSync
    {
        #region 字段
        private static string workName = "主机";
        private static string workStatus = "工作";  
        public static int PortA = 6600;
        public static int PortB = 6600;
        public static string ZIPA = "127.0.0.1";//主机
        public static string ZIPB = "127.0.0.2";//主机
        public static string BIPA = "127.0.0.1";//备机
        public static string BIPB = "127.0.0.2";//备机
        /// <summary>
        /// 数据库类型
        /// </summary>
        public static DatabaseType Databasetype = DatabaseType.SQLServer;
        public static string DatabaseName = "";//数据库文件名称
        /// <summary>
        /// 定时20秒后切换(定时器决定)
        /// </summary>
        private const int WATCH_DOG_TIMEOUT = 20;
        private static int watchdog = 0;//主要用来监测TCP Client端是否存活
        /// <summary>
        /// 0x00:正常 0x01:异常
        /// </summary>
        private static byte udpStatusA = 0x01;
        /// <summary>
        /// 0x00:正常 0x01:异常
        /// </summary>
        private static byte udpStatusB = 0x01;
        private static UdpSync udpserverA = null;
        private static UdpSync udpserverB = null;
        private static UdpSync udpClientA = null;
        private static UdpSync udpClientB = null;
        public static CommandEnmuQueue SyncOp = new CommandEnmuQueue();//操作同步管理
        private static List<IPAddress> ipabLocal = new List<IPAddress>();
        private static List<IPAddress> ipabRemote = new List<IPAddress>();

        #endregion
        #region 属性
        /// <summary>
        /// 0x00:正常 0x01:异常
        /// </summary>
        public static byte UdpStatusA
        {
            get { return ClassSync.udpStatusA; }
            set { ClassSync.udpStatusA = value; }
        }
后面还有 497 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。