Ejemplo n.º 1
0
 public static AccountBase Create(ChooseAccount choice, AccountCredentials credit, AccountNavigation navig)
 {
     AccountBase acc = null;
     switch (choice)
     {
         case ChooseAccount.Main:
             {
                 credit = Framework.Inst.CredentialsList[0];
                 credit.AccountId = 1;
                 acc = new BossaAccount(credit, navig);
                 break;
             }
         case ChooseAccount.Account1:
             {
                 credit = Framework.Inst.CredentialsList[1];
                 credit.AccountId = 2;
                 acc = new BossaAccount(credit, navig);
                 break;
             }
     //    case ChooseAccount.Test:
     //        {
     //            if(credit == null)
     //                credit = new Credentials();
                 
     //            acc = new BossaAccount(credit, navig);
     //            break;
     //        }
     }
     
     return acc;
 }
Ejemplo n.º 2
0
        public AccountBase(AccountCredentials cred, AccountNavigation navig) 
        {
            if (cred == null)
                throw new ArgumentNullException("Credentials must be passed!");

            if (navig == null)
                throw new ArgumentNullException("AccountNavigation must be passed!");

            //LastPosition = new Position(0, 0, DateTime.Now);
            Credentials = cred;
            this.Links = navig;
        }
Ejemplo n.º 3
0
        protected AccountBase CreateBossaMock()
        {
            AccountNavigation navig = new AccountNavigation();
            navig.Login = new Uri(HtmlTestBaseUri, "Main1.html");
            navig.Position = TestPosition1;
            navig.NewOrder = new Uri(HtmlTestBaseUri, "NewOrder.html");
            navig.Check4Changes = TestFirstPosition;
            navig.StartFrom = navig.Login;

            //config file must be provide !!!
            Framework.Inst.ReadAccountSettingsFromFile();
            //Credentials credit = Framework.Inst.Cre

            AccountBase acc = AccountFactory.Create(ChooseAccount.Main, null, navig);
            //acc.IsLoggedIn = true;
            return acc;
        }
Ejemplo n.º 4
0
 public static AccountBase Create(ChooseAccount choice)
 {
     AccountNavigation navig = new AccountNavigation();
     return Create(choice, null, navig);
 }
Ejemplo n.º 5
0
 public BossaAccount(AccountCredentials cred, AccountNavigation navig) : base(cred, navig)
 { }