示例#1
0
文件: MainForm.cs 项目: donkz/extraQL
        public MainForm(Config config, Updater updater)
        {
            InitializeComponent();

              this.config = config;
              this.updater = updater;
              this.LoadSettings();
              base.Text = base.Text + " " + Version;
              this.lblVersion.Text = Version;
              this.lblExtra.Parent = this.picLogo;
              this.lblVersion.Parent = this.picLogo;
              this.trayIcon.Icon = this.Icon;

              this.server = new HttpServer(config.AppBaseDir + @"\https\localhost.pfx");
              this.server.BindToAllInterfaces = this.cbBindToAll.Checked;
              this.server.UseHttps = this.cbHttps.Checked;
              this.server.LogAllRequests = this.cbLogAllRequests.Checked;

              this.scriptRepository = new ScriptRepository(config.AppBaseDir);
              this.scriptRepository.Log = this.Log;

              this.servlets = new Servlets(this.server, this.scriptRepository, this.Log, this, config.AppBaseDir);
              this.UpdateServletSettings();

              this.ActiveControl = this.comboEmail;
        }
示例#2
0
文件: Servlets.cs 项目: donkz/extraQL
 public Servlets(HttpServer server, ScriptRepository scriptRepository, Action<string> logger, Form form, string baseDir)
 {
     this.server = server;
       this.scriptRepository = scriptRepository;
       this.form = form;
       this.EnableScripts = true;
       this.EnablePrivateServlets = true;
       server.Log = logger;
       this.Log = server.Log;
       this.baseDir = baseDir;
       RegisterServlets();
 }
示例#3
0
        public MainForm(Config config)
        {
            InitializeComponent();

              this.config = config;
              this.LoadSettings();
              base.Text = base.Text + " " + Version;
              this.lblVersion.Text = Version;
              this.lblExtra.Parent = this.picLogo;
              this.lblVersion.Parent = this.picLogo;
              this.trayIcon.Icon = this.Icon;

              this.server = new HttpServer(null);
              this.server.BindToAllInterfaces = this.cbBindToAll.Checked;
              this.server.LogAllRequests = this.cbLogAllRequests.Checked;

              this.scriptRepository = new ScriptRepository(config.AppBaseDir);
              this.scriptRepository.Log = this.Log;

              this.servlets = new Servlets(this.server, this.scriptRepository, this.Log, this, config.AppBaseDir);
              this.UpdateServletSettings();

              this.ActiveControl = this.btnStartQL;
        }