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