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) 2012 Prince Samuel <prince.samuel@gmail.com>
12 using System.Collections.Generic;
13 using System.ComponentModel;
17 using System.Windows.Forms;
19 using System.Net.Sockets;
20 using System.Diagnostics;
22 namespace OpenHardwareMonitor.GUI {
23 public partial class PortForm : Form {
24 private MainForm parent;
25 private string localIP;
26 public PortForm(MainForm m) {
27 InitializeComponent();
30 localIP = getLocalIP();
33 private void portTextBox_TextChanged(object sender, EventArgs e) {
37 private string getLocalIP() {
40 host = Dns.GetHostEntry(Dns.GetHostName());
41 foreach (IPAddress ip in host.AddressList) {
42 if (ip.AddressFamily == AddressFamily.InterNetwork) {
43 localIP = ip.ToString();
49 private void portNumericUpDn_ValueChanged(object sender, EventArgs e) {
50 string url = "http://" + localIP + ":" + portNumericUpDn.Value + "/";
51 webServerLinkLabel.Text = url;
52 webServerLinkLabel.Links.Remove(webServerLinkLabel.Links[0]);
53 webServerLinkLabel.Links.Add(0, webServerLinkLabel.Text.Length, url);
56 private void portOKButton_Click(object sender, EventArgs e) {
57 parent.Server.ListenerPort = (int)portNumericUpDn.Value;
61 private void portCancelButton_Click(object sender, EventArgs e) {
65 private void PortForm_Load(object sender, EventArgs e) {
66 portNumericUpDn.Value = parent.Server.ListenerPort;
67 portNumericUpDn_ValueChanged(null, null);
70 private void webServerLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
72 Process.Start(new ProcessStartInfo(e.Link.LinkData.ToString()));