CSharp examples for System.Windows.Forms:Dialog
Creates dialog to point to certificate file.
using System.Windows.Forms; using System.IO;/*from w ww.j a v a2 s .c om*/ using System.Diagnostics; public class Main{ /// <summary> /// Creates dialog to point to certificate file. /// </summary> public static OpenFileDialog OpenCertificateFile(string title) { var openFile = new OpenFileDialog(); openFile.Title = title; openFile.DefaultExt = ".pfx"; openFile.Filter = "Certificate File|*.pfx|All files|*.*"; openFile.FilterIndex = 0; openFile.CheckFileExists = true; openFile.CheckPathExists = true; return openFile; } }