void SelectProjectLocationButtonClicked(object sender, EventArgs e) { FolderDialog fdiag = new FolderDialog(); if (fdiag.DisplayDialog(StringParser.Parse("${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.SelectDefaultProjectLocationDialog.Title}")) == DialogResult.OK) { ControlDictionary["projectLocationTextBox"].Text = fdiag.Path; } }
private void MenuFileOpenFolder_Click(object sender, EventArgs e) { FolderDialog.Description = "Select a folder containing songs."; if (FolderDialog.ShowDialog(this) == DialogResult.Cancel) { return; } Open(FolderDialog.SelectedPath); }
private void btnRBrowse_Click(object sender, EventArgs e) { DialogResult result = FolderDialog.ShowDialog(); if (result == DialogResult.OK) { txtRuleTier.Text = FolderDialog.SelectedPath; } }
//导出模板 private void barBtnExportFloder_ItemClick(object sender, ItemClickEventArgs e) { try { var dtExport = (DataTable)this.gcDataInfo.DataSource; string msg = string.Empty; if (dtExport == null || dtExport.Rows.Count < 1) { MessageBox.Show("当前没有数据可以操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } FolderDialog openFolder = new FolderDialog(); if (openFolder.DisplayDialog() == DialogResult.OK) { if (string.IsNullOrEmpty(Settings.Default.ClearYear) || string.IsNullOrEmpty(Settings.Default.Vehicle_MFCS)) { MessageBox.Show("请先设置车辆生存企业名称和清算年份!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } DialogResult dr = MessageBox.Show(String.Format("确定要导出【{0}】,清算年份为【{1}】的数据吗?", Settings.Default.Vehicle_MFCS, Settings.Default.ClearYear), "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (dr == DialogResult.OK) { try { LoadingHandler.Show(this, args => { var exutils = new ExportNewInfoUtils(); msg = exutils.ExportNewTemplate(openFolder.Path, ""); }); if (String.IsNullOrEmpty(msg)) { MessageBox.Show("导出完成!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { using (var mf = new MessageForm(msg) { Text = "校验结果" }) { mf.ShowDialog(); } } } catch (System.Exception ex) { MessageBox.Show("操作出现错误:" + ex.Message, "异常", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } } catch (System.Exception ex) { } }
private void FolderBrowserButton_Click(object sender, EventArgs e) { if (FolderDialog.ShowDialog() == DialogResult.OK) { var folderName = FolderDialog.SelectedPath; var item = new ListViewItem(folderName, "Folder"); //item.Checked = true; FolderListView.Items.Add(item); } }
private void _button导入文华数据_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { FolderDialog sfd = new FolderDialog(); if (sfd.DisplayDialog() == System.Windows.Forms.DialogResult.OK) { Thread th = new Thread(new ThreadStart(() => ImportStocksFromWh6MonthStatement(sfd.Path))); th.Start(); } }
private void button2_Click(object sender, EventArgs e) { DialogResult result = FolderDialog.ShowDialog(); if (result == DialogResult.OK) { BackupPath = FolderDialog.SelectedPath; DisplayRefresh(false, true); } }
void BrowseDirectories(object sender, EventArgs e) { FolderDialog fd = new FolderDialog(); if (fd.DisplayDialog("${res:Dialog.NewProject.SelectDirectoryForProject}") == DialogResult.OK) { ((TextBox)ControlDictionary["locationTextBox"]).Text = fd.Path; } // End }
private void MenuFileOpenSD_Click(object sender, EventArgs e) { FolderDialog.Description = "Select the SD card drive."; if (FolderDialog.ShowDialog(this) == DialogResult.Cancel) { return; } OpenSdCard(FolderDialog.SelectedPath); }
void LookInBrowseButtonClicked(object sender, EventArgs e) { FolderDialog dlg = new FolderDialog(); if (dlg.DisplayDialog("${res:Dialog.NewProject.SearchReplace.LookIn.SelectDirectory}") == DialogResult.OK) { Get <ComboBox>("lookIn").SelectedIndex = customDirectoryIndex; Get <ComboBox>("lookIn").Text = dlg.Path; } }
private void MenuSongsExportFoF_Click(object sender, EventArgs e) { FolderDialog.Description = "Select your Frets on Fire songs folder."; if (FolderDialog.ShowDialog(this) == DialogResult.Cancel) { return; } Exports.ExportFoF(FolderDialog.SelectedPath, GetSelectedSongData()); }
private void on_addSharedFolderButton_clicked(object o, EventArgs args) { FolderDialog selectFolderDialog = new FolderDialog("Select Folder"); selectFolderDialog.TransientFor = dialog; if (selectFolderDialog.Run() == (int)ResponseType.Ok) { sharedFoldersListStore.AppendValues(new object[] { selectFolderDialog.CurrentFolder }); } selectFolderDialog.Destroy(); }
private void browseButton_Click(object sender, EventArgs e) { try { folderTextBox.Text = FolderDialog.SelectFolder(folderTextBox.Text); PreviewRenameFilesIfEnabled(); } catch (Exception ex) { HandleException(ex); } }
private void BrowseFileButton_Click(object sender, EventArgs e) { if (SDCardFolderText.Text.Length == 0) { FolderDialog.SelectedPath = Application.StartupPath; } if (FolderDialog.ShowDialog() == DialogResult.OK) { SDCardFolderText.Text = FolderDialog.SelectedPath; SDCardEnabled.Checked = true; } }
private static IDialogResult ShowFolderDialog(Action <FolderDialog> options) { var dialog = new FolderDialog { Title = "Select Folder" }; options?.Invoke(dialog); return(dialog.ShowDialog() != true ? new DialogResult(MessageBoxResult.Cancel, null) : new DialogResult(MessageBoxResult.OK, dialog.SelectedPath)); }
private void SaveToFolderShowButton_Click(object sender, EventArgs e) { if (Directory.Exists(FolderPathTextBox.Text)) { FolderDialog.SelectedPath = FolderPathTextBox.Text; } FolderDialog.ShowNewFolderButton = true; if (FolderDialog.ShowDialog() == DialogResult.OK) { SaveToFolderTextBox.Text = FolderDialog.SelectedPath; } }
/// <summary> /// Add a fetching directroy from disk /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddFetchingDirectory(object sender, EventArgs e) { FolderDialog folderDialog = new FolderDialog(); folderDialog.ShowDialog(); DBLinker.Execute($@" insert into main values( '{ folderDialog.Path }', 'exe' ); "); ReloadListViewFetching(); }
/// <summary> /// 导入VIN /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnImportVin_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { NissanUtils utils = new NissanUtils(); FolderDialog openFolder = new FolderDialog(); try { if (openFolder.DisplayDialog() == DialogResult.OK) { // 获取用户选择的文件夹路径 string folderPath = openFolder.Path; // 获取folderPath下以格式为utils.CocFileName的所有文件 List <string> fileNameList = utils.GetFileName(folderPath, utils.VinFileName); if (fileNameList.Count > 0) { string fileNameMsg = string.Empty; string returnMsg = string.Empty; // 获取全部主表数据,用作合并VIN数据 bool IsMainDataExist = utils.GetMainData(); if (!IsMainDataExist) { MessageBox.Show("系统中不存在主表数据,请首先导入主表数据", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } // 遍历读所有文件fileNameList foreach (string fileName in fileNameList) { // fileNameMsg += Path.GetFileName(fileName) + "\r\n"; // 导入filename文件信息 returnMsg += utils.ImportVinData(fileName, folderPath); } MessageForm mf = new MessageForm(returnMsg); Utils.SetFormMid(mf); mf.Text = "导入结果"; mf.ShowDialog(); } else { MessageBox.Show(String.Format("目录{0}下没有文件{1}", folderPath, utils.VinFileName)); } } } catch (Exception ex) { MessageBox.Show("导入失败:" + ex.Message); } }
private void ChooseFolder(TextBox input) { var dialog = new FolderDialog(); dialog.FileName = input.Text; dialog.Owner = this; var result = dialog.ShowDialog(); if (result != null && result.Value) { input.Text = dialog.FileName; } }
private void DirSelectButton_Click(object sender, EventArgs e) { Type jsonObjType = DirectoryButtonTypeMap[((Control)sender).Name]; String textBoxName = DirectoryButtonTextBoxMap[((Control)sender).Name]; FolderDialog.ShowDialog(); if (FolderDialog.SelectedPath != "") { JsonFiles.JsonFilePaths[jsonObjType.Name] = FolderDialog.SelectedPath; TabOptions.Controls[textBoxName].Text = FolderDialog.SelectedPath; JsonFiles.SaveFilePaths(); } }
private void OnOutputBrowse(object sender, EventArgs e) { FolderDialog.SelectedPath = OutputFolder.Text; var result = FolderDialog.ShowDialog(); if (result != DialogResult.OK) { return; } OutputFolder.Text = FolderDialog.SelectedPath; }
private void btnSelectRootPath_Click(object sender, EventArgs e) { FolderDialog folder = new FolderDialog(); if (folder.DisplayDialog() == DialogResult.OK) { tbRootPath.Text = folder.Path; } else { MessageBox.Show("你没有选择目录"); } }
private void BtDataDir_Click(object sender, RoutedEventArgs e) { var dialog = new FolderDialog(); var result = dialog.ShowDialog(); if (result != null && !result.Value) { return; } TbDataDir.Text = dialog.FileName; _Cfg.RootDir = dialog.FileName.Replace("\\", "/"); }
private void OnOutputFolderBrowseClick(object sender, EventArgs e) { var lResult = FolderDialog.ShowDialog(); if (lResult == DialogResult.OK) { txt_OutputDirectory.Text = FolderDialog.SelectedPath; Settings.Default.OutputFolder = FolderDialog.SelectedPath; Settings.Default.Save(); } }
//选择文件夹 private void sbtnSelectDir_Click(object sender, EventArgs e) { string dirpath = string.Empty; FolderDialog openFolder = new FolderDialog(); if (openFolder.DisplayDialog() == DialogResult.OK) { FileTable.Clear(); dirpath = openFolder.Path.ToString(); txtfilename.Text = dirpath; FileTable = GetFiles(dirpath, ".xls"); ShowFiles(); } }
private void OpenFolderMenu_Click(object sender, EventArgs e) { if (FolderDialog.ShowDialog() == DialogResult.OK) { Sidebar.Nodes.Clear(); TextContainer.Clear(); string[] paths = Directory.EnumerateFiles(FolderDialog.SelectedPath, "*.bin", SearchOption.AllDirectories).ToArray(); foreach (string path in paths) { CheckBinaryFileFormat(path); } } }
private void Unpacked_Click(object sender, EventArgs e) { FolderDialog.Reset(); FolderDialog.Description = "Select Folder to Unpack XNB Files Into"; FolderDialog.ShowDialog(); UnPackedtxbx.Text = FolderDialog.SelectedPath; if (CompressToTxtbx.Text != "" && UnPackedtxbx.Text != "") { PackBtn.Enabled = true; } else { PackBtn.Enabled = false; } }
private void Extract_Click(object sender, EventArgs e) { FolderDialog.Reset(); FolderDialog.Description = "Select Folder to Unpack XNB Files Into"; FolderDialog.ShowDialog(); ExtractFolderTxb.Text = FolderDialog.SelectedPath; if (FolderXNBTbx.Text != "" && ExtractFolderTxb.Text != "") { UnpackBtn.Enabled = true; } else { UnpackBtn.Enabled = false; } }
private void BtnScarnProductDir_Click(object sender, EventArgs e) { FolderDialog openFolder = new FolderDialog(); if (openFolder.DisplayDialog() == DialogResult.OK) { textBox_ProductDir.Text = openFolder.Path.ToString(); ParamSetMgr.GetInstance().CurrentWorkDir = textBox_ProductDir.Text; ConfigToolMgr.GetInstance().SaveProductDir(); } else { textBox_ProductDir.Text = "你没有选择目录"; } }
private void BTN_Engine_Click(object sender, EventArgs e) { if (DialogResult.OK == FolderDialog.ShowDialog()) { TB_Engine.Text = FolderDialog.SelectedPath; if (TB_Cache.Text.Length == 0) { string TmpPath = Path.Combine(TB_Engine.Text, @".git\ue4-gitdeps"); if (Directory.Exists(TmpPath)) { TB_Cache.Text = TmpPath; } } } }
public void ImportByCat() { var dialog = new FolderDialog(); dialog.Owner = _Main; dialog.Multiselect = true; if (dialog.ShowDialog() != true) { return; } var file = dialog.FileName; ImportCat(_CurrCat, file); }
private void btnBrowseFolder_Click(object sender, RoutedEventArgs e) { FolderDialog dlg = new FolderDialog(); dlg.ShowDialog(); }
private void on_browseOutputFile_clicked(object o, EventArgs e) { FolderDialog folderDialog = new FolderDialog("Select folder to write code to"); if (folderDialog.Run() == (int)Gtk.ResponseType.Ok) { outputDirectoryEntry.Text = folderDialog.CurrentFolder; } folderDialog.Destroy(); }
private void on_addSharedFolderButton_clicked(object o, EventArgs args) { FolderDialog selectFolderDialog = new FolderDialog ("Select Folder"); selectFolderDialog.TransientFor = dialog; if (selectFolderDialog.Run() == (int)ResponseType.Ok) { sharedFoldersListStore.AppendValues(new object[] { selectFolderDialog.CurrentFolder }); } selectFolderDialog.Destroy(); }