示例#1
0
 private void InstallAppConfig()
 {
     tbIP.Text       = ConfigTool.Get("ip");
     tbPort.Text     = ConfigTool.Get("port");
     tbInterval.Text = ConfigTool.Get("interval");
     tbConCount.Text = ConfigTool.Get("connect");
     tbData.Text     = ConfigTool.Get("senddata");
 }
示例#2
0
        static void Main(string[] args)
        {
            TimerServiceConfig timerServiceConfig = ConfigTool.Get();

            HostFactory.Run(x =>
            {
                x.UseLog4Net();
                x.Service <ServiceRunner>();
                x.SetDescription(timerServiceConfig.Description);
                x.SetDisplayName(timerServiceConfig.DisplayName);
                x.SetServiceName(timerServiceConfig.ServiceName);
                x.EnablePauseAndContinue();
                x.StartAutomatically();
                x.RunAsLocalSystem();
            });
        }
示例#3
0
 public static void Init()
 {
     R.WakaTimeKey = ConfigTool.Get("WakaTimeKey", "");
 }