コード例 #1
0
ファイル: Main.cs プロジェクト: tomarus/speedtest-cs
    public OVTest()
    {
        nc     = new NNTPClient();
        status = new StatusListener(nc);
        logform.SetLogHandler(nc);

        form.SetLatencyArticles("0 ms");
        form.SetSpeedArticles("0 kbps");
        form.SetSpeedXover("0 kbps");

        if (connect() == false)
        {
            return;
        }

        form.Statusbar = "Joining group";
        if (nc.Group(form.Newsgroup) == false)
        {
            form.Statusbar = nc.Response;
            return;
        }

        Thread newThread = new Thread(new ThreadStart(doovtests));

        newThread.Start();
    }
コード例 #2
0
ファイル: Main.cs プロジェクト: tomarus/speedtest-cs
    private void doovtests()
    {
        dotest_xover();

        logform.AppendText("Speedtest Starting");
        form.Statusbar = "Reconnecting..";
        nc.Close();
        connect();

        form.Statusbar = "Connected..";
        if (form.JoinGroup == true || form.ArtMethod == EArticleMethod.Numeric)
        {
            form.Statusbar = "Joining group";
            if (nc.Group(form.Newsgroup) == false)
            {
                form.Statusbar = nc.Response;
                return;
            }
        }
        form.Statusbar = "Initializing STAT test";
        dotest_stat();
        dotest_article();

        form.SetProgress(1);
        form.Statusbar = "Done";
        nc.Close();
        status.Detach();
    }