コード例 #1
0
ファイル: window1.xaml.cs プロジェクト: kyzmitch/Cip
        private void SaveVistaFileDialogClicked(object sender, RoutedEventArgs e)
        {
            CommonSaveFileDialog saveDialog =
                new CommonSaveFileDialog("My Save File Dialog");

            saveDialog.Filters.Add(new CommonFileDialogFilter("My Test Docs", "tdc,tdcx"));
            saveDialog.Filters.Add(new CommonFileDialogFilter("Word Docs", "doc,docx"));

            saveDialog.DefaultExtension = "doc";
            saveDialog.AddExtension = true;

            CommonFileDialogResult result = saveDialog.ShowDialog();
            if (!result.Canceled)
                MessageBox.Show("File chosen: " + saveDialog.FileName);
        }
コード例 #2
0
ファイル: Window1.xaml.cs プロジェクト: ssickles/archive
        private void SaveVistaFileDialogClicked(object sender, RoutedEventArgs e)
        {
            CommonSaveFileDialog saveDialog = new CommonSaveFileDialog();
            saveDialog.Title = "My Save File Dialog";
            saveDialog.EnableMiniMode = true;

            CommonFileDialogResult result = saveDialog.ShowDialog();
            if (!result.Canceled)
                MessageBox.Show("File chosen: " + saveDialog.FileName);
        }