Пример #1
0
 public void CopyTo(MonitorCfg cfg)
 {
     cfg.ProcessName = ProcessName;
     cfg.AppName     = AppName;
     cfg.DelayTime   = DelayTime;
     cfg.Interval    = Interval;
 }
Пример #2
0
        public void ReadCfg(string path)
        {
            string     json = File.ReadAllText(path);
            MonitorCfg cfg  = JsonUtility.Decode <MonitorCfg>(json);

            cfg.CopyTo(this);
        }
Пример #3
0
 private static void WriteCfg()
 {
     MonitorCfg             = new MonitorCfg();
     MonitorCfg.ProcessName = "xuyouji";
     MonitorCfg.AppName     = "虚游记";
     MonitorCfg.DelayTime   = 10000;
     MonitorCfg.Interval    = 1000;
     MonitorCfg.WriteCfg(CfgPath);
 }
Пример #4
0
 private static void ReadCfg()
 {
     MonitorCfg = new MonitorCfg();
     MonitorCfg.ReadCfg(CfgPath);
 }