Ejemplo n.º 1
0
        public static LoginInfo TransferUserLogin(XAPI.RspUserLoginField userLogin)
        {
            LoginInfo loginInfo = new LoginInfo();

            loginInfo.AccountID = userLogin.AccountID;
            if (userLogin.InvestorName != null)
            {
                loginInfo.InvestorName = GetStringFromByte(userLogin.InvestorName);
            }
            loginInfo.LoginTime = userLogin.LoginTime;
            loginInfo.SessionID = userLogin.SessionID;
            if (userLogin.Text != null)
            {
                loginInfo.Text = GetStringFromByte(userLogin.Text);
            }
            loginInfo.TradingDay = userLogin.TradingDay;
            loginInfo.UserID     = userLogin.UserID;
            loginInfo.XErrorID   = userLogin.XErrorID;
            return(loginInfo);
        }
Ejemplo n.º 2
0
        private void XApi_OnConnectionStatus(object sender, XAPI.ConnectionStatus status, ref XAPI.RspUserLoginField userLogin, int size1)
        {
            if (onConnectionStatus == null)
            {
                return;
            }

            LoginInfo loginInfo = StructTransfer.TransferUserLogin(userLogin);

            onConnectionStatus(sender, EnumTransfer.TransferConnectionStatus(status), ref loginInfo);
        }