private static ControlFactory Instance() { if (singleton == null) { singleton = new ControlFactory(); } return(singleton); }
public Main() { logger = LoggerBuilder.Init().Set(GetType()).Info("Broker Program Start"); ControlFactory.SetForm(this); InitializeComponent(); SetConnection(false); SetMessage(false); }
public ScrapExecutor Run() { Parameter.Starttime = DateTime.Now; String param = this.Parameter.ToString(); byte[] buffer = Encoding.UTF8.GetBytes(param); base.StartInfo.Arguments = Convert.ToBase64String(buffer); base.Start(); this.logger.Info(" [NODE LOG] Scraper process Start " + param); ControlFactory.GetForm <Main>().SetGrid(this.Parameter); return(this); }
public void SetExecuter(ScrapExecutor process) { queue.Add(process); process.Exited += (s, e) => { //TODO : not call ScrapExecutor b = (ScrapExecutor)s; //TODO : ?? //ServerConnector.Instance().Send(b.ResponseCode.ToString()); ControlFactory.GetForm <Main>().RemoveGrid(b.Parameter); queue.Remove(b); }; }