Example #1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            if (lang == "ko")
            {
                Label4.Text = "준비 중";
            }
            else if (lang == "en")
            {
                Label4.Text = "Preparing";
            }

            BrowserResult br = new BrowserResult();

            try {
                br = Form2.GetResult();
            } catch (NullReferenceException) {
                MessageBox.Show("ERR_FILE_NOT_SELECTED", "Indexextract", MessageBoxButtons.OK);
                return;
            }
            abcd               = Strings.Split(br.file, "\\").Length - 1;
            Label7.Text        = "0";
            Label8.Text        = "0";
            ProgressBar1.Value = 0;
            i               = 0;
            index           = 3;
            ale             = 0;
            ncp             = 0;
            Label4.Visible  = true;
            Label3.Visible  = true;
            Label1.Visible  = true;
            Button2.Enabled = false;
            Button1.Enabled = false;
            Button5.Enabled = false;
            if (lang == "ko")
            {
                Label4.Text = "작업 중";
            }
            else if (lang == "en")
            {
                Label4.Text = "Working";
            }

            string fullt = FileSystem.ReadAllText(br.file);

            b           = Strings.Split(fullt, "hash").Length - 1;
            WorkDataObj = new WorkData()
            {
                dataJson   = Strings.Split(fullt, "\""),
                targetPath = $"{Application.StartupPath}\\indexextract\\{Strings.Split(Strings.Split(br.file, "\\")[abcd], ".json")[0]}"
            };

            Thread t = new Thread(WorkThread);

            t.Name     = "Indexextract worker";
            t.Priority = ThreadPriority.Highest;
            t.Start();
        }
Example #2
0
 private void Button3_Click(object sender, EventArgs e)
 {
     if (Label3.Text == "No file selected" || Label3.Text == "파일 선택 안함")
     {
         if (lang == "ko")
         {
             MessageBox.Show("파일을 선택하지 않았습니다.", "Indexextract", MessageBoxButtons.OK);
         }
         else if (lang == "en")
         {
             MessageBox.Show("You didn't select any file.", "Indexextract", MessageBoxButtons.OK);
         }
         return;
     }
     result = new BrowserResult(false, Label3.Text);
     Close();
     Dispose();
 }
Example #3
0
 private void Button4_Click(object sender, EventArgs e)
 {
     Label3.Text = "No file selected";
     result      = new BrowserResult(true, "");
     Close();
 }