コード例 #1
0
ファイル: MainClient.cs プロジェクト: kennyboy55/ErgometerIPR
        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
ファイル: MainClient.cs プロジェクト: kennyboy55/ErgometerIPR
        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));
        }
コード例 #3
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();
        }
コード例 #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
ファイル: MainClient.cs プロジェクト: kennyboy55/ErgometerIPR
        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
ファイル: MainClient.cs プロジェクト: kennyboy55/ErgometerIPR
        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
ファイル: MainClient.cs プロジェクト: kennyboy55/ErgometerIPR
 public static void RemoveActiveClient(ClientThread clientThread)
 {
     clients.Remove(clientThread);
 }
コード例 #9
0
ファイル: MainClient.cs プロジェクト: kennyboy55/ErgometerIPR
 public static void RemoveActiveClient(ClientThread clientThread)
 {
     clients.Remove(clientThread);
 }
コード例 #10
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();
        }