Ejemplo n.º 1
0
        public static void  UserLogin(string user, string password)
        {
            STATION_TCP_INFO loginInfo = new STATION_TCP_INFO();

            loginInfo.USER         = user;
            loginInfo.PASSWROD     = password;
            loginInfo.IO_SERVER_ID = MonitorDataBaseModel.ServerID;
            loginInfo.IO_SERVER_IP = "";
            loginInfo.RESULT       = "false";
            loginInfo.FUNCTION     = "IOMonitor";
            Scada.AsyncNetTcp.TcpData tcpData = new Scada.AsyncNetTcp.TcpData();
            byte[] loginbytes = tcpData.StringToTcpByte(loginInfo.GetCommandString(), Scada.AsyncNetTcp.ScadaTcpOperator.登录);
            //发送登录命令
            TcpClient.Send(new ArraySegment <byte>(loginbytes));
        }
Ejemplo n.º 2
0
        public static bool LoginManager(string user, string password)
        {
            STATION_TCP_INFO loginInfo = new STATION_TCP_INFO();

            loginInfo.USER         = user;
            loginInfo.PASSWROD     = password;
            loginInfo.IO_SERVER_ID = "";
            loginInfo.IO_SERVER_IP = "";
            loginInfo.RESULT       = "false";
            loginInfo.FUNCTION     = "IOFlow";
            Scada.AsyncNetTcp.TcpData tcpData = new Scada.AsyncNetTcp.TcpData();
            byte[] loginbytes = tcpData.StringToTcpByte(loginInfo.GetCommandString(), Scada.AsyncNetTcp.ScadaTcpOperator.流程设计器登录);
            //发送登录命令
            TcpClient.Send(new ArraySegment <byte>(loginbytes));
            return(false);
        }