예제 #1
0
        ///
        /// <summary>
        /// Method used to start the test connection status Thread.
        /// Makes a series of calls to test the connection on the server.
        /// </summary>
        /// <param name="_ts"> TargetInfo of an individual target </param>
        private void testAllTargets(object targetSettings)
        {
            ThreadObject    tObj       = (ThreadObject)targetSettings;
            string          strProName = tObj.StrProName;
            TargetSettings  ts         = tObj.Ts;
            string          strTarget  = ts.TargetServer;
            CheckConnection cc         = new CheckConnection(ts);

            if (cc.pingConnections() == true)
            {
                _tabInterface.updateStatus(strProName, strTarget, "Testing FTP Settings");

                if (cc.checkFTP() == true)
                {
                    _tabInterface.updateStatus(strProName, strTarget, "Retrieving Site Name");

                    if (cc.checkSiteName() == true)
                    {
                        _tabInterface.updateStatus(strProName, strTarget, "Ready");
                    }
                    else
                    {
                        _tabInterface.updateStatus(strProName, strTarget, "Could not retrieve site name");
                    }
                }
                else
                {
                    _tabInterface.updateStatus(strProName, strTarget, "FTP settings error");
                }
            }
            else
            {
                _tabInterface.updateStatus(strProName, strTarget, "Could not contact server"); //Target IP is not reachable, set status to 'Connection Failed'
            }
        }
예제 #2
0
        ///
        /// <summary>
        /// Tests the connectivity of a project's targets
        /// </summary>
        /// <param name="_strProName">Project name</param>
        public void testConnections(string strProName)
        {
            List <TargetSettings> targetList = getTargets(strProName);         //Fetches all IP targets from project

            foreach (TargetSettings ts in targetList)
            {
                _tabInterface.updateStatus(strProName, ts.TargetServer, "Testing"); //Sets status to "Testing"
                ThreadObject tObj   = new ThreadObject(strProName, ts);
                Thread       thread = new Thread(testAllTargets);                   //Creates a Thread for every target
                thread.Start(tObj);
            }
        }
예제 #3
0
        ///
        /// <summary>
        /// Tests the connectivity of a project's targets
        /// </summary>
        /// <param name="_strProName">Project name</param>
        public void testConnections(string strProName)
        {
            List<TargetSettings> targetList = getTargets(strProName);                //Fetches all IP targets from project

              foreach(TargetSettings ts in targetList)
              {
            _tabInterface.updateStatus(strProName, ts.TargetServer, "Testing");         //Sets status to "Testing"
            ThreadObject tObj = new ThreadObject(strProName, ts);
            Thread thread = new Thread(testAllTargets);                               //Creates a Thread for every target
            thread.Start(tObj);
              }
        }