..
This commit is contained in:
@@ -7,6 +7,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
|
||||
namespace Project.Dialog
|
||||
{
|
||||
@@ -211,10 +213,7 @@ namespace Project.Dialog
|
||||
}
|
||||
|
||||
//해당폴더에 압축을 해제해준다.
|
||||
var f = new Ionic.Zip.ZipFile(file);
|
||||
f.ExtractProgress += F_ExtractProgress;
|
||||
f.ExtractAll(dir_path.FullName);
|
||||
f.ExtractProgress -= F_ExtractProgress;
|
||||
ZipFile.ExtractToDirectory(file, dir_path.FullName);
|
||||
|
||||
//패치정보파일 추가
|
||||
var infofile = System.IO.Path.Combine(dir_path.FullName, "version.txt");
|
||||
@@ -231,19 +230,10 @@ namespace Project.Dialog
|
||||
|
||||
}
|
||||
|
||||
private void F_ExtractProgress(object sender, Ionic.Zip.ExtractProgressEventArgs e)
|
||||
private void F_ExtractProgress(object sender, EventArgs e)
|
||||
{
|
||||
if(e.TotalBytesToTransfer < 1)
|
||||
{
|
||||
lb3.ProgressValue = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var perc = (e.BytesTransferred / e.TotalBytesToTransfer) * 100.0;
|
||||
this.lb3.ProgressValue = (float)perc;
|
||||
}
|
||||
|
||||
|
||||
// System.IO.Compression은 진행률 이벤트를 제공하지 않으므로
|
||||
// 필요한 경우 별도의 진행률 계산 로직을 구현해야 합니다.
|
||||
}
|
||||
|
||||
private void btNo_Click(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user