示例#1
0
        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();
            }
        }
示例#2
0
        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();
            }
        }