Added mainboard specific configurations for the following Gigabyte mainboards: EX58-UD3R, G41M-Combo, G41MT-S2, G41MT-S2P, GA-MA770T-UD3P, GA-MA785GM-US2H, GA-MA78LM-S2H, GA-MA790X-UD3P, H55-USB3, H55N-USB3, H61M-DS2 REV 1.2, H61M-USB3-B3 REV 2.0, H67A-USB3-B3, P55A-UD3, P67A-UD3-B3, P67A-UD3R-B3, Z68A-D3H-B3, Z68AP-D3, Z68X-UD3H-B3.
3 This Source Code Form is subject to the terms of the Mozilla Public
4 License, v. 2.0. If a copy of the MPL was not distributed with this
5 file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 Copyright (C) 2009-2010 Michael Möller <mmoeller@openhardwaremonitor.org>
14 using System.Threading;
15 using System.Windows.Forms;
16 using OpenHardwareMonitor.GUI;
18 namespace OpenHardwareMonitor {
19 public static class Program {
22 public static void Main() {
24 Application.ThreadException +=
25 new ThreadExceptionEventHandler(Application_ThreadException);
26 Application.SetUnhandledExceptionMode(
27 UnhandledExceptionMode.CatchException);
29 AppDomain.CurrentDomain.UnhandledException +=
30 new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
33 if (!AllRequiredFilesAvailable())
36 Application.EnableVisualStyles();
37 Application.SetCompatibleTextRenderingDefault(false);
38 using (GUI.MainForm form = new GUI.MainForm()) {
39 form.FormClosed += delegate(Object sender, FormClosedEventArgs e) {
46 private static bool IsFileAvailable(string fileName) {
47 string path = Path.GetDirectoryName(Application.ExecutablePath) +
48 Path.DirectorySeparatorChar;
50 if (!File.Exists(path + fileName)) {
51 MessageBox.Show("The following file could not be found: " + fileName +
52 "\nPlease extract all files from the archive.", "Error",
53 MessageBoxButtons.OK, MessageBoxIcon.Error);
59 private static bool AllRequiredFilesAvailable() {
60 if (!IsFileAvailable("Aga.Controls.dll"))
62 if (!IsFileAvailable("OpenHardwareMonitorLib.dll"))
68 private static void ReportException(Exception e) {
69 CrashForm form = new CrashForm();
74 public static void Application_ThreadException(object sender,
75 ThreadExceptionEventArgs e)
78 ReportException(e.Exception);
85 public static void CurrentDomain_UnhandledException(object sender,
86 UnhandledExceptionEventArgs args)
89 Exception e = args.ExceptionObject as Exception;