private void buttonBrowse_Click(object sender, EventArgs e) { string p = VirtualFileSystem.GetRealPathByVirtual(@"Maps"); try { Directory.CreateDirectory(p); } catch (Exception) { } //FBD.RootFolder = Environment.SpecialFolder.Windows; FBD.SelectedPath = p; FBD.ShowNewFolderButton = true; if (FBD.ShowDialog() == DialogResult.OK) { string p1 = FBD.SelectedPath; string d = VirtualFileSystem.GetVirtualPathByReal(p1); if (string.IsNullOrEmpty(d)) { d = p1; } textDir.Text = d; } else { textDir.Text = ""; } }
private void btnDcomOut_Click(object sender, EventArgs e) { if (FBD.ShowDialog() == DialogResult.OK) { txtDcomOut.Text = FBD.SelectedPath; } }
void cmdSaveSelected_Click(object sender, EventArgs e) { if (listImages.SelectedItems.Count == 0) { return; } if (FBD.ShowDialog() != DialogResult.OK) { return; } if (IFS.ShowDialog() != DialogResult.OK) { return; } foreach (ListViewItem lvt in listImages.SelectedItems) { string name = lvt.Text; foreach (char c in Path.GetInvalidFileNameChars()) { name = name.Replace(c, '_'); } Image outImage = new Bitmap(Images[lvt.ImageIndex], Images[0].Width, Images[0].Height); using (var fs = new FileStream(Path.Combine(FBD.SelectedPath, name) + "." + IFS.ImageFormat.ToString().ToLower(), FileMode.Create)) { outImage.Save(fs, IFS.ImageFormat); } } }
private void BTN_Choose_Click(object sender, EventArgs e) { if (FBD.ShowDialog() == DialogResult.OK) { Chooser(FBD.SelectedPath); } }
private void button1_Click(object sender, EventArgs e) { if (FBD.ShowDialog() == DialogResult.OK) { string fullPath = FBD.FileName; label1.Text = fullPath.Substring(0, fullPath.LastIndexOf('\\')); string[] files = Directory.GetFiles(fullPath.Substring(0, fullPath.LastIndexOf('\\'))); foreach (string file in files) { listBox1.Items.Add(Path.GetFileName(file)); var path = Directory.GetParent(file).FullName; listBox1.SelectedValueChanged += (o, ea) => { pictureBox1.Image = Image.FromFile(Path.Combine(path, (string)((ListBox)o).SelectedItem)); }; } try { pictureBox1.Image = Image.FromFile(FBD.FileName); } catch (Exception) { MessageBox.Show("Не корректный файл. Выберите, пожалуйста, файл с расширением .png|.jpeg|.bmp|.gif", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
private void btnBrowseIn_Click(object sender, EventArgs e) { if (FBD.ShowDialog() == DialogResult.OK) { tbInFolder.Text = FBD.SelectedPath; } }
void btnSavePath_Click(object sender, EventArgs e) { if (FBD.ShowDialog() == DialogResult.OK) { AppConfig.Settings.SavePath = FBD.SelectedPath; } }
/********************************************************* * La création d'un contrôle FolderBrowserDialog nommé FBD est nécessaire. * Ouvre une boite de dialogue "Explorateur de répertoires" * Récupére le chemin d'accès au répertoire sélectionné et le copie dans un TextBox. **********************************************************/ private void FBD_Click(object sender, EventArgs e) { if (FBD.ShowDialog() == DialogResult.OK) { txbDossier.Text = FBD.SelectedPath; } }
private void toolStripButtonCataloger_Click(object sender, EventArgs e) { if (FBD.ShowDialog() != DialogResult.OK) { return; } // Use ProcessStartInfo class var startInfo = new ProcessStartInfo { CreateNoWindow = false, UseShellExecute = false, FileName = @"D:\Users\nfric\Documents\Visual Studio 2017\Projects\FontCatalogConsole\FontCatalogConsole\bin\Debug\FontCatalogConsole.exe", WindowStyle = ProcessWindowStyle.Normal, Arguments = "\"" + FBD.SelectedPath + "\"" }; try { // Start the process with the info we specified. // Call WaitForExit and then the using statement will close. using (var exeProcess = Process.Start(startInfo)) { exeProcess.WaitForExit(); } } catch { // Log error. } }
private void btnBrowseBackupPath_Click(object sender, EventArgs e) { FBD.ShowDialog(); txtBackupPath.Text = FBD.SelectedPath; settings.Default.BackupLocation = FBD.SelectedPath; settings.Default.Save(); }
private void btnBrowse_Click(object sender, EventArgs e) { if (FBD.ShowDialog() == DialogResult.OK) { ImageFolder = FBD.SelectedPath; } }
private void btnSelectFolder_Click(object sender, EventArgs e) { if (FBD.ShowDialog() == DialogResult.OK) { txtSelectedFolderPath.Text = FBD.SelectedPath; } }
private void btnExport_Click(object sender, EventArgs e) { const string ExportAlert = "You're about to export only the public RSA key parts.\r\n" + "This key will allow encryption only and is meant for sharing with other people and not creating backups.\r\n" + "Continue?"; if (lvRSA.SelectedItems.Count > 0) { var Keys = lvRSA.SelectedItems .OfType <ListViewItem>() .Where(m => m.Tag != null) .Select(m => RSAEncryption.StripPrivate((RSAKey)m.Tag)) .ToArray(); if (Keys.Length > 0 && Program.AlertMsg(ExportAlert, true) == DialogResult.Yes) { if (lvRSA.SelectedItems.Count == 1) { SFD.FileName = Tools.SanitizeName(Keys[0].Name + ".rsa"); if (SFD.ShowDialog() == DialogResult.OK) { try { System.IO.File.WriteAllText(SFD.FileName, Keys[0].ToXML()); } catch (Exception ex) { Program.ErrorMsg("Unable to export your key. Error:\r\n" + ex.Message); } } } else { if (FBD.ShowDialog() == DialogResult.OK) { foreach (var K in Keys) { try { System.IO.File.WriteAllText(Tools.UniqueName(FBD.SelectedPath, Tools.SanitizeName(K.Name + ".rsa")), K.ToXML()); } catch (Exception ex) { Program.ErrorMsg($"Unable to export your key named {K.Name}. Error:\r\n{ex.Message}"); } } } } } else if (Keys.Length == 0) { Program.AlertMsg("You can't export administratively added keys"); } } else { Program.AlertMsg("Please select at least one key"); } }
private void btnBackup_Click(object sender, EventArgs e) { const string ExportAlert = "You're about to export at least one RSA key that has private key information.\r\n" + "Under no circumstances should you share those keys with anybody, regardless of what they tell you.\r\nContinue?"; if (lvRSA.SelectedItems.Count > 0) { var Keys = lvRSA.SelectedItems .OfType <ListViewItem>() .Where(m => m.Tag != null) .Select(m => (RSAKey)m.Tag) .ToArray(); if (Keys.Length == 0) { Program.AlertMsg("You can't export administratively added keys"); return; } if (!Keys.Any(m => RSAEncryption.HasPrivateKey(m.Key)) || Program.AlertMsg(ExportAlert, true) == DialogResult.Yes) { if (lvRSA.SelectedItems.Count == 1) { SFD.FileName = Tools.SanitizeName(Keys[0].Name + ".rsa"); if (SFD.ShowDialog() == DialogResult.OK) { try { System.IO.File.WriteAllText(SFD.FileName, Keys[0].ToXML()); } catch (Exception ex) { Program.ErrorMsg("Unable to back up your key. Error:\r\n" + ex.Message); } } } else { if (FBD.ShowDialog() == DialogResult.OK) { foreach (var K in Keys) { try { System.IO.File.WriteAllText(Tools.UniqueName(FBD.SelectedPath, Tools.SanitizeName(K.Name + ".rsa")), K.ToXML()); } catch (Exception ex) { Program.ErrorMsg($"Unable to back up your key named {K.Name}. Error:\r\n{ex.Message}"); } } } } } } else { Program.AlertMsg("Please select at least one key"); } }
private void btnFileSaveBrw_Click(object sender, EventArgs e) { FBD.ShowNewFolderButton = true; if (FBD.ShowDialog() == DialogResult.OK) { txtSaveDir.Text = FBD.SelectedPath; } }
private void GetFontFolder() { if (FBD.ShowDialog() != DialogResult.OK) { return; } treeviewPopulate(FBD.SelectedPath); }
private void dump_dir_Click(object sender, EventArgs e) { FBD.Reset(); FBD.ShowDialog(); dump_dir.Text = FBD.SelectedPath; Properties.Settings.Default.UnpackPath = dump_dir.Text = FBD.SelectedPath; Properties.Settings.Default.Save(); }
private void btnDir2_Click(object sender, EventArgs e) { FBD.ShowNewFolderButton = false; if (FBD.ShowDialog() == DialogResult.OK) { tbDir2.Text = FBD.SelectedPath; } }
private void bBrowse_Click(object sender, EventArgs e) { if (FBD.ShowDialog() == DialogResult.OK) { FolderLoc = FBD.SelectedPath; UpdateUI(); } }
private void btnBrowse_Click(object sender, EventArgs e) { if (FBD.ShowDialog() == DialogResult.OK) { GetImages(tbDirectory.Text = FBD.SelectedPath); SaveSettings(); } }
private void labelCalendarioPastaPagamentos_DoubleClick(object sender, EventArgs e) { FBD.SelectedPath = labelCalendarioPastaPagamentos.Text; if (FBD.ShowDialog() == DialogResult.Cancel) { return; } labelCalendarioPastaPagamentos.Text = FBD.SelectedPath; }
private void btnFindPath_Click(object sender, EventArgs e) { FBD.SelectedPath = Environment.CurrentDirectory; if (FBD.ShowDialog() == DialogResult.OK) { TBFolderPath.Text = FBD.SelectedPath; } }
void Event_ParametrsChangeByUser() { if (FBD.ParametersDigit[0].Value != IndicatorLookForward.ValueInt || FBD.ParametersDigit[1].Value != IndicatorLookBack.ValueInt) { FBD.ParametersDigit[0].Value = IndicatorLookForward.ValueInt; FBD.ParametersDigit[1].Value = IndicatorLookBack.ValueInt; FBD.Reload(); } }
private void BTN_FolderSelector_Click(object sender, EventArgs e) { if (FBD.ShowDialog() == DialogResult.OK) { selection.AddRange(FolderToList(FBD.SelectedPath)); selectionToTB_List(selection); playlist_true = selection; LB_TempsTotal.Text = "Temps Total: " + TimeSpan.FromMilliseconds(GetListDuration(ref selection)).ToString(timeStampValue); } }
private void Path_Btn_Click(object sender, EventArgs e) { TrueFalse(); pathfolders = Path_Text.Text; Path_Text.Text = FBD.SelectedPath; if (FBD.ShowDialog() == DialogResult.OK) { Path_Text.Text = FBD.SelectedPath; pathfolders = Path_Text.Text; } }
private void buttonGetTargetFolder_Click(object sender, EventArgs e) { FBD.SelectedPath = textBoxTargetFolder.Text; if (FBD.ShowDialog() == DialogResult.Cancel) { return; } textBoxTargetFolder.Text = FBD.SelectedPath; buttonProcessar.Enabled = !string.IsNullOrEmpty(textBoxSourceFolder.Text) && !string.IsNullOrEmpty(textBoxTargetFolder.Text); }
/// <summary> /// The User wants to browse for a folder to save the project to /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, EventArgs e) { DialogResult dr = FBD.ShowDialog(); if (dr == System.Windows.Forms.DialogResult.OK) { tbSaveLocation.Text = FBD.SelectedPath; } else { tbSaveLocation.Text = Properties.Settings.Default.ApplicationFolderPath; } }
private void buttonChangeSourcePath_Click(object sender, EventArgs e) { FBD.SelectedPath = txtPath.Text; FBD.ShowNewFolderButton = false; if (FBD.ShowDialog() == DialogResult.OK) { if (Directory.Exists(FBD.SelectedPath)) { txtPath.Text = FBD.SelectedPath; } } }
private void RetailOFD_Click(object sender, EventArgs e) { if (FBD.ShowDialog() == DialogResult.OK) { var newPath = FBD.SelectedPath; if (IOHelper.CheckWoWPath(newPath)) { Settings.Default.WoWRetailPath = FBD.SelectedPath; Settings.Default.Save(); textBox1.Text = FBD.SelectedPath; } } }
private void ChangeDirectory() { string WorkingDirectory = Properties.Settings.Default.WorkingDirectory; FBD.SelectedPath = WorkingDirectory; if (FBD.ShowDialog() == DialogResult.OK) { Mp3ListView.Items.Clear(); string RootDirectory = FBD.SelectedPath; Properties.Settings.Default.WorkingDirectory = RootDirectory; Properties.Settings.Default.Save(); this.Text = this.Text + " - " + RootDirectory; Load_LV(RootDirectory); } }
private void InitFBDs() { TreeNode rootNode = treeView1.Nodes[0]; TreeNode groupNode = new TreeNode("Bit Logic"); TreeNode opNode = new TreeNode("AND"); FBD fBD = new FBD(); fBD.ID = 0; fBD.Name = "AND"; fBD.Size = new Size(3, 2); FBDPara fBDPara = new FBDPara(); fBDPara.Owner = fBD; fBDPara.ParaType = FBDParaTypeEnum.In; fBDPara.Name = "Input"; fBDPara.Symbol = ""; fBDPara.Index = 0; fBDPara.CanLine = true; fBDPara.DefaultValue = ""; fBD.InputParaList.Add(fBDPara); fBDPara = new FBDPara(); fBDPara.Owner = fBD; fBDPara.ParaType = FBDParaTypeEnum.In; fBDPara.Name = "Input"; fBDPara.Symbol = ""; fBDPara.Index = 1; fBDPara.CanLine = true; fBDPara.DefaultValue = ""; fBD.InputParaList.Add(fBDPara); fBDPara = new FBDPara(); fBDPara.Owner = fBD; fBDPara.ParaType = FBDParaTypeEnum.Out; fBDPara.Name = "Output"; fBDPara.Symbol = ""; fBDPara.Index = 0; fBDPara.CanLine = true; fBDPara.DefaultValue = ""; fBD.OutputParaList.Add(fBDPara); opNode.Tag = fBD; groupNode.Nodes.Add(opNode); opNode = new TreeNode("OR"); fBD = new FBD(); fBD.ID = 0; fBD.Name = "OR"; fBD.Size = new Size(3, 2); fBDPara = new FBDPara(); fBDPara.Owner = fBD; fBDPara.ParaType = FBDParaTypeEnum.In; fBDPara.Name = "Input"; fBDPara.Symbol = ""; fBDPara.Index = 0; fBDPara.CanLine = true; fBDPara.DefaultValue = ""; fBD.InputParaList.Add(fBDPara); fBDPara = new FBDPara(); fBDPara.Owner = fBD; fBDPara.ParaType = FBDParaTypeEnum.In; fBDPara.Name = "Input"; fBDPara.Symbol = ""; fBDPara.Index = 1; fBDPara.CanLine = true; fBDPara.DefaultValue = ""; fBD.InputParaList.Add(fBDPara); fBDPara = new FBDPara(); fBDPara.Owner = fBD; fBDPara.ParaType = FBDParaTypeEnum.Out; fBDPara.Name = "Output"; fBDPara.Symbol = ""; fBDPara.Index = 0; fBDPara.CanLine = true; fBDPara.DefaultValue = ""; fBD.OutputParaList.Add(fBDPara); opNode.Tag = fBD; groupNode.Nodes.Add(opNode); rootNode.Nodes.Add(groupNode); groupNode = new TreeNode("Word Logic"); opNode = new TreeNode("MOV_W"); fBD = new FBD(); fBD.ID = 0; fBD.Name = "MOV_W"; fBD.Size = new Size(3, 3); fBDPara = new FBDPara(); fBDPara.Owner = fBD; fBDPara.ParaType = FBDParaTypeEnum.In; fBDPara.Name = "Input"; fBDPara.Symbol = "En"; fBDPara.Index = 1; fBDPara.CanLine = true; fBDPara.DefaultValue = ""; fBD.InputParaList.Add(fBDPara); fBDPara = new FBDPara(); fBDPara.Owner = fBD; fBDPara.ParaType = FBDParaTypeEnum.In; fBDPara.Name = "Input"; fBDPara.Symbol = "In"; fBDPara.Index = 2; fBDPara.CanLine = true; fBDPara.DefaultValue = ""; fBD.InputParaList.Add(fBDPara); fBDPara = new FBDPara(); fBDPara.Owner = fBD; fBDPara.ParaType = FBDParaTypeEnum.Out; fBDPara.Name = "Output"; fBDPara.Symbol = "EnO"; fBDPara.Index = 1; fBDPara.CanLine = true; fBDPara.DefaultValue = ""; fBD.OutputParaList.Add(fBDPara); fBDPara = new FBDPara(); fBDPara.Owner = fBD; fBDPara.ParaType = FBDParaTypeEnum.Out; fBDPara.Name = "Output"; fBDPara.Symbol = "Out"; fBDPara.Index = 2; fBDPara.CanLine = true; fBDPara.DefaultValue = ""; fBD.OutputParaList.Add(fBDPara); opNode.Tag = fBD; groupNode.Nodes.Add(opNode); rootNode.Nodes.Add(groupNode); }