标签:style blog color io os ar sp div c
1 Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog(); 2 dlg.FileName = "User.txt"; // Default file name 3 dlg.DefaultExt = ".txt"; // Default file extension 4 dlg.Filter = "Text documents (.txt)|*.txt"; // Filter files by extension 5 6 var dir = System.IO.Path.GetDirectoryName(this.txtPlace.Text); 7 dlg.InitialDirectory = dir; 8 9 // Show save file dialog box 10 Nullable<bool> result = dlg.ShowDialog(); 11 12 // Process save file dialog box results 13 if (result == true) 14 { 15 // Save document 16 this.txtPlace.Text = dlg.FileName; 17 }
标签:style blog color io os ar sp div c
原文地址:http://www.cnblogs.com/cicaday/p/4008233.html