Exemple #1
0
        private void buttonXCreate_Click(object sender, EventArgs e)
        {
            MessageBoxEx.Show(@"> 这是一个测试功能...
> 还没完成 所以请选择patch文件  exe补丁暂时懒得分离
> 没有检查原客户端版本 为了正确执行请预先确认
> 暂时不提供文件块的筛选或文件缺失提示
> 没优化 于是可能生成文件体积较大 但是几乎可以保证完整性", "声明");

            SaveFileDialog dlg = new SaveFileDialog();

            dlg.Filter           = "*.patch|*.patch";
            dlg.Title            = "Select output file";
            dlg.CheckFileExists  = false;
            dlg.InitialDirectory = Path.GetDirectoryName(txtPatchFile2.Text);
            dlg.FileName         = Path.GetFileNameWithoutExtension(txtPatchFile2.Text) + "_reverse.patch";

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    ReversePatcherBuilder builder = new ReversePatcherBuilder();
                    builder.msDir          = txtMSFolder2.Text;
                    builder.patchFileName  = txtPatchFile2.Text;
                    builder.outputFileName = dlg.FileName;
                    builder.Build();
                }
                catch (Exception ex)
                {
                }
            }
        }
Exemple #2
0
        private void buttonXCreate_Click(object sender, EventArgs e)
        {
            MessageBoxEx.Show(@"> This is a test function...
> Not done yet so please choose patch file exe patch temporarily.
> Did not check the original client version for correct execution, please confirm in advance
> Not available for file block selection or file missing prompt
> No optimization so may generate a larger file size but can almost guarantee the integrity", "Notice");

            SaveFileDialog dlg = new SaveFileDialog();

            dlg.Filter           = "*.patch|*.patch";
            dlg.Title            = "Select output file";
            dlg.CheckFileExists  = false;
            dlg.InitialDirectory = Path.GetDirectoryName(txtPatchFile2.Text);
            dlg.FileName         = Path.GetFileNameWithoutExtension(txtPatchFile2.Text) + "_reverse.patch";

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    ReversePatcherBuilder builder = new ReversePatcherBuilder();
                    builder.msDir          = txtMSFolder2.Text;
                    builder.patchFileName  = txtPatchFile2.Text;
                    builder.outputFileName = dlg.FileName;
                    builder.Build();
                }
                catch (Exception ex)
                {
                }
            }
        }