private void OnBrowseButtonClick(NEventArgs arg1) { NOpenFileDialog openFileDialog = new NOpenFileDialog(); openFileDialog.FileTypes = new NFileDialogFileType[] { new NFileDialogFileType("Rich Text Files", "rtf") }; openFileDialog.SelectedFilter = 0; openFileDialog.MultiSelect = false; openFileDialog.InitialDirectory = ""; openFileDialog.Closed += new Function <NOpenFileDialogResult>( delegate(NOpenFileDialogResult result) { if (result.Result != ENCommonDialogResult.OK) { return; } string fileName = result.Files[0].Path; m_FileNameTextBox.Text = fileName; if (LoadRtfFromFile(fileName)) { ExportToHtml(); } } ); openFileDialog.RequestShow(); }
private void OnOpenFileButtonClick(NEventArgs arg) { NOpenFileDialog openFileDialog = new NOpenFileDialog(); openFileDialog.FileTypes = new NFileDialogFileType[] { new NFileDialogFileType("Xml Files (*.xml)", "xml") }; openFileDialog.Closed += OnOpenFileDialogClosed; openFileDialog.RequestShow(); }
private void ShowMultiselectOpenFileDialog() { NOpenFileDialog openFileDialog = new NOpenFileDialog(); openFileDialog.MultiSelect = true; openFileDialog.Title = "Select Multiple Files"; openFileDialog.Closed += new Function <NOpenFileDialogResult>(OnMultiselectOpenFileDialogClosed); openFileDialog.RequestShow(); }
private void OnOpenFileButtonClick(NEventArgs arg) { NOpenFileDialog openFileDialog = new NOpenFileDialog(); openFileDialog.FileTypes = new NFileDialogFileType[] { new NFileDialogFileType("ZIP Archives", "zip") }; openFileDialog.Closed += OnOpenFileDialogClosed; openFileDialog.RequestShow(); }
protected void OnOpenFileMenuItemClick(NEventArgs args) { NOpenFileDialog ofd = new NOpenFileDialog(); ofd.FileTypes = new NFileDialogFileType[] { new NFileDialogFileType("Text Files", "txt"), new NFileDialogFileType("All Files", "*") }; ofd.SelectedFilter = 0; ofd.MultiSelect = false; ofd.Closed += new Function <NOpenFileDialogResult>(OnOpenFileDialogClosed); ofd.RequestShow(); }
private void ShowOpenFileDialog() { NOpenFileDialog openFileDialog = new NOpenFileDialog(); openFileDialog.FileTypes = new NFileDialogFileType[] { new NFileDialogFileType("Text Files", "txt"), new NFileDialogFileType("XML Files", "xml"), new NFileDialogFileType("All Files", "*") }; openFileDialog.SelectedFilter = 0; openFileDialog.MultiSelect = false; openFileDialog.InitialDirectory = ""; openFileDialog.Title = "Open Text File"; openFileDialog.Closed += new Function <NOpenFileDialogResult>(OnOpenFileDialogClosed); openFileDialog.RequestShow(); }