Ejemplo n.º 1
0
        public void startClient(TcpClient inClientSocket, int _clientNumber, List <ClientHandler> _clients, Label _labelOnline, Label _labelOffline, ListViewMachinesAndTasksHandler _listViewMachinesAndTasksHandler, List <ExecutedTaskHandler> _executedTasksHandlers, Label _labelAllClients)
        {
            this.clientSocket = inClientSocket;
            this.clientNumber = _clientNumber;
            this.offline      = false;
            this.clients      = _clients;
            this.labelOnline  = _labelOnline;
            this.labelOffline = _labelOffline;
            this.listViewMachinesAndTasksHandler = _listViewMachinesAndTasksHandler;
            this.executedTasksHandlers           = _executedTasksHandlers;
            this.labelAllClients = _labelAllClients;
            Thread ctThread = new Thread(doChat);

            computerData = new ComputerDetailsData();
            ctThread.Start();
        }
Ejemplo n.º 2
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     CheckDirectories();
     treeViewMachinesAndTasksHandler = new TreeViewHandler(treeViewMachinesAndTasks);
     listViewMachinesAndTasksHandler = new ListViewMachinesAndTasksHandler(listViewMachineGroups, listViewTasks, treeViewMachinesAndTasksHandler);
     listViewTaskDetailsHandler      = new ListViewTaskDetailsHandler(listViewTasksDetails);
     listViewMachinesAndTasksHandler.LoadTreeViewMachinesAndTasks();
     listViewTaskDetailsHandler.LoadTasksDetails();
     ExecutedTasksHandlers = new List <ExecutedTaskHandler>();
     listener = new Listener();
     listener.executedTasksHandlers           = ExecutedTasksHandlers;
     listener.labelOnlineClients              = labelOnline;
     listener.labelOfflineClients             = labelOffilne;
     listener.labelAllClients                 = labelClients;
     listener.listViewMachinesAndTasksHandler = listViewMachinesAndTasksHandler;
     listener.clientsAll = Directory.GetFiles(@".\Machine Groups\", "*.my", SearchOption.AllDirectories).Length;
     LoadIpAddresses();
     listener.StartListener();
     //Server = new Thread(listener.StartListener);
     //Server.Start();
 }