Ejemplo n.º 1
0
        private void button7_Click(object sender, EventArgs e)
        {
            this.Text = "转换中,请稍候";
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.Filter           = "DIY卡数据文件 (diycards.dll)|diycards.dll|All files (*.*)|*.*";
            openFileDialog1.FilterIndex      = 0;
            openFileDialog1.RestoreDirectory = true;
            string dirpath = DB2Config.GetInstance().GetSetting("DeckPath") + "..\\";

            if (!Directory.Exists(dirpath))
            {
                dirpath = appPath + "\\Image\\";
            }
            if (!Directory.Exists(dirpath))
            {
                dirpath = appPath;
            }
            openFileDialog1.InitialDirectory = dirpath;
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                setInProcess(true);
                CardsReader mReader     = new DIYReader();
                CardLibrary cardLibrary = new CardLibrary(mReader.Read(openFileDialog1.FileName, pbProcess, spStat));
                CardsSaver  lSaver      = new LuceneSaver();
                lSaver.Save("DIYCardIndex", cardLibrary.GetCards(), pbProcess, spStat);
                this.Text = "辅助转换工具";
                MessageBox.Show("索引建立完成!");
                setInProcess(false);
                pbProcess.Value = 0;
                spStat.Text     = "准备就绪";
            }
            this.Text = "辅助转换工具";
        }
Ejemplo n.º 2
0
        private void button10_Click(object sender, EventArgs e)
        {
            string YFCCDir = "";

            //MessageBox.Show("请选择YGORPO数据文件所在位置");
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.InitialDirectory = YFCCDir + "\\YGODATA\\";
            openFileDialog1.Filter           = "YGOPRO数据文件 (cards.cdb)|cards.cdb|All files (*.*)|*.*";
            openFileDialog1.FilterIndex      = 0;
            openFileDialog1.RestoreDirectory = true;
            openFileDialog1.Title            = "请选择YGORPO数据文件所在位置";

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                this.Text = "数据读入中,请稍候";
                DisableAllButton();
                Application.DoEvents();

                YGOProCardsReader mReader = new YGOProCardsReader();
                CardDescription[] cards   = mReader.Read(openFileDialog1.FileName, ProcessChanged);

                this.Text = "索引建立中,请稍候";
                CardsSaver lSaver = new LuceneSaver();
                lSaver.Save("CardIndex", cards, ProcessChanged);

                this.Text = "卡包列表生成中,请稍候";
                CardLibrary cardLibrary = CardLibrary.GetInstance();
                BuildPackageList(cardLibrary);

                this.Text = "辅助转换工具";
                EnableAllButton();
                MessageBox.Show("索引建立完成!");
            }
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
        private void button2_Click(object sender, EventArgs e)
        {
            MessageBox.Show("请选择迷你卡片数据目录CardLib所在位置");
            FolderBrowserDialog openFolderDialog1 = new FolderBrowserDialog();

            openFolderDialog1.RootFolder   = Environment.SpecialFolder.MyComputer;
            openFolderDialog1.SelectedPath = appPath;
            if (openFolderDialog1.ShowDialog() == DialogResult.OK)
            {
                this.Text = "转换中,请稍微";
                CardsReader mReader     = new MiniCardXReader();
                CardLibrary cardLibrary = new CardLibrary(mReader.Read(openFolderDialog1.SelectedPath));
                CardsSaver  lSaver      = new LuceneSaver();
                lSaver.Save("CardIndex", cardLibrary.GetCards());
                this.Text = "辅助转换工具";
                MessageBox.Show("索引建立完成!");
            }
        }
Ejemplo n.º 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("请选择中中版查卡器数据文件所在位置");
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.InitialDirectory = appPath;
            openFileDialog1.Filter           = "中中版查卡器数据文件 (ocg.yxwp)|ocg.yxwp|All files (*.*)|*.*";
            openFileDialog1.FilterIndex      = 0;
            openFileDialog1.RestoreDirectory = true;
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                this.Text = "转换中,请稍微";
                CardsReader mReader     = new yxwpReader();
                CardLibrary cardLibrary = new CardLibrary(mReader.Read(openFileDialog1.FileName));
                CardsSaver  lSaver      = new LuceneSaver();
                lSaver.Save("CardIndex", cardLibrary.GetCards());
                this.Text = "辅助转换工具";
                MessageBox.Show("索引建立完成!");
            }
        }
Ejemplo n.º 6
0
        private void button7_Click(object sender, EventArgs e)
        {
            string NBXDir = null;

            mAppInterface.GetAppDirEx(mAppInterface.AppName_NBX, ref NBXDir);
            string DIYPath = NBXDir + "\\data\\diycards.dll";

            this.Text = "数据读入中,请稍候";
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.Filter           = "DIY卡数据文件 (diycards.dll)|diycards.dll|All files (*.*)|*.*";
            openFileDialog1.FilterIndex      = 0;
            openFileDialog1.RestoreDirectory = true;
            string dirpath = DB2Config.GetInstance().GetSetting("DeckPath") + "..\\";

            if (!Directory.Exists(dirpath))
            {
                dirpath = appPath + "\\Image\\";
            }
            if (!Directory.Exists(dirpath))
            {
                dirpath = appPath;
            }
            openFileDialog1.InitialDirectory = dirpath;
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                CardsReader mReader     = new DIYReader();
                CardLibrary cardLibrary = new CardLibrary(mReader.Read(openFileDialog1.FileName, ProcessChanged));
                this.Text = "索引建立中,请稍候";
                CardsSaver lSaver = new LuceneSaver();
                lSaver.Save("DIYCardIndex", cardLibrary.GetCards(), ProcessChanged);
                this.Text = "辅助转换工具";
                MessageBox.Show("索引建立完成!");
            }
            this.Text = "辅助转换工具";
        }
Ejemplo n.º 7
0
        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 = "转换中,请稍候";
                setInProcess(true);
                CardsReader mReader     = new YFCCReader();
                CardLibrary cardLibrary = new CardLibrary(mReader.Read(openFileDialog1.FileName, pbProcess, spStat));
                CardsSaver  lSaver      = new LuceneSaver();
                lSaver.Save("CardIndex", cardLibrary.GetCards(), pbProcess, spStat);
                this.Text = "辅助转换工具";
                MessageBox.Show("索引建立完成!");
                setInProcess(false);
                pbProcess.Value = 0;
                spStat.Text     = "准备就绪";
            }
        }