private void button3_Click(object sender, EventArgs e) { string YFCCDir = null; mAppInterface.GetAppDirEx(mAppInterface.AppName_YFCC, ref YFCCDir); string YFCCData = YFCCDir + "\\YGODATA\\YGODAT.DAT"; if (!File.Exists(YFCCData)) { YFCCData = YFCCDir + "\\YGODATA\\YGOSYS.DB"; } else { YFCCData = ""; } //MessageBox.Show("请选择天堂狐查卡器数据文件所在位置"); OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = YFCCDir + "\\YGODATA\\"; openFileDialog1.Filter = "天堂狐查卡器数据文件 (YGODAT.DAT;YGOSYS.DB)|YGODAT.DAT;YGOSYS.DB|YGODAT.MDB)|YGODAT.MDB|All files (*.*)|*.*"; openFileDialog1.FilterIndex = 0; openFileDialog1.RestoreDirectory = true; openFileDialog1.Title = "请选择天堂狐查卡器数据文件所在位置"; openFileDialog1.FileName = "YGODAT.DAT"; if (openFileDialog1.ShowDialog() == DialogResult.OK) { this.Text = "数据读入中,请稍候"; DisableAllButton(); Application.DoEvents(); CardsReader mReader = new YFCCReader(); CardLibrary cardLibrary = new CardLibrary(mReader.Read(openFileDialog1.FileName, ProcessChanged)); //选择禁卡表 LimitedListManager llm = LimitedListManager.GetInstance(); llm.LoadFromYFCC(openFileDialog1.FileName); frmLimitedList form = new frmLimitedList(); form.ShowDialog(); this.Text = "索引建立中,请稍候"; CardsSaver lSaver = new LuceneSaver(); lSaver.Save("CardIndex", cardLibrary.GetCards(), ProcessChanged); this.Text = "卡包列表生成中,请稍候"; BuildPackageList(cardLibrary); this.Text = "辅助转换工具"; EnableAllButton(); MessageBox.Show("索引建立完成!\r\r请接着导入YGOPRO补充数据,否则将不能使用效果分类搜索,并且载入YGOPRO卡组时可能出错!", "温馨提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void button3_Click(object sender, EventArgs e) { MessageBox.Show("请选择天堂狐查卡器数据文件所在位置"); OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = appPath; openFileDialog1.Filter = "天堂狐查卡器数据文件 (YGODAT.DAT;YGOSYS.DB)|YGODAT.DAT;YGOSYS.DB|All files (*.*)|*.*"; openFileDialog1.FilterIndex = 0; openFileDialog1.RestoreDirectory = true; if (openFileDialog1.ShowDialog() == DialogResult.OK) { this.Text = "转换中,请稍微"; CardsReader mReader = new YFCCReader(); CardLibrary cardLibrary = new CardLibrary(mReader.Read(openFileDialog1.FileName)); CardsSaver lSaver = new LuceneSaver(); lSaver.Save("CardIndex", cardLibrary.GetCards()); this.Text = "辅助转换工具"; MessageBox.Show("索引建立完成!"); } }