-
-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
111 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,45 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
using System.Threading; | ||
using System.Windows.Forms; | ||
|
||
namespace com.clusterrr.hakchi_gui | ||
{ | ||
static class Program | ||
{ | ||
[DllImport("user32.dll")] | ||
[return: MarshalAs(UnmanagedType.Bool)] | ||
static extern bool SetForegroundWindow(IntPtr hWnd); | ||
|
||
/// <summary> | ||
/// The main entry point for the application. | ||
/// </summary> | ||
[STAThread] | ||
static void Main() | ||
{ | ||
bool createdNew = true; | ||
using (Mutex mutex = new Mutex(true, "hakchi2", out createdNew)) | ||
{ | ||
if (createdNew) | ||
{ | ||
Application.EnableVisualStyles(); | ||
Application.SetCompatibleTextRenderingDefault(false); | ||
Application.Run(new MainForm()); | ||
} | ||
else | ||
{ | ||
Process current = Process.GetCurrentProcess(); | ||
foreach (Process process in Process.GetProcessesByName(current.ProcessName)) | ||
{ | ||
if (process.Id != current.Id) | ||
{ | ||
SetForegroundWindow(process.MainWindowHandle); | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
using System; | ||
using System.Diagnostics; | ||
using System.Runtime.InteropServices; | ||
using System.Threading; | ||
using System.Windows.Forms; | ||
|
||
namespace com.clusterrr.hakchi_gui | ||
{ | ||
static class Program | ||
{ | ||
[DllImport("user32.dll")] | ||
[return: MarshalAs(UnmanagedType.Bool)] | ||
static extern bool SetForegroundWindow(IntPtr hWnd); | ||
|
||
/// <summary> | ||
/// The main entry point for the application. | ||
/// </summary> | ||
[STAThread] | ||
static void Main() | ||
{ | ||
bool createdNew = true; | ||
using (Mutex mutex = new Mutex(true, "hakchi2", out createdNew)) | ||
{ | ||
if (createdNew) | ||
{ | ||
Application.EnableVisualStyles(); | ||
Application.SetCompatibleTextRenderingDefault(false); | ||
Application.Run(new MainForm()); | ||
} | ||
else | ||
{ | ||
Process current = Process.GetCurrentProcess(); | ||
foreach (Process process in Process.GetProcessesByName(current.ProcessName)) | ||
{ | ||
if (process.Id != current.Id) | ||
{ | ||
SetForegroundWindow(process.MainWindowHandle); | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
using com.clusterrr.Famicom; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace com.clusterrr.hakchi_gui | ||
{ | ||
public class UnsupportedMapperException : Exception | ||
{ | ||
public readonly NesFile ROM; | ||
public UnsupportedMapperException(NesFile nesFile) | ||
{ | ||
ROM = nesFile; | ||
} | ||
} | ||
} | ||
using com.clusterrr.Famicom; | ||
using System; | ||
|
||
namespace com.clusterrr.hakchi_gui | ||
{ | ||
public class UnsupportedMapperException : Exception | ||
{ | ||
public readonly NesFile ROM; | ||
public UnsupportedMapperException(NesFile nesFile) | ||
{ | ||
ROM = nesFile; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.