System.Windows.Forms.FileDialogCustomPlacesCollection.Add(string)

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 7

1. Example

Project: ErrorControlSystem
Source File: LogReader.cs
View license
public override void OnFormLoad()
        {
            // LocalApplicationData: "C:\Users\[UserName/n ..... /n //View Source file for more details /n }

2. Example

Project: duality
Source File: MainForm.cs
View license
private 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();
			}
		}