From 8962e0849a0f84c2e3a6dd22b8f3f17e06cae3e9 Mon Sep 17 00:00:00 2001 From: claire Date: Tue, 28 Mar 2023 10:42:10 -0700 Subject: [PATCH] Updated readme and improved running instance behavior --- LunaWin/LunaWin/Program.cs | 3 ++- README.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/LunaWin/LunaWin/Program.cs b/LunaWin/LunaWin/Program.cs index a049eda..e3e704a 100644 --- a/LunaWin/LunaWin/Program.cs +++ b/LunaWin/LunaWin/Program.cs @@ -47,8 +47,9 @@ namespace LunaWin } } else { + MessageBox.Show("LunaWin is already running."); Application.Exit(); } } } -} +} \ No newline at end of file diff --git a/README.md b/README.md index a12e284..68f55e3 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ This project demonstrates a number of concepts, some more advanced than others. **Advanced** -* Using [`DllImport`](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.dllimportattribute?view=net-8.0) to access the current Windows 10+ theme (light or dark) natively +* Using [`Mutex`](https://learn.microsoft.com/en-us/dotnet/api/system.threading.mutex?view=netframework-4.7.2) to find exisiting instance of application +* Using [`DllImport`](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.dllimportattribute?view=netframework-4.7.2) to access the current Windows 10+ theme (light or dark) natively * Overloading [`WndProc`](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.wndproc?view=windowsdesktop-8.0) to handle system-wide messaging, to detect Windows 10+ theme changes * Accessing memory directly through pointers and [`unsafe`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/unsafe) code handling \ No newline at end of file