示例#1
0
        private void applyBtn_Click(object sender, EventArgs e)
        {
            ReadIni();
            string text = this.gameInstallPath();
            bool flag = Directory.Exists(text);
            bdo_toolbox.config conf = new bdo_toolbox.config();

            if (flag)
            {
                bool flag2 = Directory.Exists(text + "\\stringtable");
                if (flag2)
                {
                    try
                    {
                        Directory.Delete(text + "\\stringtable", true);
                    }
                    catch
                    {
                    }
                }
                bool flag3 = !Directory.Exists(text + "\\prestringtable");
                if (flag3)
                {
                    Directory.CreateDirectory(text + "\\prestringtable");
                }
                bool flag4 = !Directory.Exists(text + "\\prestringtable\\eu");
                if (flag4)
                {
                    Directory.CreateDirectory(text + "\\prestringtable\\eu");
                }
                //bool flag5 = this.officialVersion().Equals(this.localVersion());
                //if (flag5)
                //{
                
                if(builtflag == true)
                {
                    
                    this.startPatchingNoBuild(text);
                }
                else
                {
                    this.startPatchingNoBuild(text);
                }
                

                //}
                //else
                //{
                //	int num = (int)MessageBox.Show("Proszę zaktualizować grę przed próbą generowania patcha.");
                //}
            }
            else
            {
                InstallFolder_NotFound();
            }
        }
示例#2
0
        private void DebugRefresh_JPToTCN()
        {
            string text = this.gameInstallPath();
            bool flag = text != "" && Directory.Exists(text);
            if (flag)
            {
                bool flag2 = Directory.Exists(text + "\\prestringtable");
                if (flag2)
                {
                    try
                    {
                        Directory.Delete(text + "\\prestringtable", true);
                    }
                    catch (Exception ex)
                    {
                        //int num = (int)System.Windows.MessageBox.Show(string.Format("パッチャーフォルダを削除できません。, エラーコード:{0}", ex.Message));
                        return;
                    }
                    //int num2 = (int)System.Windows.MessageBox.Show("フォルダは正常に削除されました。");
                    // PatchFolder_Deleted();
                }
                else
                {
                    //int num3 = (int)System.Windows.MessageBox.Show("フォルダは正常に削除されました。");
                    // PatchFolder_Deleted();
                }
            }
            else
            {
                // InstallFolder_NotFound();
                //int num4 = (int)System.Windows.MessageBox.Show("");
            }
            //
            //
            ReadIni();
            text = this.gameInstallPath();
            flag = Directory.Exists(text);
            bdo_toolbox.config conf = new bdo_toolbox.config();

            if (flag)
            {
                bool flag2 = Directory.Exists(text + "\\stringtable");
                if (flag2)
                {
                    try
                    {
                        Directory.Delete(text + "\\stringtable", true);
                    }
                    catch
                    {
                    }
                }
                bool flag3 = !Directory.Exists(text + "\\prestringtable");
                if (flag3)
                {
                    Directory.CreateDirectory(text + "\\prestringtable");
                }
                bool flag4 = !Directory.Exists(text + "\\prestringtable\\jp");
                if (flag4)
                {
                    Directory.CreateDirectory(text + "\\prestringtable\\jp");
                }
                //bool flag5 = this.officialVersion().Equals(this.localVersion());
                //if (flag5)
                //{
                WebClient webclient = new WebClient();
                webclient.DownloadFile("http://files.indigoflare.net/bdotoolbox/patch/LD_JP_TCN.zip", "data/LD_JP_TCN.zip");
                try
                {
                    ZipFile zipFile = ZipFile.Read("data/LD_JP_TCN.zip");
                    zipFile["LanguageData.xlsm"].Extract(text + "prestringtable/jp/");
                    zipFile["stringtable_cutscene_jp.xlsm"].Extract(text + "prestringtable/jp/");
                    zipFile["stringtable_jp.xlsm"].Extract(text + "prestringtable/jp/");
                    zipFile["symbolnostringtable_jp.xlsm"].Extract(text + "prestringtable/jp/");
                    zipFile.Dispose();
                    zipFile = null;
                }
                catch
                {
                    ResetPatch();
                    ZipFile zipFile = ZipFile.Read("data/LD_JP_TCN.zip");
                    zipFile["LanguageData.xlsm"].Extract(text + "prestringtable/jp/");
                    zipFile["stringtable_cutscene_jp.xlsm"].Extract(text + "prestringtable/jp/");
                    zipFile["stringtable_jp.xlsm"].Extract(text + "prestringtable/jp/");
                    zipFile["symbolnostringtable_jp.xlsm"].Extract(text + "prestringtable/jp/");
                    zipFile.Dispose();
                    zipFile = null;

                }
                FinishedPatching_Message();
                webclient.Dispose();
                webclient = null;
            }
        }