Skip to content

Commit

Permalink
패치가 성공했을 떄에만 메시지 띄우기
Browse files Browse the repository at this point in the history
  • Loading branch information
sokcuri committed Jun 8, 2019
1 parent 56bed17 commit 7341acd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TwimgSpeedPatch/HostFileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public static void Patch()
{
if (IsPatched())
{
MessageBox.Show("이미 패치되었습니다", "알림", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
bool endLF = IsHostFileLFOfEnd();
Expand All @@ -28,15 +27,15 @@ public static void Patch()
{
w.WriteLine("");
}
w.WriteLine($"{TwImgNodeIPs[new Random().Next(2)]} {HostName}");
w.WriteLine($"{TwImgNodeIPs[new Random().Next(3)]} {HostName}");
}
MessageBox.Show("패치되었습니다", "알림", MessageBoxButtons.OK, MessageBoxIcon.Information);
}

public static void UnPatch()
{
if (!IsPatched())
{
MessageBox.Show("제거할 패치가 없습니다", "알림", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}

Expand All @@ -53,8 +52,9 @@ public static void UnPatch()
}
}
}

File.WriteAllText(HostFileName, contents);

MessageBox.Show("패치를 제거했습니다", "알림", MessageBoxButtons.OK, MessageBoxIcon.Information);
}

public static void OpenHostFile()
Expand Down

0 comments on commit 7341acd

Please sign in to comment.