private void BrowseBT_Click(object sender, EventArgs e) { if (BrowseDialog.ShowDialog() == DialogResult.OK) { DirTB.Text = BrowseDialog.SelectedPath; } }
public Form1() { InitializeComponent(); var ting = new BrowseDialog(); if (ting.ShowDialog() == DialogResult.OK) { var test = ting.SelectedFileNameUriEncoded; } }
private void BrowseExec(object sender, ExecutedRoutedEventArgs e) { BrowseDialog.FileName = PathPattern; if (BrowseDialog.ShowDialog().GetValueOrDefault(false)) { PathPattern = BrowseDialog.FileName; } if (PathEditor != null) { PathEditor.Focus(); } }
protected void Browse(ClientPipelineArgs args) { if (args.IsPostBack && args.HasResult) { if (WordpressXmlFile != null) { WordpressXmlFile.Value = args.Result; ImportOptionsPane.Visible = true; return; } } else { BrowseDialog.BrowseForOpen(ApplicationContext.PackagePath, "*.xml", "Open XML file", "Select the file that you want to open.", "People/16x16/box.png"); args.WaitForPostBack(); } }
public void TestInitContentTypes( ) { BrowseDialog dlg = new BrowseDialog( ); dlg.comboBoxContentType = new System.Windows.Forms.ComboBox( ); Assert.AreEqual( 0, dlg.comboBoxContentType.Items.Count ); dlg.InitContentTypes( TestServerInfo.CombineUrlWithSPServer("/sites/UnitTests/ContentTypeTests/Shared Documents") ); // there are actually 3 content types in "Shared Documents", but one of them is Folder and we only // want to be using profiles based on Document content types or their sub-types. Assert.AreEqual( 3, dlg.comboBoxContentType.Items.Count ); Proxy.SPContentTypeInfo populatedCT = dlg.GetSelectedContentType( ); ; Assert.IsNotNull( populatedCT ); Assert.AreEqual( "CustomDocumentContentType1", populatedCT.Name ); Assert.IsNotNull( populatedCT.Fields ); Assert.Greater( populatedCT.Fields.Length, 0 ); }
public static void Browse(ClientPipelineArgs args, Edit fileEdit) { try { CheckPackageFolder(); if (args.IsPostBack) { if (args.HasResult && fileEdit != null) { fileEdit.Value = args.Result; } } else { BrowseDialog.BrowseForOpen(ApplicationContext.PackagePath, "*.zip", "Choose Package", "Click the package that you want to install and then click Open.", "People/16x16/box.png"); args.WaitForPostBack(); } } catch (Exception ex) { Log.Error(ex.Message, typeof(DialogUtils)); SheerResponse.Alert(ex.Message); } }