Пример #1
0
 private static ControlFactory Instance()
 {
     if (singleton == null)
     {
         singleton = new ControlFactory();
     }
     return(singleton);
 }
Пример #2
0
 public Main()
 {
     logger = LoggerBuilder.Init().Set(GetType()).Info("Broker Program Start");
     ControlFactory.SetForm(this);
     InitializeComponent();
     SetConnection(false);
     SetMessage(false);
 }
Пример #3
0
        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);
        }
Пример #4
0
 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);
     };
 }