Ejemplo n.º 1
0
        public void AppEnable(object sender, CQAppEnableEventArgs e)
        {
            e.CQLog.Info("信息", "欢迎使用!");

            var dataDir    = e.CQApi.AppDirectory;
            var configPath = dataDir + "/config.json";

            ConfigWorker.Load(configPath);

            CoolRepeater.Api = e.CQApi;

            ConfigWorker.Save(ConfigWorker.Path);

            e.CQLog.Info("信息", "配置文件加载完成。");
        }
        private void buttonSave_Click(object sender, EventArgs e)
        {
            CoolRepeater.EnabledGroups.Clear();
            foreach (var item in listBoxEnableGroup.Items)
            {
                CoolRepeater.EnabledGroups.Add(long.Parse(item.ToString()));
            }

            CoolRepeater.DisabledGroups.Clear();
            foreach (var item in listBoxDisableGroup.Items)
            {
                CoolRepeater.DisabledGroups.Add(long.Parse(item.ToString()));
            }

            ConfigWorker.Save(ConfigWorker.Path);
            Close();
        }
Ejemplo n.º 3
0
 public void AppDisable(object sender, CQAppDisableEventArgs e)
 {
     ConfigWorker.Save(ConfigWorker.Path);
     e.CQLog.Info("信息", "感谢使用!");
 }