Skip to content

Commit

Permalink
Update Form1.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Potato-Y committed Jan 17, 2021
1 parent 286f1fb commit 81a5d0f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Version.2 Core/Font Setup/FontSetup/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,32 @@ void fileDownloader_DownloadFileCompleted(object sender, AsyncCompletedEventArgs
{
RegisterFont(path + @"\NanumGothic.ttf");

OperatingSystem os = Environment.OSVersion;
Version vs = os.Version;


if (vs.Major == 6 && vs.Minor == 1)
{
MessageBox.Show("Windows7의 경우 수동 설치가 필요합니다. 확인을 누른 뒤, 왼쪽 상단의 설치 버튼을 누르세요.\nFor Windows7, manual installation is required. After clicking OK, click the Install button in the upper left corner.");
System.Diagnostics.Process.Start(path + @"\NanumGothic.ttf");

if (MessageBox.Show("폰트 오픈소스 라이센스를 확인하시겠습니까 ?\nWould you like to check the font open source license?", "", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

var client = new HttpClient(); //웹으로부터 다운로드 받을 수 있는 클래스의 인스턴스를 제작 한다.
var response = client.GetAsync("https://raw.githubusercontent.com/Potato-Y/Game-Utility-App/master/Open%20source%20used/Font%20License.md").Result; //웹으로부터 다운로드
var html = response.Content.ReadAsStringAsync().Result; //다운로드 결과를 html 로 받아 온다.

System.IO.File.WriteAllText(path + @"\Font License.html", html, Encoding.Default);
System.Diagnostics.Process.Start(path + @"\Font License.html");
}
this.Close();
Application.Exit();
}


string message = "설치가 완료되었습니다. 폰트 오픈소스 라이센스를 확인하시겠습니까?\nInstallation is complete. Would you like to check the font open source license?";
if (MessageBox.Show(message, "Complete",MessageBoxButtons.YesNo)==DialogResult.Yes)
{
Expand Down

0 comments on commit 81a5d0f

Please sign in to comment.