// Wizard Page 1 protected void BtnBrowse_Clicked (object sender, EventArgs e) { var dialog = new FileDialog(this, FileChooserAction.SelectFolder); var result = dialog.Run(); if (result == ResponseType.Ok) { entryGameDir.Text = dialog.FileName; entryGameDir.Position = entryGameDir.Text.Length; treestore1.Clear(); treestore1.AppendValues("Scanning directory..."); if (scanningThread != null && scanningThread.IsAlive) scanningThread.Abort(); scanningThread = new Thread(new ThreadStart(this.ScanningThread)); scanningThread.Start(); } }
// Wizard Page 1 protected void BtnBrowse_Clicked(object sender, EventArgs e) { var dialog = new FileDialog(this, FileChooserAction.SelectFolder); var result = dialog.Run(); if (result == ResponseType.Ok) { entryGameDir.Text = dialog.FileName; entryGameDir.Position = entryGameDir.Text.Length; treestore1.Clear(); treestore1.AppendValues("Scanning directory..."); if (scanningThread != null && scanningThread.IsAlive) { scanningThread.Abort(); } scanningThread = new Thread(new ThreadStart(this.ScanningThread)); scanningThread.Start(); } }
// Wizard Page 3 protected void BtnBrowse2_Clicked (object sender, EventArgs e) { var dialog = new FileDialog(this, FileChooserAction.SelectFolder); var result = dialog.Run(); if (result == ResponseType.Ok) { entryOutputDir.Text = dialog.FileName; entryOutputDir.Position = entryOutputDir.Text.Length; btnNext.Sensitive = true; } }
// Wizard Page 2 protected void BtnIcon_Clicked (object sender, EventArgs e) { var dialog = new FileDialog(this, FileChooserAction.Open); dialog.AddFilter("Icon files (*.ico)", "*.ico"); dialog.AddFilter("All Files (*.*)", "*.*"); if (dialog.Run() == ResponseType.Ok) { try { generatorData.Icon = new System.Drawing.Icon(dialog.FileName); imageIcon.Pixbuf = (new Gdk.Pixbuf(dialog.FileName)).ScaleSimple(32, 32, Gdk.InterpType.Bilinear); } catch { } } }