Exemple #1
0
        public void MyTestInitialize()
        {
            core.LoginError += new Order2GoAddIn.CoreFX.LoginErrorHandler(core_LoginError);
            o2g              = new FXCoreWrapper(core);

            //if (!core.LogOn("6519040180", "Tziplyonak713", false)) UT.Assert.Fail("Login");
            ////if (!core.LogOn("6519048070", "Toby2523", false)) UT.Assert.Fail("Login");
            //if (!core.LogOn("65245768", "1962", false)) UT.Assert.Fail("Login");
            if (!core.LogOn("D31712988001", "8482", true))
            {
                UT.Assert.Fail("Login");
            }
            //if (!core.LogOn("dturbo", "1234", true)) UT.Assert.Fail("Login");
            o2g.OrderRemoved += new OrderRemovedEventHandler(o2g_OrderRemovedEvent);
        }
Exemple #2
0
 public bool Login(string tradingAccount, string tradingPassword, bool tradingDemo)
 {
     try {
         if (CoreFX.IsLoggedIn)
         {
             CoreFX.Logout();
         }
         return(CoreFX.LogOn(tradingAccount, "", tradingPassword, tradingDemo));
     } catch (Exception exc) {
         Log = exc;
         return(false);
     } finally {
         RaisePropertyChanged(() => IsLoggedIn);
     }
 }