public static void StartOldClient(string name, int session) { if (IsSessionRunning(session)) { return; } //Start new client ClientThread cl = new ClientThread(name, session, true); clients.Add(cl); //Run client on new thread Thread thread = new Thread(new ThreadStart(cl.run)); thread.IsBackground = true; thread.Start(); SendNetCommand(new NetCommand(NetCommand.RequestType.OLDDATA, session)); Thread.Sleep(5); SendNetCommand(new NetCommand(NetCommand.RequestType.CHAT, session)); Thread.Sleep(5); SendNetCommand(new NetCommand(NetCommand.RequestType.PERSONALDATA, session)); Thread.Sleep(5); SendNetCommand(new NetCommand(NetCommand.RequestType.TESTRESULT, session)); Thread.Sleep(5); }
public static void StartNewClient(string name, int session) { if (IsSessionRunning(session)) { return; } //Start new client ClientThread cl = new ClientThread(name, session, false); clients.Add(cl); //Run client on new thread Thread thread = new Thread(new ThreadStart(cl.run)); thread.IsBackground = true; thread.Start(); Thread.Sleep(5); List <NetCommand> sessionbacklog = GetBacklogForSession(session); for (int i = sessionbacklog.Count - 1; i >= 0; i--) { cl.HandleCommand(sessionbacklog[i]); } Thread.Sleep(5); SendNetCommand(new NetCommand(NetCommand.RequestType.PERSONALDATA, session)); }
public static void StartNewClient(string name, int session) { if (IsSessionRunning(session)) { return; } //Start new client ClientThread cl = new ClientThread(name, session, false); clients.Add(cl); //Run client on new thread Thread thread = new Thread(new ThreadStart(cl.run)); thread.IsBackground = true; thread.Start(); }
public SessionWindow(string ClientName, bool old, int session, ClientThread parentthread) { this.ActiveSession = !old; this.ClientName = ClientName; this.client = parentthread; Session = session; count = 0; updateMetingen = new UpdateMetingen(this.SaveMeting); updateGraph = new UpdateGraph(this.LoadGraph); InitializeComponent(); if(! ActiveSession) { panelClientChat.richTextBox1.Enabled = false; panelClientChat.button1.Enabled = false; panelDataViewLeft.Visible = false; } }
public SessionWindow(string ClientName, bool old, int session, ClientThread parentthread) { this.ActiveSession = !old; this.ClientName = ClientName; this.client = parentthread; Session = session; count = 0; updateMetingen = new UpdateMetingen(this.SaveMeting); updateGraph = new UpdateGraph(this.LoadGraph); InitializeComponent(); if (!ActiveSession) { panelClientChat.richTextBox1.Enabled = false; panelClientChat.button1.Enabled = false; panelDataViewLeft.Visible = false; } }
public static void StartOldClient(string name, int session) { if (IsSessionRunning(session)) return; //Start new client ClientThread cl = new ClientThread(name, session, true); clients.Add(cl); //Run client on new thread Thread thread = new Thread(new ThreadStart(cl.run)); thread.IsBackground = true; thread.Start(); SendNetCommand(new NetCommand(NetCommand.RequestType.OLDDATA, session)); Thread.Sleep(5); SendNetCommand(new NetCommand(NetCommand.RequestType.CHAT, session)); Thread.Sleep(5); SendNetCommand(new NetCommand(NetCommand.RequestType.PERSONALDATA, session)); Thread.Sleep(5); SendNetCommand(new NetCommand(NetCommand.RequestType.TESTRESULT, session)); Thread.Sleep(5); }
public static void StartNewClient(string name, int session) { if (IsSessionRunning(session)) return; //Start new client ClientThread cl = new ClientThread(name, session, false); clients.Add(cl); //Run client on new thread Thread thread = new Thread(new ThreadStart(cl.run)); thread.IsBackground = true; thread.Start(); Thread.Sleep(5); List<NetCommand> sessionbacklog = GetBacklogForSession(session); for (int i = sessionbacklog.Count - 1; i >= 0; i--) { cl.HandleCommand(sessionbacklog[i]); } Thread.Sleep(5); SendNetCommand(new NetCommand(NetCommand.RequestType.PERSONALDATA, session)); }
public static void RemoveActiveClient(ClientThread clientThread) { clients.Remove(clientThread); }
public static void StartNewClient(string name, int session) { if (IsSessionRunning(session)) return; //Start new client ClientThread cl = new ClientThread(name, session, false); clients.Add(cl); //Run client on new thread Thread thread = new Thread(new ThreadStart(cl.run)); thread.IsBackground = true; thread.Start(); }