示例#1
0
        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);
        }
示例#2
0
        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();
        }
示例#4
0
        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;
            }
        }
示例#5
0
        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;
            }
        }
示例#6
0
        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);
        }
示例#7
0
        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));
        }
示例#8
0
 public static void RemoveActiveClient(ClientThread clientThread)
 {
     clients.Remove(clientThread);
 }
示例#9
0
 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();
        }