/// <summary> /// 构造函数 /// </summary> internal LibraryLinker() { int type = Properties.Settings.Default.LibraryType; string path = Properties.Settings.Default.LibraryPath; //检查库是否存在 if ((!File.Exists(path)) && (type != 0)) { KryptonMessageBox.Show("指定的解析库不存在,使用纯文本模式。"); type = 0; } try { //初始化初始化库 switch (type) { case 1: //DynamicCodeWrapper library = new DynamicCodeWrapper(path, Encoding.UTF8); break; case 2: //NetWrapper library = new NetWrapper(path); break; default: library = new PureTextWrapper(); break; } } catch (Exception e) { KryptonMessageBox.Show(e.Message); Environment.Exit(0); } }