private void Button6_Click(object sender, EventArgs e) { if (!(PSM_Surface[Index].PSM_Segments.Length == 8)) { Interaction.MsgBox("Inappropriate PSM"); } if (OpenFileDialog2.ShowDialog() == DialogResult.OK) { System.Drawing.Bitmap BMP = new System.Drawing.Bitmap(OpenFileDialog2.FileName); if (!(BMP.Width == 512) | !(BMP.Height == 512)) { Interaction.MsgBox("Inappropriate image."); } for (int r = 0; r <= 1; r++) { for (int c = 0; c <= 3; c++) { System.Drawing.Bitmap SEG = new System.Drawing.Bitmap(128, 256); for (int x = 0; x <= 127; x++) { for (int y = 0; y <= 255; y++) { SEG.SetPixel(x, y, BMP.GetPixel(x + c * 128, y + r * 256)); } } PSM_Surface[Index].ReplacePSMSegment(SEG, c + r * 4); string path = OpenFileDialog2.FileName.Split('.')[0]; string[] name = path.Split('\\'); PSM_Surface[Index].PSM_Segments[c + r * 4].Name = name[name.Length - 1] + "_" + (r + c * 4 + 1).ToString(); } } GlControl1.Invalidate(); } }
private void BrowseCoverArt() { if (_openFileDialog.ShowDialog(this) != DialogResult.OK) { return; } SetPosterImage(_openFileDialog.SelectedPath); }
private void DownloadFile2_Click(object sender, EventArgs e) { if (OpenFileDialog2.ShowDialog() == DialogResult.OK) { WorkWithFiles file = new WorkWithFiles(OpenFileDialog2.FileName); TextBox2.Lines = file.Text; OpenFileDialog2.Dispose(); } }
private void Button_AsfPath_Click(System.Object sender, System.EventArgs e) { if (OpenFileDialog2.ShowDialog() == DialogResult.OK) { //OKボタンがクリックされたとき //選択されたファイル名を表示する TextBox_AsfPath.Text = OpenFileDialog2.FileName; } }
private void Button5_Click(object sender, EventArgs e) { if (OpenFileDialog2.ShowDialog() == DialogResult.OK) { System.Drawing.Bitmap BMP = new System.Drawing.Bitmap(OpenFileDialog2.FileName); if (PSM_Surface[Index].ReplacePSMSegment(BMP, ComboBox1.SelectedIndex) != 0) { Interaction.MsgBox("Inappropriate image."); } string[] name = OpenFileDialog2.FileName.Split('.'); PSM_Surface[Index].PSM_Segments[ComboBox1.SelectedIndex + 1].Name = name[name.Length - 2] + (ComboBox1.SelectedIndex + 1).ToString(); GlControl1.Invalidate(); } }
private void Button3_Click(System.Object sender, System.EventArgs e) { OpenFileDialog2.ShowDialog(); if (string.IsNullOrEmpty(OpenFileDialog2.FileName)) { //No IPSW Selected... Ignore. return; } else { //md5 the bitch! dl4mebtn.Visible = false; ORlabel.Visible = false; Button3.Visible = false; spinny.Visible = true; verify.ForeColor = Color.Cyan; verify.Text = "Verifying IPSW..."; verify.Left = 15; verify.Visible = true; ipsw = OpenFileDialog2.FileName; get_MD5 = new System.ComponentModel.BackgroundWorker(); get_MD5.WorkerReportsProgress = true; get_MD5.WorkerSupportsCancellation = true; get_MD5.RunWorkerAsync(); int i = 0; while (!(i == 1)) { if (string.IsNullOrEmpty(ipswhash)) { //Continue } else { return; } if (verify.Text.Length == 109) { verify.Text = "Verifying IPSW."; } verify.Text = verify.Text + "."; Delay(0.01); } return; } }
void KonfigurationToolStripMenuItemClick(object sender, EventArgs e) { if (OpenFileDialog2.ShowDialog() != DialogResult.OK) { return; } string[] lines = System.IO.File.ReadAllLines(OpenFileDialog2.FileName); if (lines.Length < 8) { return; } tb_pro1.Text = lines[0]; tb_pro2.Text = lines[1]; tb_pro3.Text = lines[2]; tb_pro4.Text = lines[3]; tb_pro5.Text = lines[4]; tb_pro6.Text = lines[5]; tb_pro7.Text = lines[6]; tb_pro8.Text = lines[7]; }