Пример #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);
        }
Пример #2
0
 public static ServiceLogController getInstance()
 {
     if (mInstance == null)
     {
         mInstance = new ServiceLogController();
     }
     return(mInstance);
 }