Here are the examples of the csharp api class System.Windows.Forms.FileDialogCustomPlacesCollection.Add(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
0
1. Example
View licensepublic override void OnFormLoad() { // LocalApplicationData: "C:\Users\[UserName/n ..... /n //View Source file for more details /n }
0
2. Example
View licenseprivate void actionConfigureLauncher_Click(object sender, EventArgs e) { OpenFileDialog fileDialog = new OpenFileDialog(); fileDialog.InitialDirectory = Path.GetDirectoryName(DualityEditorApp.LauncherAppPath); if (string.IsNullOrWhiteSpace(fileDialog.InitialDirectory)) fileDialog.InitialDirectory = Environment.CurrentDirectory; fileDialog.FileName = Path.GetFileName(DualityEditorApp.LauncherAppPath); fileDialog.Filter = "Executable files (*.exe)|*.exe"; fileDialog.FilterIndex = 1; fileDialog.RestoreDirectory = true; fileDialog.Multiselect = false; fileDialog.Title = GeneralRes.MenuItemName_ConfigureLauncher; fileDialog.CheckFileExists = true; fileDialog.CheckPathExists = true; fileDialog.CustomPlaces.Add(Environment.CurrentDirectory); if (fileDialog.ShowDialog(this) == DialogResult.OK) { DualityEditorApp.LauncherAppPath = PathHelper.MakeFilePathRelative(fileDialog.FileName); this.UpdateLaunchAppActions(); } }