..
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
|
||||
{
|
||||
@@ -123,15 +125,20 @@ namespace Project.Dialog
|
||||
Util.MsgE("실행파일 amkor.exe 가 없습니다.");
|
||||
return;
|
||||
}
|
||||
var zipfile = new Ionic.Zip.ZipFile();
|
||||
zipfile.AddFile(file_exe,"/");
|
||||
var zipfile = new ZipArchive(new MemoryStream(), ZipArchiveMode.Create);
|
||||
zipfile.CreateEntryFromFile(file_exe, "amkor.exe");
|
||||
foreach (var filedll in files_dll)
|
||||
zipfile.AddFile(filedll.FullName,"/");
|
||||
zipfile.CreateEntryFromFile(filedll.FullName, filedll.Name);
|
||||
|
||||
var veri = Application.ProductVersion.Split('.');
|
||||
var newfilename = "Patch_AGV_" + veri[0] + veri[1]+ veri[2] + "_" +
|
||||
veri[3] + ".zip";
|
||||
zipfile.Save(newfilename);
|
||||
var entry = zipfile.CreateEntry(newfilename);
|
||||
using (var entryStream = entry.Open())
|
||||
using (var fileStream = new FileStream(newfilename, FileMode.Open))
|
||||
{
|
||||
fileStream.CopyTo(entryStream);
|
||||
}
|
||||
|
||||
Util.MsgI("다음 패치 파일이 생성됨\n" + newfilename);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -94,14 +94,18 @@ namespace Project.Dialog
|
||||
|
||||
private void button5_Click(object sender, EventArgs e)
|
||||
{
|
||||
PUB.mplayer.Volume += 0.1;
|
||||
PUB.setting.musicvol = (int)(PUB.mplayer.Volume * 100);
|
||||
var newvol = PUB.setting.musicvol + 10;
|
||||
if (newvol > 100) newvol = 100;
|
||||
if (newvol < 0) newvol = 0;
|
||||
PUB.SetVolume(newvol);
|
||||
}
|
||||
|
||||
private void button4_Click(object sender, EventArgs e)
|
||||
{
|
||||
PUB.mplayer.Volume -= 0.1;
|
||||
PUB.setting.musicvol = (int)(PUB.mplayer.Volume * 100);
|
||||
var newvol = PUB.setting.musicvol - 10;
|
||||
if (newvol > 100) newvol = 100;
|
||||
if (newvol < 0) newvol = 0;
|
||||
PUB.SetVolume(newvol);
|
||||
}
|
||||
|
||||
private void button7_Click(object sender, EventArgs e)
|
||||
@@ -118,7 +122,7 @@ namespace Project.Dialog
|
||||
{
|
||||
var s = "고수석님, 그 에러는 못고쳐요. 포기 하면 편해요";
|
||||
var s1 = $"현재시간은 {DateTime.Now.Hour}시 입니다";
|
||||
PUB.Speak( this.textBox1.Text);
|
||||
PUB.Speak(this.textBox1.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user