Exemple #1
0
        /// <summary>
        /// Automatic connection sequence entry point.
        ///
        /// Call from MainWindow.MainWindow_Loaded
        ///
        /// </summary>
        public void AutoConnection()
        {
            List <CServer> servers = Communicator.ServersConf.Servers;

            for (int i = 0; i < servers.Count; i++)
            {
                string serverName = Communicator.ServersConf.Servers[i].Name;
                //UserConReq req =  _passwordSaver.GetUserConReq(i);
                UserConReq req = new UserConReq
                {
                    AuthRequest = _passwordSaver.GetUserAuthReq(i),
                    ConnNum     = i,
                    ServerName  = serverName
                };


                if (req == null)
                {
                    continue;
                }
                //System.Threading.Thread.Sleep(20000);
                ConnectionTrial(req);
            }
        }
Exemple #2
0
 private void LoadAccountData()
 {
     try
     {
         //note: the same password for all connections
         CAuthRequest ar = _passwordSaver.GetUserAuthReq(0);
         if (ar != null)
         {
             _client.VMAccount.User     = ar.User;
             _client.VMAccount.Password = ar.Password;
         }
     }
     catch (Exception e)
     {
         Error("CommuTradeManager.ListAccountData", e);
     }
 }