private void button4_Click(object sender, EventArgs e) { if (_taskProcessor == null || _taskProcessor.IsStopped) { StartProcess(_taskProcessor = new ServiceThreadPool <TaskProcessor>("TaskProcessor"), sender as Button); } else { StopProcess(_taskProcessor, sender as Button); } }
private void button3_Click_1(object sender, EventArgs e) { if (_tokTranscoder == null || _tokTranscoder.IsStopped) { StartProcess(_tokTranscoder = new ServiceThreadPool <TokTranscoder>("TokTranscoder"), sender as Button); } else { StopProcess(_tokTranscoder, sender as Button); } }
private void btnEmailProcessor_Click(object sender, EventArgs e) { if (_emailProcessor == null || _emailProcessor.IsStopped) { StartProcess(_emailProcessor = new ServiceThreadPool <EmailProcessor>("EmailProcessor"), sender as Button); } else { StopProcess(_emailProcessor, sender as Button); } }
private void btnReportSender_Click(object sender, EventArgs e) { if (_reportSender == null || _reportSender.IsStopped) { StartProcess(_reportSender = new ServiceThreadPool <ReportSender>("ReportSender"), sender as Button); } else { StopProcess(_reportSender, sender as Button); } }
private ServiceThread GetServiceThread() { ServiceThread result = null; switch (ServiceName) { case "TSEmailProcessor": result = new ServiceThreadPool <EmailProcessor>("EmailProcessor"); break; case "TSEmailSender": result = new ServiceThreadPool <EmailSender>("EmailSender"); break; case "TSSlaProcessor": result = new SlaProcessor(); break; case "TSSlaCalculator": result = new SlaCalculator(); break; case "TSIndexer": result = new ServiceThreadPool <Indexer>("Indexer"); break; case "TSIndexRebuilder": result = new ServiceThreadPool <Indexer>("Indexer"); break; case "TSCrmPool": result = new CrmPool(SystemUser.CRM); break; case "TSReminderProcessor": result = new ReminderProcessor(); break; case "TSImportProcessor": result = new ImportProcessor(); break; case "TSWebHooksProcessor": result = new WebHooksPool(SystemUser.CRM); break; case "TSCustomerInsights": result = new CustomerInsightsProcessor(); break; case "TSReportSender": result = new ServiceThreadPool <ReportSender>("ReportSender"); break; case "TokTranscoder": result = new ServiceThreadPool <TokTranscoder>("TokTranscoder"); break; case "TSTaskProcessor": result = new ServiceThreadPool <TaskProcessor>("TaskProcessor"); break; default: result = null; break; } return(result); }