Ejemplo n.º 1
0
        public ControlForm1()
        {
            //mService = service;
            srvmgr = new NTPServersManager();
            tsru   = TimeStampRegistryUtil.getInstance();
            InitializeComponent();
            slc = ServiceLogController.getInstance();
            this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1;
            pww = new PollWorkerWaiting();

            /*
             * this.Hide();
             * this.WindowState = FormWindowState.Minimized;
             * this.ShowInTaskbar = false;*/
            HideForm();
            app_exit   = false;
            form_close = true;
            service_log_poll_worker = new BackgroundWorker();
            service_log_poll_worker.WorkerReportsProgress      = false;
            service_log_poll_worker.WorkerSupportsCancellation = true;
            service_log_poll_worker.DoWork += new DoWorkEventHandler(pollworker);
            //service_log_poll_worker.ProgressChanged += new ProgressChangedEventHandler(worker_ProgressChanged);
            //service_log_poll_worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
            service_status_progress_updater = new BackgroundWorker();
            service_status_progress_updater.WorkerReportsProgress      = true;
            service_status_progress_updater.WorkerSupportsCancellation = true;
            service_status_progress_updater.DoWork          += new DoWorkEventHandler(ServiceStatusUpdate);
            service_status_progress_updater.ProgressChanged += new ProgressChangedEventHandler(ServiceStatus_ProgressUpdated);
            service_status_confirmation = new BackgroundWorker();
            service_status_confirmation.WorkerReportsProgress      = true;
            service_status_confirmation.WorkerSupportsCancellation = true;
            service_status_confirmation.DoWork          += new DoWorkEventHandler(ServiceStatusProgressUpdate);
            service_status_confirmation.ProgressChanged += new ProgressChangedEventHandler(ServiceStatusProgressUpdate_ProgressUpdated);
        }
Ejemplo n.º 2
0
 private void init()
 {
     mHostList          = new ArrayList();
     mPortList          = new ArrayList();
     hostport_semaphore = new System.Threading.Semaphore(1, 1);
     //String strconn = "Data Source="+AppDomain.CurrentDomain.BaseDirectory + "ntp_servers.db"; //@"Data Source=C:\Users\황세현삼성놋9\Desktop\TimeSync\TimeSync\bin\Debug\ntp_servers.db";
     sqlite_conn = new NTPServersManager().getConnection(); //new SQLiteConnection(strconn);
 }