private void Trader_UserLogined(object sender, RspEventArgs e) { switch (sender.ToString()) { case "ProgramTradeApi.XTradeSpi": if (e.ErrorID == 0) { LoginView.ViewVisible = false; } else { LoginView.InvalidMsg = "交易前置:" + e.Message; } break; case "ProgramTradeApi.XMduserSpi": if (e.ErrorID == 0) { } else { LoginView.InvalidMsg = "行情前置:" + e.Message; } break; } }
private void Trader_FrontConnected(object sender, RspEventArgs e) { switch (sender.ToString()) { case "ProgramTradeApi.XTradeSpi": if (e.ErrorID == 0) { LoginView.TdFrontConnected = true; LoginView.Username = "******"; LoginView.Password = "******"; } else { LoginView.TdFrontConnected = false; } LoginView.TradeFrontMsg = e.Message; break; case "ProgramTradeApi.XMduserSpi": if (e.ErrorID == 0) { LoginView.MdFrontConnected = true; } else { LoginView.MdFrontConnected = false; } LoginView.MarketFrontMsg = e.Message; break; case "ProgramTradeApi.QTradeSpi": if (e.ErrorID == 0) { LoginView.TdFrontConnected = true; //LoginView.Username = "******"; //LoginView.Password = "******"; } else { LoginView.TdFrontConnected = false; } LoginView.TradeFrontMsg = e.Message; break; } }