public void StartServiceIfNeeded(string i_ServiceName) { eServiceStatus serviceStatus = m_ServiceUtilites.GetServiceStatus(i_ServiceName); if (serviceStatus == eServiceStatus.Running) { ConsoleHelper.WriteInfo("[Service] : " + i_ServiceName + " [Status]: Running, [Action] : Ignoring."); } else if (serviceStatus == eServiceStatus.Stopped) { ConsoleHelper.WriteError("[Service] : " + i_ServiceName + " [Status]: Stopped, [Action] : Starting service."); m_ServiceUtilites.StartService(i_ServiceName); } else { ConsoleHelper.WriteError("[Service] : " + i_ServiceName + " [Status]: " + Enum.GetName(typeof(eServiceStatus), serviceStatus) + " , [Action] : waiting 10 seconds and Starting service again."); Thread.Sleep(TimeSpan.FromSeconds(10)); if (!m_WaitingForService) { m_WaitingForService = true; m_ServiceUtilites.StartService(i_ServiceName); } else { ConsoleHelper.WriteError("[Service] : " + i_ServiceName + " [Status]: " + Enum.GetName(typeof(eServiceStatus), serviceStatus) + " , [Action] : service is still down , ignoring ."); } m_WaitingForService = false; } }
private void ProcessorOnProcessStateChange(eServiceStatus status, string processState) { try { TabControl tabMain = MainForm.Controls.Find("tabMain", true).FirstOrDefault() as TabControl; TabPage currentTab = tabMain.TabPages[ID.ToString()]; this.Invoke((MethodInvoker) delegate() { currentTab.Text = processState; if (processState != "reconnecting...") { var isnProfile = Processor.IsnEngine.GetAccountProfile(); if (isnProfile == null) { return; } lblSboStatus.Text = Processor.IsnEngine.AccountStatus.ToString(); lblSboRealDomain.Text = "http://isn01.com"; lblSboCreadit.Text = isnProfile.betCredit.ToString(); lblSboCashBalance.Text = isnProfile.cashBalance.ToString(); //var ibetProfile = Processor.PiEngine.GetAccountProfile(); //lblIbetStatus.Text = "ONLINE";//Processor.PiEngine.AccountStatus.ToString(); //lblIbetRealDomain.Text = ibetProfile.UrlHost; //lblIbetCreadit.Text = ibetProfile.AvailabeCredit.ToString(); //lblIbetCashBalance.Text = ibetProfile.CashBalance.ToString(); } }); } catch (Exception ex) { Logger.Error("ProcessorOnProcessStateChange: " + ex.Message); } }
//public static List<IbetSubEngine> IbetScanEngines = new List<IbetSubEngine>(); public void Start() { IsReConnect = false; Status = eServiceStatus.Started; StartSbo(); //StartIbet(ibetUrl); }
public void Start(eScanType scanType) { IsReConnect = false; Status = eServiceStatus.Started; ScanType = scanType; StartSbo(); //StartIbet(ibetUrl); }
public void Start(string ibetUrl, string sboUrl) { Status = eServiceStatus.Started; IbetUrl = ibetUrl; SboUrl = sboUrl; StartIbet(ibetUrl); StartSbo(sboUrl); }
private void FireProcessStateChange(eServiceStatus status, string desc) { Task.Run(() => { if (OnProcessStateChange != null) { OnProcessStateChange(status, desc); } }); }
//public static List<IbetSubEngine> IbetScanEngines = new List<IbetSubEngine>(); public void Start(int timeSboLiveScan) { if (DataContainer.SboScanAccounts == null || !DataContainer.SboScanAccounts.Any()) { return; } TimeSboLiveScan = timeSboLiveScan; IsReConnect = false; Status = eServiceStatus.Started; StartSbo(); //StartIbet(ibetUrl); }
public void Start(eScanType scanType) { Status = eServiceStatus.Started; ScanType = scanType; //DataContainer.SourceIpFakes = IpData.SourceIp; if (ScanData.IpAddress != null && ScanData.IpAddress.Any()) { _useRealIp = true; } StartLoginSbo(); StartIbet(); StartSbo(); Logger.Info("KHOI DONG SCAN THANH CONG!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); }
private void ProcessorOnOnProcessStateChange(eServiceStatus status, string processState) { TabControl tabMain = MainForm.Controls.Find("tabMain", true).FirstOrDefault() as TabControl; TabPage currentTab = tabMain.TabPages[ID.ToString()]; this.Invoke((MethodInvoker) delegate() { currentTab.Text = processState; if (processState != "reconnecting...") { var sboProfile = Processor.SboEngine.GetAccountProfile(); lblSboStatus.Text = Processor.SboEngine.AccountStatus.ToString(); lblSboRealDomain.Text = sboProfile.UrlHost; lblSboCreadit.Text = sboProfile.AvailabeCredit.ToString(); lblSboCashBalance.Text = sboProfile.CashBalance.ToString(); //var ibetProfile = Processor.PiEngine.GetAccountProfile(); //lblIbetStatus.Text = "ONLINE";//Processor.PiEngine.AccountStatus.ToString(); //lblIbetRealDomain.Text = ibetProfile.UrlHost; //lblIbetCreadit.Text = ibetProfile.AvailabeCredit.ToString(); //lblIbetCashBalance.Text = ibetProfile.CashBalance.ToString(); } }); }