Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            // New folder
            var dialog = new NewFileDialog("\\", path_txt.Text);

            dialog.ShowDialog();
        }
Beispiel #2
0
        private void contextMenuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            string ext = "";

            switch (e.ClickedItem.Text)
            {
            case "Text file":
                ext = "txt";
                break;

            case "Rich Text Format file":
                ext = "rtf";
                break;

            case "Word Document":
                ext = "docx";
                break;

            case "Custom":
                ext = null;
                break;

            default:
                return;
            }
            var dialog = new NewFileDialog(ext, path_txt.Text);

            dialog.ShowDialog();
        }