Пример #1
0
        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();
        }
Пример #2
0
        private void OnOpenFileButtonClick(NEventArgs arg)
        {
            NOpenFileDialog openFileDialog = new NOpenFileDialog();

            openFileDialog.FileTypes = new NFileDialogFileType[] { new NFileDialogFileType("Xml Files (*.xml)", "xml") };
            openFileDialog.Closed   += OnOpenFileDialogClosed;
            openFileDialog.RequestShow();
        }
Пример #3
0
        private void ShowMultiselectOpenFileDialog()
        {
            NOpenFileDialog openFileDialog = new NOpenFileDialog();

            openFileDialog.MultiSelect = true;
            openFileDialog.Title       = "Select Multiple Files";

            openFileDialog.Closed += new Function <NOpenFileDialogResult>(OnMultiselectOpenFileDialogClosed);
            openFileDialog.RequestShow();
        }
Пример #4
0
        private void OnOpenFileButtonClick(NEventArgs arg)
        {
            NOpenFileDialog openFileDialog = new NOpenFileDialog();

            openFileDialog.FileTypes = new NFileDialogFileType[] {
                new NFileDialogFileType("ZIP Archives", "zip")
            };

            openFileDialog.Closed += OnOpenFileDialogClosed;
            openFileDialog.RequestShow();
        }
Пример #5
0
        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();
        }
Пример #6
0
        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();
        }