public MainWindow()
        {
            InitializeComponent();
            initializeEnvironment();
            Console.Title       = "Navigator Client";
            fileMgr             = FileMgrFactory.create(FileMgrType.Local);
            fileMgr.currentPath = "";

            comm = new Comm(ClientEnvironment.address, ClientEnvironment.port);
            initializeMessageDispatcher();

            CommMessage msg1 = new CommMessage(CommMessage.MessageType.request);

            msg1.from    = ClientEnvironment.endPoint;
            msg1.to      = ServerEnvironment.endPoint;
            msg1.author  = "Jim Fawcett";
            msg1.command = "getTopFiles";
            msg1.arguments.Add("");
            comm.postMessage(msg1);
            CommMessage msg2 = msg1.clone();

            msg2.command = "getTopDirs";
            comm.postMessage(msg2);
            SCBox.Clear();
            rcvThread = new Thread(rcvThreadProc);
            rcvThread.Start();
        }
コード例 #2
0
 //------< function to automate GUI >----------
 public void automate()
 {
     InitializeComponent();
     initializeEnvironment();
     Console.Title = "Code Analyzer Client";
     Console.WriteLine("Listening on port: " + ClientEnvironment.port);
     fileMgr = FileMgrFactory.create(FileMgrType.Local); // uses Environment
     comm    = new Comm(ClientEnvironment.address, ClientEnvironment.port);
     initializeMessageDispatcher1();
     initializeMessageDispatcher2();
     initializeMessageDispatcher3();
     rcvThread = new Thread(rcvThreadProc);
     rcvThread.Start();
     Thread.Sleep(2000);
     connectServ();
     Thread.Sleep(2000);
     get_files();
     Thread.Sleep(3000);
     add_files_auto();
     Thread.Sleep(3000);
     analyze();
     Thread.Sleep(3000);
     get_typetable();
     RemoteGetTypetable.IsSelected = true;
     Thread.Sleep(3000);
     get_dependency();
     RemoteGetDependency.IsSelected = true;
     Thread.Sleep(3000);
     get_Scc();
     RemoteGetScc.IsSelected = true;
 }
コード例 #3
0
 public MainWindow()
 {
     InitializeComponent();
     initializeEnvironment();
     Console.Title = "Navigator Client";
     fileMgr       = FileMgrFactory.create(FileMgrType.Local); // uses Environment
     comm          = new Comm(ClientEnvironment.address, ClientEnvironment.port);
     initializeMessageDispatcher();
     getFile();
     rcvThread = new Thread(rcvThreadProc);
     rcvThread.Start();
 }
コード例 #4
0
        // The main window will be created in this method
        public MainWindow()
        {
            InitializeComponent();
            initializeEnvironment();
            fileMgr = FileMgrFactory.create(FileMgrType.Local); // uses Environment
            comm    = new Comm(ClientEnvironment.address, ClientEnvironment.port);
            initializeMessageDispatcher();
            rcvThread = new Thread(rcvThreadProc);
            rcvThread.Start();
            // creat a message for first responce so that the later message could successfully sent and being responed.
            CommMessage try_con = new CommMessage(CommMessage.MessageType.connect);

            try_con.from = ClientEnvironment.endPoint;
            try_con.to   = ServerEnvironment.endPoint;
            comm.postMessage(try_con);
        }
コード例 #5
0
 public MainWindow()
 {
     InitializeComponent();
     initializeEnvironment();
     Console.Title = "Client";
     fileMgr       = FileMgrFactory.create(FileMgrType.Local); // uses Environment
     comm          = new Comm(ClientEnvironment.address, ClientEnvironment.port);
     initializeMessageDispatcher();
     DepAnalysisBtn.IsEnabled = false;
     StrngCompBtn.IsEnabled   = false;
     rcvThread    = new Thread(rcvThreadProc);
     checkedStuff = new List <string>();
     rcvThread.Start();
     remoteTopClick();
     DemonstrateATU();
 }
コード例 #6
0
 public MainWindow()
 {
     Thread.Sleep(500);
     InitializeComponent();
     //initializeEnvironment();
     fileMgr = FileMgrFactory.create(FileMgrType.Local); // uses Environment
     comm    = new Comm("http://localhost", 8083);
     getTopFiles();
     getXmlFiles();
     initializeMessageDispatcher();
     initializeMessageDispatcher1();
     //Thread.Sleep(1000);
     automate();
     rcvThread = new Thread(rcvThreadProc);
     rcvThread.Start();
 }
コード例 #7
0
        public MainWindow()
        {
            InitializeComponent();
            initializeEnvironment();
            Console.Title = "file_browser Client";
            fileMgr       = FileMgrFactory.create(FileMgrType.Local); // uses Environment
            getTopFiles();
            comm = new Comm(ClientEnvironment.address, ClientEnvironment.port);
            initializeMessageDispatcher();
            rcvThread = new Thread(rcvThreadProc);
            rcvThread.Start();
            CommMessage try_con = new CommMessage(CommMessage.MessageType.connect);

            try_con.from = ClientEnvironment.endPoint;
            try_con.to   = ServerEnvironment.endPoint;
            comm.postMessage(try_con);
        }
コード例 #8
0
ファイル: FileManager.cs プロジェクト: ZzzGin/build-server
            List<string> dirs = new List<string>();
            string path = Path.Combine(BuildEnvironment.Environment.root, currentPath);
            dirs = Directory.GetDirectories(path).ToList<string>();
            for (int i = 0; i < dirs.Count(); ++i)
            {
                string dirName = new DirectoryInfo(dirs[i]).Name;
                dirs[i] = Path.Combine(currentPath, dirName);
            }
            return dirs;
        }
        //----< sets value of current directory - not used >-------------

        public bool setDir(string dir)
        {
            if (!Directory.Exists(dir))
                return false;
            currentPath = dir;
            return true;
        }
