Beispiel #1
0
 static void OnConnectionStatus2(object sender, ConnectionStatus status, ref RspUserLoginField userLogin, int size1)
 {
     if (size1 > 0)
     {
         Console.WriteLine("222222" + userLogin.ToFormattedStringLong());
     }
     else
     {
         Console.WriteLine("222222" + status);
     }
 }
Beispiel #2
0
 static void OnConnectionStatus2(object sender, ConnectionStatus status, ref RspUserLoginField userLogin, int size1)
 {
     if (size1 > 0)
     {
         Console.WriteLine("222222" + userLogin.ToFormattedStringLong());
     }
     else
     {
         Console.WriteLine("222222" + status);
     }
 }
 protected override void OnConnectionStatus(object sender, ConnectionStatus status, ref RspUserLoginField userLogin, int size1)
 {
     base.OnConnectionStatus(sender, status, ref userLogin, size1);
     if (status == ConnectionStatus.Logined)
     {
         TradingDay = userLogin.TradingDay;
         SaveAsTradingDay();
     }
 }
Beispiel #4
0
 static void OnConnectionStatus2(object sender, ConnectionStatus status, ref RspUserLoginField userLogin, int size1)
 {
     Console.WriteLine("22222" + status+userLogin.ErrorMsg());
 }
Beispiel #5
0
 static void OnConnectionStatus2(object sender, ConnectionStatus status, ref RspUserLoginField userLogin, int size1)
 {
     Console.WriteLine("22222" + status + userLogin.ErrorMsg());
 }
Beispiel #6
0
 static void OnConnectionStatus(object sender, ConnectionStatus status, ref RspUserLoginField userLogin, int size1)
 {
     Console.WriteLine("11111" + status);
 }
Beispiel #7
0
 public static string ErrorMsg(this RspUserLoginField field)
 {
     return(PInvokeUtility.GetUnicodeString(field.ErrorMsg));
 }
Beispiel #8
0
 public static string ToFormattedString(this RspUserLoginField field)
 {
     return(string.Format("[TradingDay={0};LoginTime={1};SessionID={2};ErrorID={3};ErrorMsg={4}]",
                          field.TradingDay, field.LoginTime, field.SessionID, field.ErrorID, field.ErrorMsg()));
 }
Beispiel #9
0
 public static string InvestorName([In] this RspUserLoginField field)
 {
     return(PInvokeUtility.GetUnicodeString(field.InvestorName));
 }
Beispiel #10
0
 public static string ToFormattedStringShort([In] this RspUserLoginField field)
 {
     return(string.Format("[ErrorID={0};ErrorMsg={1}]",
                          field.ErrorID, field.ErrorMsg()));
 }
 protected virtual void OnConnectionStatus(object sender, ConnectionStatus status, ref RspUserLoginField userLogin, int size1)
 {
     if (size1 > 0)
     {
         if (userLogin.ErrorID != 0)
         {
             (sender as XApi).Log.Info("{0}:{1}", status, userLogin.ToFormattedStringShort());
         }
         else
         {
             (sender as XApi).Log.Info("{0}:{1}", status, userLogin.ToFormattedStringLong());
         }
     }
     else
     {
         (sender as XApi).Log.Info("{0}", status);
     }
     if (status == ConnectionStatus.Logined)
     {
         TradingDay = userLogin.TradingDay;
     }
 }
Beispiel #12
0
 static void OnConnectionStatus(object sender, ConnectionStatus status, ref RspUserLoginField userLogin, int size1)
 {
     Console.WriteLine("11111" + status);
 }
Beispiel #13
0
 public static string Text([In] this RspUserLoginField field)
 {
     return(PInvokeUtility.GetUnicodeString(field.Text));
 }
Beispiel #14
0
 public static string ToFormattedStringShort([In] this RspUserLoginField field)
 {
     return(string.Format("[XErrorID={0};RawErrorID={1};Text={2}]",
                          field.XErrorID, field.RawErrorID, field.Text()));
 }
Beispiel #15
0
 public static string ToFormattedStringLong([In] this RspUserLoginField field)
 {
     return(string.Format("[TradingDay={0};LoginTime={1};SessionID={2};InvestorName={3};XErrorID={4};RawErrorID={5};Text={6}]",
                          field.TradingDay, field.LoginTime, field.SessionID, field.InvestorName(), field.XErrorID, field.RawErrorID, field.Text()));
 }