public static void Main() { // Ensures, that this application runs only one single instance if (SingleInstance <PlasmaApp> .InitializeAsFirstInstance(UniqueApplicationName)) { var application = new PlasmaApp(); application.InitializeComponent(); application.Run(); // Allow single instance code to perform cleanup operations SingleInstance <PlasmaApp> .Cleanup(); } }
public static void Main() { // Ensures, that this application runs only one single instance if (SingleInstance<PlasmaApp>.InitializeAsFirstInstance(UniqueApplicationName)) { var application = new PlasmaApp(); application.InitializeComponent(); application.Run(); // Allow single instance code to perform cleanup operations SingleInstance<PlasmaApp>.Cleanup(); } }