コード例 #9
0
ファイル: FileMgr.cs プロジェクト: sachinbs/RemoteBuildServer
        static void Main(string[] args)
        {
            IFileMgr localFileMgr = FileMgrFactory.create(FileMgrType.Local);

            List <string> List1 = new List <string>();
            List <string> List2 = new List <string>();

            List1 = localFileMgr.getFiles().ToList <string>();
            List2 = localFileMgr.getFiles().ToList <string>();

            Console.WriteLine("Displaying the list of files\n");
            foreach (string file in List1)
            {
                Console.WriteLine("{0}\n", file);
            }

            Console.WriteLine("Displaying the list of directories\n");
            foreach (string file in List2)
            {
                Console.WriteLine("{0}\n", file);
            }
        }
コード例 #10
0
        //Constructor- Initializing Components here and setting up the environment
        public MainWindow()
        {
            InitializeComponent();
            initializeEnvironment();

            Console.Title = "Client";
            fileMgr       = FileMgrFactory.create(FileMgrType.Local); // uses Environment
            //getTopFiles();
            comm = new Comm(ClientEnvironment.address, ClientEnvironment.port);
            initializeMessageDispatcher();

            rcvThread = new Thread(rcvThreadProc);
            rcvThread.Start();
            try
            {
                AutomaticTestSuite();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
コード例 #11
0
        public MainWindow()
        {
            InitializeComponent();
            RemoteUp.IsEnabled  = false;
            Add.IsEnabled       = false;
            Remove.IsEnabled    = false;
            tt.IsEnabled        = false;
            dt.IsEnabled        = false;
            sc.IsEnabled        = false;
            RemoveAll.IsEnabled = false;
            string path = System.IO.Path.GetFullPath("../../../ServerFiles/");

            fullPath.Text = path;
            initializeEnvironment();
            Console.Title = "Client";
            fileMgr       = FileMgrFactory.create(FileMgrType.Local);
            comm          = new Comm(ClientEnvironment.address, ClientEnvironment.port);
            initializeMessageDispatcher();
            rcvThread = new Thread(rcvThreadProc);
            rcvThread.Start();
            automatedDemo();
        }
コード例 #12
0
        //<----------  This constructor opens up the GUI ----------->

        public MainWindow()
        {
            // automate();
            //GetDependency.IsEnabled = false;
            //Typetable.IsEnabled = false;
            //GetScc.IsEnabled = false;
            //Add_Files.IsEnabled = false;
            //Analyze.IsEnabled = false;
            //Clear.IsEnabled = false;
            //RemoteUp.IsEnabled = true;
            //remoteDirs.IsEnabled = false;
            initializeEnvironment();
            Console.Title = "Code Analyzer Client";
            fileMgr       = FileMgrFactory.create(FileMgrType.Local); // uses Environment
            comm          = new Comm(ClientEnvironment.address, ClientEnvironment.port);
            initializeMessageDispatcher1();
            initializeMessageDispatcher2();
            initializeMessageDispatcher3();
            rcvThread = new Thread(rcvThreadProc);
            connectServ();
            rcvThread.Start();
        }
コード例 #13
0
        public MainWindow()
        {
            InitializeComponent();
            initializeEnvironment();
            Console.Title = "Analyzer Client Console";
            fileMgr       = FileMgrFactory.create(FileMgrType.Local); // uses Environment
            getTopFiles();

            comm = new Comm(ClientEnvironment.address, ClientEnvironment.port);
            initializeMessageDispatcher();
            rcvThread = new Thread(rcvThreadProc);
            rcvThread.Start();

#if (Client_Test)
            testingThread = new Thread(Testing);
            testingThread.Start();
#endif

            /*
             * tabControl.SelectedIndex = 1;  // moves to second tab
             */
        }
コード例 #14
0
 public MainWindow()
 {
     InitializeComponent();
     RemoteUp.IsEnabled             = false;
     AddFile.IsEnabled              = false;
     RemoveFile.IsEnabled           = false;
     Analyse.IsEnabled              = false;
     remoteDirs.IsEnabled           = false;
     remoteFiles.IsEnabled          = false;
     selectedFilesDisplay.IsEnabled = false;
     typeTableButton.IsEnabled      = false;
     dependencyButton.IsEnabled     = false;
     sccButton.IsEnabled            = false;
     initializeEnvironment();
     Console.Title = "Client";
     fileMgr       = FileMgrFactory.create(FileMgrType.Local);
     comm          = new Comm(ClientEnvironment.address, ClientEnvironment.port);
     initializeMessageDispatcher();
     rcvThread = new Thread(rcvThreadProc);
     rcvThread.Start();
     connect();
 }
コード例 #15
0
        /*----< initialize server processing >-------------------------*/

        public NavigatorServer()
        {
            initializeEnvironment();
            Console.Title = "Navigator Server";
            localFileMgr  = FileMgrFactory.create(FileMgrType.Local);
        }
コード例 #16
0
        /*----< initialize server processing >-------------------------*/

        public AnalyzerServer()
        {
            initializeEnvironment();
            Console.Title = "Analyzer Server Console";
            localFileMgr  = FileMgrFactory.create(FileMgrType.Local);
        }