partial void AddAgilent() { PSetReferences[] pset_references = new[] { new PSetReferences() }; PSetFileLocations pset_file_locations = new PSetFileLocations(); pset_file_locations.SelectedFiles = new CoreList<string>(); pset_references[0].OriginalPSet = pset_file_locations; pset_references[0].CurrentPSet = pset_file_locations.Clone(); QualFileDialogOptionsControl options = new QualFileDialogOptionsControl(); options.Initialize(LABEL, '*' + EXTENSION, CoreUtilities.GetDADefaultDataPath(), new[] { string.Empty }); options.ParameterSets = pset_references; AgtDialog afsd = new AgtDialog(); afsd.AllowMultiSelect = true; afsd.AppPlugIn = options; afsd.Initialize(DialogMode.Open); if(afsd.ShowDialog() == DialogResult.OK) { foreach(string data_filepath in afsd.SelectedFilePaths) { if(!lstData.Items.Contains(data_filepath)) { lstData.Items.Add(data_filepath); tspbProgress.Value = tspbProgress.Minimum; } } } }
/// <summary> /// Create the File Dialog and set it's basic properties /// </summary> private IAgtFileSelectionDialog CreateFileDialogAndSetParameters(bool allowMultiSelect, string dialogTitle, DialogMode dialogMode, string initialDirectory, bool showSampleInfo, IFileFilter iFileFilter) { AgtDialog agtDialog = new AgtDialog(); IAgtFileSelectionDialog fileDialog = agtDialog as IAgtFileSelectionDialog; fileDialog.AllowMultiSelect = allowMultiSelect; fileDialog.HelpId = "0"; fileDialog.DialogTitle = dialogTitle; fileDialog.OpenOrSave = dialogMode; fileDialog.InitialDirectory = initialDirectory; fileDialog.ShowSampleInformation = showSampleInfo; fileDialog.AppPlugIn = iFileFilter; fileDialog.Initialize(dialogMode); // set some basic Form properties agtDialog.Owner = this; agtDialog.ShowIcon = false; agtDialog.ShowInTaskbar = true; agtDialog.BringToFront(); return(fileDialog); }
partial void AddAgilent() { PSetReferences[] pset_references = new[] { new PSetReferences() }; PSetFileLocations pset_file_locations = new PSetFileLocations(); pset_file_locations.SelectedFiles = new CoreList <string>(); pset_references[0].OriginalPSet = pset_file_locations; pset_references[0].CurrentPSet = pset_file_locations.Clone(); QualFileDialogOptionsControl options = new QualFileDialogOptionsControl(); options.Initialize(DIALOG_LABEL, CASE_INSENSITIVE_EXTENSION, CoreUtilities.GetDADefaultDataPath(), new[] { string.Empty }); options.ParameterSets = pset_references; AgtDialog afsd = new AgtDialog(); afsd.AllowMultiSelect = true; afsd.AppPlugIn = options; afsd.Initialize(DialogMode.Open); if (afsd.ShowDialog() == DialogResult.OK) { foreach (string data_filepath in afsd.SelectedFilePaths) { if (!lstData.Items.Contains(data_filepath)) { lstData.Items.Add(data_filepath); tspbProgress.Value = tspbProgress.Minimum; } } } }