예제 #1
0
파일: MainGUI.cs 프로젝트: maesse/NZBHags
 public MainGUI()
 {
     InitializeComponent();
     logHandler = new LogHandler(LogString);
     handler = QueueHandler.Instance;
     flowLayoutPanel1.Controls.Add(new EmptyQueue(this));
     server = new NewsServer();
     graphGUI = new GraphGUI();
     panelGraph.Controls.Add(graphGUI);
     Logging.Instance.maingui = this;
 }
예제 #2
0
        public NNTPConnection(int id, NewsServer serverInfo, QueueHandler handler)
        {
            this.id = id;
            this.serverInfo = serverInfo;
            this.handler = handler;
            keepAlive = true;
            sw = new Performance.Stopwatch();

            // Register connection in SpeedMonitor
            SpeedMonitor.Instance.RegisterConnection(this);

            ThreadStart job = new ThreadStart(Run);
            Thread thread = new Thread(job);
            thread.IsBackground = true;
            thread.Start();
        }