Example #1
0
        private void Button4_Click(object sender, EventArgs e)
        {
            Label3.Visible = true;
            Label4.Font    = new Font("맑은 고딕", 14.25f);
            Button5.Font   = new Font("맑은 고딕", 18);
            Button2.Text   = "찾아보기";
            Button1.Text   = "시작";

            Button5.Text = "폴더 열기";
            lang         = "ko";
            FileSystem.WriteAllText(appPath + "/lang.set", "lang=KO_KR", false);

            Label9.Text = "I/O 오류";
            Label9.Font = new Font("맑은 고딕", 8.5f, FontStyle.Regular);
            Label6.Text = "파일 중복";
            Label9.Font = new Font("맑은 고딕", 8, FontStyle.Regular);

            Label2.Font = new Font("맑은 고딕", 12, FontStyle.Regular);
            Label2.Text = "진행률: ";

            Label3.Visible = false;
            Label4.Text    = "대기";

            Label13.Text = "업데이트가 존재합니다.";
            Button7.Text = "업데이트";
        }
Example #2
0
        private void Button3_Click(object sender, EventArgs e)
        {
            Label3.Visible = true;
            Label4.Font    = new Font("Segoe UI", 14.25f);
            Button5.Font   = new Font("Segoe UI", 18);
            Button2.Text   = "Browse";
            Button5.Text   = "Open folder";
            Button1.Text   = "Start";
            lang           = "en";
            FileSystem.WriteAllText(appPath + "/lang.set", "lang=EN_US", false);

            Label9.Text = "I/O Error";
            Label9.Font = new Font("Segoe UI", 12.5f, FontStyle.Regular);
            Label6.Text = "Duplicated file";
            Label6.Font = new Font("Segoe UI", 10.3f, FontStyle.Regular);

            Label2.Font = new Font("Segoe UI", 12, FontStyle.Regular);
            Label2.Text = "Progress: ";

            Label3.Visible = false;
            Label4.Text    = "Wait";

            Label13.Text = "An update available.";
            Button7.Text = "Update";
        }
Example #3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            this.Show();

            if (System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName != "ko")
            {
                Button3.Visible = false;
                Button4.Visible = false;
            }
            int a = Screen.PrimaryScreen.Bounds.Width / 2;
            int b = Screen.PrimaryScreen.Bounds.Height / 2;

            this.Top  = b - this.Height / 2;
            this.Left = a - this.Width / 2;
            OpenFileDialog1.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "/.minecraft/assets/indexes";
            // 설정파일 처음 세팅
            appPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "/indexextract";
            if (!FileSystem.FileExists(appPath + "/lang.set"))
            {
                FileSystem.CreateDirectory(appPath);
                FileSystem.WriteAllText(appPath + "/lang.set", "lang=EN_US", false);
            }
            //설정 파일 불러오기
            string se   = FileSystem.ReadAllText(appPath + "/lang.set");
            string lang = "";

            try {
                lang = Strings.Split(se, "lang=")[1];
            } catch (IndexOutOfRangeException) {
                //todo button 3 click
            }
            if (lang == "EN_US")
            {
                Button3_Click(sender, e);
            }
            else if (lang == "KO_KR")
            {
                Button4_Click(sender, e);
            }
            else
            {
                FileSystem.DeleteFile(appPath + "/lang.set");
                Application.Restart();
            }
            this.MaximizeBox = false;

            Thread t = new Thread(AsyncUpCheck);

            t.Priority = ThreadPriority.Lowest;
            t.Start();

            if (lang == "ko")
            {
                Label4.Text = "대기";
            }
            else if (lang == "en")
            {
                Label4.Text = "Wait";
            }
        }