protected override bool OnStartup(StartupEventArgs e) { const string extension = ".testDoc"; const string title = "SingleInstanceApplication"; const string extensionDescription = "A Test Document"; FileRegistrationHelper.SetFileAssociation(extension, string.Format("{0}.{1}", title, extensionDescription)); _application = new WpfApplication(); _application.Run(); return(false); }
protected override bool OnStartup( Microsoft.VisualBasic.ApplicationServices.StartupEventArgs e) { string extension = ".testDoc"; string title = "SingleInstanceApplication"; string extensionDescription = "A Test Document"; // Uncomment this line to create the file registration. // In Windows Vista, you'll need to run the application // as an administrator. FileRegistrationHelper.SetFileAssociation( extension, title + "." + extensionDescription); app = new WpfApp(); app.Run(); return(false); }