/// <summary>
 /// //////////////////////////////////////////////////////////////
 /// analyzer call or the executive for analyzer project
 public void analyzercall(clientconnect cc)
 {
       if (analyzeproj_.Count == 0)
       {
       //    Console.Write("Please enter Command Line Arguments.\n\n");
           //return null;
       }
       Console.Write("\n\nCurrent path:\n {0}", Directory.GetCurrentDirectory());
       CommandLine.CommandLineProcessing clp = new CommandLine.CommandLineProcessing();
       string path = Directory.GetCurrentDirectory();
       path += "/Servers/TestProjects";           
       Console.Write("{0}",path);
       if(CodeAnalysis.Repository.getInstance()!=null)
           CodeAnalysis.Repository.clearInstance();  
       CodeAnalysis.FileMgr fm = new CodeAnalysis.FileMgr();
       string str2 = "";
       foreach (string str1 in cc.patt_)
           str2 += str1;
       string[] commandlinestr = {path,"/X",str2};
       clp.ProcessCommandLine(commandlinestr);
       fm.setrecurseflag(cc.recurse_);
       fm.findFiles(path);
       List<string> files = new List<string>();
       foreach (string str in fm.getFiles())
       {
           foreach (string str1 in cc.analproj_)
               if (str.Contains(str1))
                   files.Add(str);
       }            
       CodeAnalysis.Analyzer.doAnalysis(files.ToArray(), true);
       CodeAnalysis.Display dis = new CodeAnalysis.Display();
       dis.Displayfiles(files);     
       try
       {
           CodeAnalysis.XML xml = new CodeAnalysis.XML();
           dis.DisplayData(clp);
           if (clp.getxmlflag())
               xml.XMLWrite(clp.getrelationshipflag());
           var xmldoc = XDocument.Load("Output.xml");
           cc.data_ = xmldoc.ToString();
       }
       catch (Exception ex)
       {
           Console.Write("\n\n  {0}\n", ex.Message);
       }
 }
   /// <summary>
   /// /////////////////////////////////////////////////////////////
   /// Server Reciever thread
 public virtual void ThreadProc()    {
     Message msg = new Message();
     while (msg.text!="quit")        {
         msg = this.GetMessage();
         string data = msg.text;
         if (msg.text.Contains("GetProjects"))            {
             clientconnect cc = new clientconnect();
             cc.connected = true;
             data = data.Substring(data.IndexOf(":") + 1);
             cc.portno = data.Substring(0, data.IndexOf(":"));
             if (data.Length > data.IndexOf(":")+3)                {
                 string patt = data.Substring(data.IndexOf(":") + 1);
                 cc.patt_.Add(patt);
             }
             string data1="";
             foreach (string str in FieMgrMain("./../../TestProjects"))
                 data1 += str + " ";
             Thread.Sleep(500);
             connectedclients_.Add(cc);
             ServerSender(cc.portno,data1);
         }
         else            {
             foreach (clientconnect cc in connectedclients_)                {
                 if (cc.portno == data.Substring(0, data.IndexOf(":")))                    {
                     data=data.Substring(data.IndexOf(":")+1);
                     if (data.IndexOf(":") != -1)
                     {
                         cc.recurse_ = true;
                         data = data.Substring(0, data.IndexOf(":"));
                     }
                     cc.analproj_.Clear();
                     while (data.IndexOf(" ") != -1)
                     {
                         cc.analproj_.Add(data.Substring(0, data.IndexOf(" ")));
                         data=data.Substring(data.IndexOf(" ")+1);
                     }
                     analyzercall(cc);
                     ServerSender(cc.portno,cc.data_);
                     connectedclients_.Remove(cc);
                     break;
                 }
             }
         }
         //if (msg.text == "quit")
         //    msg.text = "";
     }
     msg.text = xmldata_;       
 }