/// <summary> /// 运行插件 /// </summary> /// <returns>null:运行插件成功,string:错误信息</returns> public override string Start() { // 初始化插件配置 this.Config = PluginConfig.Init <PasserbyConfig>(this, "PasserbyPlugin"); if (this.Config.PokemonImageBaseDir == "" || this.Config.PokemonImageBaseDir.IsEmpty() || this.Config.PokemonImageBaseDir.IsNull()) { this.Config.PokemonImageBaseDir = "D:\\PokemonImages"; } OnLog("pokemonDir:" + this.Config.PokemonImageBaseDir); // 获取宝可梦文件列表 this.evolveImgList = getPokemonImgList(this.Config.PokemonImageBaseDir + "\\evolveImg"); this.megaEvolveImgList = getPokemonImgList(this.Config.PokemonImageBaseDir + "\\megaEvolveImg"); this.speciesStrengthImgList = getPokemonImgList(this.Config.PokemonImageBaseDir + "\\speciesStrength"); this.transformImgList = getPokemonImgList(this.Config.PokemonImageBaseDir + "\\transformImg"); this.typeOppositeImgList = getPokemonImgList(this.Config.PokemonImageBaseDir + "\\typeOpposite"); // sqlite连接字符串 string dataSource = "QQ\\" + DbBase.RobotQQ.ToString() + "\\DataBase\\52Poke.db3"; SQLiteHelper.setConnectionString(dataSource); this.SDK = new QQClientSDK(); #region 事件订阅 // 订阅群消息 this.SDK.ReceiveClusterIM += SDK_ReceiveClusterIM; #endregion return(null); }
public SettingForm(PasserbyPlugin plugin) { InitializeComponent(); this.Icon = QQLite.Framework.License.SoftIcon; this.Plugin = plugin; this.Config = plugin.Config; initPluginConfigure(); initClustListData(); initCmdListData(); initRespListData(); initResParamsData(); }