예제 #1
0
        private void onPingLoop_loadingUp(object sender, EventArgs e)
        {
            PingLoop ping = (PingLoop)sender;

            Invoke((endDelegate)show, sender);
            Invoke((updateProgressBarDelegate)updateProgressBar, ping.progressPercentage);
        }
예제 #2
0
        private void buttonStart_Click(object sender, EventArgs e)
        {
            if (buttonStart.Text != "Stop")
            {
                request = new PingLoop(inputAdresse.Text, int.Parse(inputTime.Text));
                int.Parse(inputLatency.Text);
                request.defineQuery(int.Parse(inputBuffer.Text), int.Parse(inputLatency.Text));
                request.endRunEvent    += onPingLoop_endRun;
                request.loadingUpEvent += onPingLoop_loadingUp;

                progressBar.Visible = true;
                progressBar.Value   = 0;
                buttonStart.Text    = "Stop";
                chartGestion.init(0);

                thread = new Thread(new ThreadStart(request.run));
                thread.Start();
            }
            else
            {
                request.stop();
                buttonStart.Text    = "Stopping";
                buttonStart.Enabled = false;
            }
        }
예제 #3
0
        private void end(object sender)
        {
            PingLoop ping = (PingLoop)sender;

            progressBar.Visible = false;
            chartGestion.update(0, ping.logPing);
            buttonStart.Text    = "Start";
            buttonStart.Enabled = true;
        }
예제 #4
0
        private void show(object sender)
        {
            PingLoop ping = (PingLoop)sender;

            chartGestion.update(0, ping.logPing);
        }