Replaced the SplitContainer with SplitContainerAdv. Now the panels are directly resized and the splitter can be drawn nicely.
1.1 --- a/GUI/MainForm.Designer.cs Sun Jul 18 17:08:33 2010 +0000
1.2 +++ b/GUI/MainForm.Designer.cs Sat Jul 24 20:15:49 2010 +0000
1.3 @@ -62,7 +62,6 @@
1.4 private void InitializeComponent() {
1.5 this.components = new System.ComponentModel.Container();
1.6 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
1.7 - this.treeView = new Aga.Controls.Tree.TreeViewAdv();
1.8 this.sensor = new Aga.Controls.Tree.TreeColumn();
1.9 this.value = new Aga.Controls.Tree.TreeColumn();
1.10 this.min = new Aga.Controls.Tree.TreeColumn();
1.11 @@ -101,47 +100,17 @@
1.12 this.hddMenuItem = new System.Windows.Forms.MenuItem();
1.13 this.helpMenuItem = new System.Windows.Forms.MenuItem();
1.14 this.aboutMenuItem = new System.Windows.Forms.MenuItem();
1.15 - this.splitContainer = new System.Windows.Forms.SplitContainer();
1.16 - this.plotPanel = new OpenHardwareMonitor.GUI.PlotPanel();
1.17 this.sensorContextMenu = new System.Windows.Forms.ContextMenu();
1.18 this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
1.19 this.timer = new System.Windows.Forms.Timer(this.components);
1.20 + this.splitContainer = new OpenHardwareMonitor.GUI.SplitContainerAdv();
1.21 + this.treeView = new Aga.Controls.Tree.TreeViewAdv();
1.22 + this.plotPanel = new OpenHardwareMonitor.GUI.PlotPanel();
1.23 this.splitContainer.Panel1.SuspendLayout();
1.24 this.splitContainer.Panel2.SuspendLayout();
1.25 this.splitContainer.SuspendLayout();
1.26 this.SuspendLayout();
1.27 //
1.28 - // treeView
1.29 - //
1.30 - this.treeView.BackColor = System.Drawing.SystemColors.Window;
1.31 - this.treeView.Columns.Add(this.sensor);
1.32 - this.treeView.Columns.Add(this.value);
1.33 - this.treeView.Columns.Add(this.min);
1.34 - this.treeView.Columns.Add(this.max);
1.35 - this.treeView.DefaultToolTipProvider = null;
1.36 - this.treeView.Dock = System.Windows.Forms.DockStyle.Fill;
1.37 - this.treeView.DragDropMarkColor = System.Drawing.Color.Black;
1.38 - this.treeView.FullRowSelect = true;
1.39 - this.treeView.GridLineStyle = Aga.Controls.Tree.GridLineStyle.Horizontal;
1.40 - this.treeView.LineColor = System.Drawing.SystemColors.ControlDark;
1.41 - this.treeView.Location = new System.Drawing.Point(0, 0);
1.42 - this.treeView.Model = null;
1.43 - this.treeView.Name = "treeView";
1.44 - this.treeView.NodeControls.Add(this.nodeImage);
1.45 - this.treeView.NodeControls.Add(this.nodeCheckBox);
1.46 - this.treeView.NodeControls.Add(this.nodeTextBoxText);
1.47 - this.treeView.NodeControls.Add(this.nodeTextBoxValue);
1.48 - this.treeView.NodeControls.Add(this.nodeTextBoxMin);
1.49 - this.treeView.NodeControls.Add(this.nodeTextBoxMax);
1.50 - this.treeView.RowHeight = 18;
1.51 - this.treeView.SelectedNode = null;
1.52 - this.treeView.Size = new System.Drawing.Size(386, 488);
1.53 - this.treeView.TabIndex = 0;
1.54 - this.treeView.Text = "treeView";
1.55 - this.treeView.UseColumns = true;
1.56 - this.treeView.NodeMouseDoubleClick += new System.EventHandler<Aga.Controls.Tree.TreeNodeAdvMouseEventArgs>(this.treeView_NodeMouseDoubleClick);
1.57 - this.treeView.Click += new System.EventHandler(this.treeView_Click);
1.58 - //
1.59 // sensor
1.60 //
1.61 this.sensor.Header = "Sensor";
1.62 @@ -392,34 +361,6 @@
1.63 this.aboutMenuItem.Text = "About";
1.64 this.aboutMenuItem.Click += new System.EventHandler(this.aboutMenuItem_Click);
1.65 //
1.66 - // splitContainer
1.67 - //
1.68 - this.splitContainer.Location = new System.Drawing.Point(12, 12);
1.69 - this.splitContainer.Name = "splitContainer";
1.70 - this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
1.71 - //
1.72 - // splitContainer.Panel1
1.73 - //
1.74 - this.splitContainer.Panel1.Controls.Add(this.treeView);
1.75 - //
1.76 - // splitContainer.Panel2
1.77 - //
1.78 - this.splitContainer.Panel2.Controls.Add(this.plotPanel);
1.79 - this.splitContainer.Panel2.Cursor = System.Windows.Forms.Cursors.Default;
1.80 - this.splitContainer.Size = new System.Drawing.Size(386, 662);
1.81 - this.splitContainer.SplitterDistance = 488;
1.82 - this.splitContainer.SplitterWidth = 3;
1.83 - this.splitContainer.TabIndex = 3;
1.84 - //
1.85 - // plotPanel
1.86 - //
1.87 - this.plotPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
1.88 - this.plotPanel.Dock = System.Windows.Forms.DockStyle.Fill;
1.89 - this.plotPanel.Location = new System.Drawing.Point(0, 0);
1.90 - this.plotPanel.Name = "plotPanel";
1.91 - this.plotPanel.Size = new System.Drawing.Size(386, 171);
1.92 - this.plotPanel.TabIndex = 0;
1.93 - //
1.94 // saveFileDialog
1.95 //
1.96 this.saveFileDialog.DefaultExt = "txt";
1.97 @@ -433,14 +374,76 @@
1.98 this.timer.Interval = 1000;
1.99 this.timer.Tick += new System.EventHandler(this.timer_Tick);
1.100 //
1.101 + // splitContainer
1.102 + //
1.103 + this.splitContainer.Border3DStyle = System.Windows.Forms.Border3DStyle.Raised;
1.104 + this.splitContainer.Color = System.Drawing.SystemColors.Control;
1.105 + this.splitContainer.Cursor = System.Windows.Forms.Cursors.Default;
1.106 + this.splitContainer.Location = new System.Drawing.Point(12, 12);
1.107 + this.splitContainer.Name = "splitContainer";
1.108 + this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
1.109 + //
1.110 + // splitContainer.Panel1
1.111 + //
1.112 + this.splitContainer.Panel1.Controls.Add(this.treeView);
1.113 + //
1.114 + // splitContainer.Panel2
1.115 + //
1.116 + this.splitContainer.Panel2.Controls.Add(this.plotPanel);
1.117 + this.splitContainer.Panel2.Cursor = System.Windows.Forms.Cursors.Default;
1.118 + this.splitContainer.Size = new System.Drawing.Size(386, 483);
1.119 + this.splitContainer.SplitterDistance = 354;
1.120 + this.splitContainer.SplitterWidth = 5;
1.121 + this.splitContainer.TabIndex = 3;
1.122 + //
1.123 + // treeView
1.124 + //
1.125 + this.treeView.BackColor = System.Drawing.SystemColors.Window;
1.126 + this.treeView.BorderStyle = System.Windows.Forms.BorderStyle.None;
1.127 + this.treeView.Columns.Add(this.sensor);
1.128 + this.treeView.Columns.Add(this.value);
1.129 + this.treeView.Columns.Add(this.min);
1.130 + this.treeView.Columns.Add(this.max);
1.131 + this.treeView.DefaultToolTipProvider = null;
1.132 + this.treeView.Dock = System.Windows.Forms.DockStyle.Fill;
1.133 + this.treeView.DragDropMarkColor = System.Drawing.Color.Black;
1.134 + this.treeView.FullRowSelect = true;
1.135 + this.treeView.GridLineStyle = Aga.Controls.Tree.GridLineStyle.Horizontal;
1.136 + this.treeView.LineColor = System.Drawing.SystemColors.ControlDark;
1.137 + this.treeView.Location = new System.Drawing.Point(0, 0);
1.138 + this.treeView.Model = null;
1.139 + this.treeView.Name = "treeView";
1.140 + this.treeView.NodeControls.Add(this.nodeImage);
1.141 + this.treeView.NodeControls.Add(this.nodeCheckBox);
1.142 + this.treeView.NodeControls.Add(this.nodeTextBoxText);
1.143 + this.treeView.NodeControls.Add(this.nodeTextBoxValue);
1.144 + this.treeView.NodeControls.Add(this.nodeTextBoxMin);
1.145 + this.treeView.NodeControls.Add(this.nodeTextBoxMax);
1.146 + this.treeView.RowHeight = 18;
1.147 + this.treeView.SelectedNode = null;
1.148 + this.treeView.Size = new System.Drawing.Size(386, 354);
1.149 + this.treeView.TabIndex = 0;
1.150 + this.treeView.Text = "treeView";
1.151 + this.treeView.UseColumns = true;
1.152 + this.treeView.NodeMouseDoubleClick += new System.EventHandler<Aga.Controls.Tree.TreeNodeAdvMouseEventArgs>(this.treeView_NodeMouseDoubleClick);
1.153 + this.treeView.Click += new System.EventHandler(this.treeView_Click);
1.154 + //
1.155 + // plotPanel
1.156 + //
1.157 + this.plotPanel.Dock = System.Windows.Forms.DockStyle.Fill;
1.158 + this.plotPanel.Location = new System.Drawing.Point(0, 0);
1.159 + this.plotPanel.Name = "plotPanel";
1.160 + this.plotPanel.Size = new System.Drawing.Size(386, 124);
1.161 + this.plotPanel.TabIndex = 0;
1.162 + //
1.163 // MainForm
1.164 //
1.165 - this.Menu = this.mainMenu;
1.166 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
1.167 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
1.168 - this.ClientSize = new System.Drawing.Size(410, 686);
1.169 + this.ClientSize = new System.Drawing.Size(418, 596);
1.170 this.Controls.Add(this.splitContainer);
1.171 - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
1.172 + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
1.173 + this.Menu = this.mainMenu;
1.174 this.Name = "MainForm";
1.175 this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
1.176 this.Text = "Open Hardware Monitor";
1.177 @@ -467,7 +470,7 @@
1.178 private Aga.Controls.Tree.NodeControls.NodeTextBox nodeTextBoxValue;
1.179 private Aga.Controls.Tree.NodeControls.NodeTextBox nodeTextBoxMin;
1.180 private Aga.Controls.Tree.NodeControls.NodeTextBox nodeTextBoxMax;
1.181 - private System.Windows.Forms.SplitContainer splitContainer;
1.182 + private SplitContainerAdv splitContainer;
1.183 private PlotPanel plotPanel;
1.184 private System.Windows.Forms.MenuItem viewMenuItem;
1.185 private System.Windows.Forms.MenuItem plotMenuItem;
2.1 --- a/GUI/MainForm.cs Sun Jul 18 17:08:33 2010 +0000
2.2 +++ b/GUI/MainForm.cs Sat Jul 24 20:15:49 2010 +0000
2.3 @@ -100,8 +100,8 @@
2.4 }
2.5
2.6 ClientSize = new Size(
2.7 - Utilities.Config.Get("mainForm.Width", ClientSize.Width),
2.8 - Utilities.Config.Get("mainForm.Height", ClientSize.Height));
2.9 + Utilities.Config.Get("mainForm.Width", 470),
2.10 + Utilities.Config.Get("mainForm.Height", 640));
2.11
2.12 foreach (TreeColumn column in treeView.Columns)
2.13 column.Width = Math.Max(20, Math.Min(400,
3.1 --- a/GUI/PlotPanel.Designer.cs Sun Jul 18 17:08:33 2010 +0000
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,78 +0,0 @@
3.4 -/*
3.5 -
3.6 - Version: MPL 1.1/GPL 2.0/LGPL 2.1
3.7 -
3.8 - The contents of this file are subject to the Mozilla Public License Version
3.9 - 1.1 (the "License"); you may not use this file except in compliance with
3.10 - the License. You may obtain a copy of the License at
3.11 -
3.12 - http://www.mozilla.org/MPL/
3.13 -
3.14 - Software distributed under the License is distributed on an "AS IS" basis,
3.15 - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
3.16 - for the specific language governing rights and limitations under the License.
3.17 -
3.18 - The Original Code is the Open Hardware Monitor code.
3.19 -
3.20 - The Initial Developer of the Original Code is
3.21 - Michael Möller <m.moeller@gmx.ch>.
3.22 - Portions created by the Initial Developer are Copyright (C) 2009-2010
3.23 - the Initial Developer. All Rights Reserved.
3.24 -
3.25 - Contributor(s):
3.26 -
3.27 - Alternatively, the contents of this file may be used under the terms of
3.28 - either the GNU General Public License Version 2 or later (the "GPL"), or
3.29 - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
3.30 - in which case the provisions of the GPL or the LGPL are applicable instead
3.31 - of those above. If you wish to allow use of your version of this file only
3.32 - under the terms of either the GPL or the LGPL, and not to allow others to
3.33 - use your version of this file under the terms of the MPL, indicate your
3.34 - decision by deleting the provisions above and replace them with the notice
3.35 - and other provisions required by the GPL or the LGPL. If you do not delete
3.36 - the provisions above, a recipient may use your version of this file under
3.37 - the terms of any one of the MPL, the GPL or the LGPL.
3.38 -
3.39 -*/
3.40 -
3.41 -namespace OpenHardwareMonitor.GUI {
3.42 - partial class PlotPanel {
3.43 - /// <summary>
3.44 - /// Required designer variable.
3.45 - /// </summary>
3.46 - private System.ComponentModel.IContainer components = null;
3.47 -
3.48 - /// <summary>
3.49 - /// Clean up any resources being used.
3.50 - /// </summary>
3.51 - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
3.52 - protected override void Dispose(bool disposing) {
3.53 - if (disposing && (components != null)) {
3.54 - components.Dispose();
3.55 - }
3.56 - base.Dispose(disposing);
3.57 - }
3.58 -
3.59 - #region Component Designer generated code
3.60 -
3.61 - /// <summary>
3.62 - /// Required method for Designer support - do not modify
3.63 - /// the contents of this method with the code editor.
3.64 - /// </summary>
3.65 - private void InitializeComponent() {
3.66 - this.SuspendLayout();
3.67 - //
3.68 - // PlotPanel
3.69 - //
3.70 - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
3.71 - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
3.72 - this.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
3.73 - this.Name = "PlotPanel";
3.74 - this.Size = new System.Drawing.Size(170, 168);
3.75 - this.ResumeLayout(false);
3.76 -
3.77 - }
3.78 -
3.79 - #endregion
3.80 - }
3.81 -}
4.1 --- a/GUI/PlotPanel.cs Sun Jul 18 17:08:33 2010 +0000
4.2 +++ b/GUI/PlotPanel.cs Sat Jul 24 20:15:49 2010 +0000
4.3 @@ -1,4 +1,4 @@
4.4 -/*
4.5 +/*
4.6
4.7 Version: MPL 1.1/GPL 2.0/LGPL 2.1
4.8
4.9 @@ -44,7 +44,7 @@
4.10 using OpenHardwareMonitor.Hardware;
4.11
4.12 namespace OpenHardwareMonitor.GUI {
4.13 - public partial class PlotPanel : UserControl {
4.14 + public class PlotPanel : UserControl {
4.15
4.16 private DateTime now;
4.17 private List<ISensor> clocks = new List<ISensor>();
4.18 @@ -61,12 +61,10 @@
4.19 public PlotPanel() {
4.20 this.SetStyle(ControlStyles.DoubleBuffer |
4.21 ControlStyles.UserPaint |
4.22 - ControlStyles.AllPaintingInWmPaint |
4.23 + ControlStyles.AllPaintingInWmPaint |
4.24 ControlStyles.ResizeRedraw, true);
4.25 this.UpdateStyles();
4.26
4.27 - InitializeComponent();
4.28 -
4.29 centerlower = new StringFormat();
4.30 centerlower.Alignment = StringAlignment.Center;
4.31 centerlower.LineAlignment = StringAlignment.Near;
4.32 @@ -103,9 +101,9 @@
4.33
4.34 float maxTemp = (float)Math.Ceiling(maxTempNullable.Value / 10) * 10;
4.35 float minTemp = (float)Math.Floor(minTempNullable.Value / 10) * 10;
4.36 - if (maxTemp == minTemp)
4.37 - maxTemp += 10;
4.38 -
4.39 + if (maxTemp == minTemp)
4.40 + maxTemp += 10;
4.41 +
4.42 int countTempMax = 4;
4.43 float deltaTemp = maxTemp - minTemp;
4.44 int countTemp = (int)Math.Round(deltaTemp / 2);
4.45 @@ -125,9 +123,9 @@
4.46
4.47 private List<float> GetTimeGrid() {
4.48
4.49 - float maxTime = 5;
4.50 + float maxTime = 5;
4.51 if (temperatures.Count > 0) {
4.52 - IEnumerator<ISensorEntry> enumerator =
4.53 + IEnumerator<ISensorEntry> enumerator =
4.54 temperatures[0].Plot.GetEnumerator();
4.55 if (enumerator.MoveNext()) {
4.56 maxTime = (float)(now - enumerator.Current.Time).TotalMinutes;
4.57 @@ -174,7 +172,7 @@
4.58
4.59 float leftScaleSpace = 5;
4.60 float bottomScaleSpace = 5;
4.61 -
4.62 +
4.63 g.Clear(Color.White);
4.64
4.65 if (w > 0 && h > 0) {
4.66 @@ -212,32 +210,31 @@
4.67
4.68 g.SmoothingMode = SmoothingMode.None;
4.69 g.FillRectangle(Brushes.White, 0, 0, x0, r.Height);
4.70 - g.FillRectangle(Brushes.White, x0 + w + 1, 0, r.Width - x0 - w,
4.71 + g.FillRectangle(Brushes.White, x0 + w + 1, 0, r.Width - x0 - w,
4.72 r.Height);
4.73
4.74 for (int i = 1; i < timeGrid.Count; i++) {
4.75 - float x = x0 + (timeGrid.Count - 1 - i) * w / (timeGrid.Count - 1);
4.76 - g.DrawString(timeGrid[i].ToString(), Font, Brushes.Black, x,
4.77 + float x = x0 + (timeGrid.Count - 1 - i) * w / (timeGrid.Count - 1);
4.78 + g.DrawString(timeGrid[i].ToString(), Font, Brushes.Black, x,
4.79 y0 + h + bottomScaleSpace, centerlower);
4.80 }
4.81
4.82 for (int i = 0; i < tempGrid.Count - 1; i++) {
4.83 float y = y0 + (tempGrid.Count - 1 - i) * h / (tempGrid.Count - 1);
4.84 - g.DrawString(tempGrid[i].ToString(), Font, Brushes.Black,
4.85 + g.DrawString(tempGrid[i].ToString(), Font, Brushes.Black,
4.86 x0 - leftScaleSpace, y, centerleft);
4.87 }
4.88
4.89 g.SmoothingMode = SmoothingMode.HighQuality;
4.90 g.DrawString("[°C]", Font, Brushes.Black, x0 - leftScaleSpace, y0,
4.91 - lowerleft);
4.92 + lowerleft);
4.93 g.DrawString("[min]", Font, Brushes.Black, x0 + w,
4.94 - y0 + h + bottomScaleSpace, lowerleft);
4.95 + y0 + h + bottomScaleSpace, lowerleft);
4.96 }
4.97 }
4.98
4.99 - public void SetSensors(List<ISensor> sensors,
4.100 - IDictionary<ISensor, Color> colors)
4.101 - {
4.102 + public void SetSensors(List<ISensor> sensors,
4.103 + IDictionary<ISensor, Color> colors) {
4.104 this.colors = colors;
4.105 List<ISensor> clocks = new List<ISensor>();
4.106 List<ISensor> temperatures = new List<ISensor>();
5.1 --- a/GUI/PlotPanel.resx Sun Jul 18 17:08:33 2010 +0000
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,120 +0,0 @@
5.4 -<?xml version="1.0" encoding="utf-8"?>
5.5 -<root>
5.6 - <!--
5.7 - Microsoft ResX Schema
5.8 -
5.9 - Version 2.0
5.10 -
5.11 - The primary goals of this format is to allow a simple XML format
5.12 - that is mostly human readable. The generation and parsing of the
5.13 - various data types are done through the TypeConverter classes
5.14 - associated with the data types.
5.15 -
5.16 - Example:
5.17 -
5.18 - ... ado.net/XML headers & schema ...
5.19 - <resheader name="resmimetype">text/microsoft-resx</resheader>
5.20 - <resheader name="version">2.0</resheader>
5.21 - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
5.22 - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
5.23 - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
5.24 - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
5.25 - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
5.26 - <value>[base64 mime encoded serialized .NET Framework object]</value>
5.27 - </data>
5.28 - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
5.29 - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
5.30 - <comment>This is a comment</comment>
5.31 - </data>
5.32 -
5.33 - There are any number of "resheader" rows that contain simple
5.34 - name/value pairs.
5.35 -
5.36 - Each data row contains a name, and value. The row also contains a
5.37 - type or mimetype. Type corresponds to a .NET class that support
5.38 - text/value conversion through the TypeConverter architecture.
5.39 - Classes that don't support this are serialized and stored with the
5.40 - mimetype set.
5.41 -
5.42 - The mimetype is used for serialized objects, and tells the
5.43 - ResXResourceReader how to depersist the object. This is currently not
5.44 - extensible. For a given mimetype the value must be set accordingly:
5.45 -
5.46 - Note - application/x-microsoft.net.object.binary.base64 is the format
5.47 - that the ResXResourceWriter will generate, however the reader can
5.48 - read any of the formats listed below.
5.49 -
5.50 - mimetype: application/x-microsoft.net.object.binary.base64
5.51 - value : The object must be serialized with
5.52 - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
5.53 - : and then encoded with base64 encoding.
5.54 -
5.55 - mimetype: application/x-microsoft.net.object.soap.base64
5.56 - value : The object must be serialized with
5.57 - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
5.58 - : and then encoded with base64 encoding.
5.59 -
5.60 - mimetype: application/x-microsoft.net.object.bytearray.base64
5.61 - value : The object must be serialized into a byte array
5.62 - : using a System.ComponentModel.TypeConverter
5.63 - : and then encoded with base64 encoding.
5.64 - -->
5.65 - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
5.66 - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
5.67 - <xsd:element name="root" msdata:IsDataSet="true">
5.68 - <xsd:complexType>
5.69 - <xsd:choice maxOccurs="unbounded">
5.70 - <xsd:element name="metadata">
5.71 - <xsd:complexType>
5.72 - <xsd:sequence>
5.73 - <xsd:element name="value" type="xsd:string" minOccurs="0" />
5.74 - </xsd:sequence>
5.75 - <xsd:attribute name="name" use="required" type="xsd:string" />
5.76 - <xsd:attribute name="type" type="xsd:string" />
5.77 - <xsd:attribute name="mimetype" type="xsd:string" />
5.78 - <xsd:attribute ref="xml:space" />
5.79 - </xsd:complexType>
5.80 - </xsd:element>
5.81 - <xsd:element name="assembly">
5.82 - <xsd:complexType>
5.83 - <xsd:attribute name="alias" type="xsd:string" />
5.84 - <xsd:attribute name="name" type="xsd:string" />
5.85 - </xsd:complexType>
5.86 - </xsd:element>
5.87 - <xsd:element name="data">
5.88 - <xsd:complexType>
5.89 - <xsd:sequence>
5.90 - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
5.91 - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
5.92 - </xsd:sequence>
5.93 - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
5.94 - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
5.95 - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
5.96 - <xsd:attribute ref="xml:space" />
5.97 - </xsd:complexType>
5.98 - </xsd:element>
5.99 - <xsd:element name="resheader">
5.100 - <xsd:complexType>
5.101 - <xsd:sequence>
5.102 - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
5.103 - </xsd:sequence>
5.104 - <xsd:attribute name="name" type="xsd:string" use="required" />
5.105 - </xsd:complexType>
5.106 - </xsd:element>
5.107 - </xsd:choice>
5.108 - </xsd:complexType>
5.109 - </xsd:element>
5.110 - </xsd:schema>
5.111 - <resheader name="resmimetype">
5.112 - <value>text/microsoft-resx</value>
5.113 - </resheader>
5.114 - <resheader name="version">
5.115 - <value>2.0</value>
5.116 - </resheader>
5.117 - <resheader name="reader">
5.118 - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
5.119 - </resheader>
5.120 - <resheader name="writer">
5.121 - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
5.122 - </resheader>
5.123 -</root>
5.124 \ No newline at end of file
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/GUI/SplitContainerAdv.cs Sat Jul 24 20:15:49 2010 +0000
6.3 @@ -0,0 +1,150 @@
6.4 +/*
6.5 +
6.6 + Version: MPL 1.1/GPL 2.0/LGPL 2.1
6.7 +
6.8 + The contents of this file are subject to the Mozilla Public License Version
6.9 + 1.1 (the "License"); you may not use this file except in compliance with
6.10 + the License. You may obtain a copy of the License at
6.11 +
6.12 + http://www.mozilla.org/MPL/
6.13 +
6.14 + Software distributed under the License is distributed on an "AS IS" basis,
6.15 + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
6.16 + for the specific language governing rights and limitations under the License.
6.17 +
6.18 + The Original Code is the Open Hardware Monitor code.
6.19 +
6.20 + The Initial Developer of the Original Code is
6.21 + Michael Möller <m.moeller@gmx.ch>.
6.22 + Portions created by the Initial Developer are Copyright (C) 2009-2010
6.23 + the Initial Developer. All Rights Reserved.
6.24 +
6.25 + Contributor(s):
6.26 +
6.27 + Alternatively, the contents of this file may be used under the terms of
6.28 + either the GNU General Public License Version 2 or later (the "GPL"), or
6.29 + the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
6.30 + in which case the provisions of the GPL or the LGPL are applicable instead
6.31 + of those above. If you wish to allow use of your version of this file only
6.32 + under the terms of either the GPL or the LGPL, and not to allow others to
6.33 + use your version of this file under the terms of the MPL, indicate your
6.34 + decision by deleting the provisions above and replace them with the notice
6.35 + and other provisions required by the GPL or the LGPL. If you do not delete
6.36 + the provisions above, a recipient may use your version of this file under
6.37 + the terms of any one of the MPL, the GPL or the LGPL.
6.38 +
6.39 +*/
6.40 +
6.41 +using System;
6.42 +using System.Collections.Generic;
6.43 +using System.Drawing;
6.44 +using System.Windows.Forms;
6.45 +
6.46 +namespace OpenHardwareMonitor.GUI {
6.47 + public class SplitContainerAdv : SplitContainer {
6.48 +
6.49 + private int delta = 0;
6.50 + private Border3DStyle border3DStyle = Border3DStyle.Raised;
6.51 + private Color color = SystemColors.Control;
6.52 +
6.53 + public SplitContainerAdv()
6.54 + : base() {
6.55 + SetStyle(ControlStyles.ResizeRedraw, true);
6.56 + SetStyle(ControlStyles.AllPaintingInWmPaint, true);
6.57 + SetStyle(ControlStyles.UserPaint, true);
6.58 + SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
6.59 + SetStyle(ControlStyles.ContainerControl, true);
6.60 + UpdateStyles();
6.61 + }
6.62 +
6.63 + protected override void OnPaint(PaintEventArgs e) {
6.64 + base.OnPaint(e);
6.65 +
6.66 + Graphics g = e.Graphics;
6.67 + Rectangle r = SplitterRectangle;
6.68 + using (SolidBrush brush = new SolidBrush(color))
6.69 + g.FillRectangle(brush, r);
6.70 + ControlPaint.DrawBorder3D(g, r, border3DStyle);
6.71 + }
6.72 +
6.73 + protected override void OnKeyDown(KeyEventArgs e) {
6.74 + if (!base.IsSplitterFixed) {
6.75 + if (e.KeyData == Keys.Right || e.KeyData == Keys.Down) {
6.76 + SplitterDistance += SplitterIncrement;
6.77 + } else if (e.KeyData == Keys.Left || e.KeyData == Keys.Up) {
6.78 + SplitterDistance -= SplitterIncrement;
6.79 + }
6.80 + Invalidate();
6.81 + }
6.82 + }
6.83 +
6.84 + protected override void OnMouseDown(MouseEventArgs e) {
6.85 + if (Orientation == Orientation.Vertical) {
6.86 + delta = this.SplitterDistance - e.X;
6.87 + Cursor.Current = Cursors.VSplit;
6.88 + } else {
6.89 + delta = this.SplitterDistance - e.Y;
6.90 + Cursor.Current = Cursors.HSplit;
6.91 + }
6.92 + base.IsSplitterFixed = true;
6.93 + }
6.94 +
6.95 + protected override void OnMouseMove(MouseEventArgs e) {
6.96 + if (base.IsSplitterFixed) {
6.97 + if (e.Button == MouseButtons.Left) {
6.98 + if (Orientation == Orientation.Vertical) {
6.99 + if (e.X > 0 && e.X < Width) {
6.100 + SplitterDistance = e.X + delta < 0 ? 0 : e.X + delta;
6.101 + }
6.102 + } else {
6.103 + if (e.Y > 0 && e.Y < Height) {
6.104 + SplitterDistance = e.Y + delta < 0 ? 0 : e.Y + delta;
6.105 + }
6.106 + }
6.107 + } else {
6.108 + base.IsSplitterFixed = false;
6.109 + }
6.110 + Invalidate();
6.111 + } else {
6.112 + if (SplitterRectangle.Contains(e.Location)) {
6.113 + Cursor = Orientation == Orientation.Vertical ?
6.114 + Cursors.VSplit : Cursors.HSplit;
6.115 + }
6.116 + }
6.117 + }
6.118 +
6.119 + protected override void OnMouseLeave(EventArgs e) {
6.120 + base.OnMouseLeave(e);
6.121 + Cursor = Cursors.Default;
6.122 + }
6.123 +
6.124 + protected override void OnMouseUp(MouseEventArgs e) {
6.125 + delta = 0;
6.126 + base.IsSplitterFixed = false;
6.127 + Cursor.Current = Cursors.Default;
6.128 + }
6.129 +
6.130 + public Border3DStyle Border3DStyle {
6.131 + get { return border3DStyle; }
6.132 + set {
6.133 + border3DStyle = value;
6.134 + Invalidate(false);
6.135 + }
6.136 + }
6.137 +
6.138 + public Color Color {
6.139 + get { return color; }
6.140 + set {
6.141 + color = value;
6.142 + Invalidate(false);
6.143 + }
6.144 + }
6.145 +
6.146 + public new bool IsSplitterFixed {
6.147 + get {
6.148 + return false;
6.149 + }
6.150 + }
6.151 +
6.152 + }
6.153 +}
7.1 --- a/OpenHardwareMonitor.csproj Sun Jul 18 17:08:33 2010 +0000
7.2 +++ b/OpenHardwareMonitor.csproj Sat Jul 24 20:15:49 2010 +0000
7.3 @@ -61,6 +61,9 @@
7.4 </Reference>
7.5 </ItemGroup>
7.6 <ItemGroup>
7.7 + <Compile Include="GUI\PlotPanel.cs">
7.8 + <SubType>UserControl</SubType>
7.9 + </Compile>
7.10 <Compile Include="GUI\ReportForm.cs">
7.11 <SubType>Form</SubType>
7.12 </Compile>
7.13 @@ -82,6 +85,9 @@
7.14 </Compile>
7.15 <Compile Include="GUI\ResetMinMaxVisitor.cs" />
7.16 <Compile Include="GUI\SensorNotifyIcon.cs" />
7.17 + <Compile Include="GUI\SplitContainerAdv.cs">
7.18 + <SubType>Component</SubType>
7.19 + </Compile>
7.20 <Compile Include="GUI\SystemTray.cs" />
7.21 <Compile Include="GUI\StartupManager.cs" />
7.22 <Compile Include="GUI\TaskScheduler.cs" />
7.23 @@ -148,12 +154,6 @@
7.24 <Compile Include="Utilities\IReadOnlyArray.cs" />
7.25 <Compile Include="Utilities\ListSet.cs" />
7.26 <Compile Include="Utilities\PInvokeDelegateFactory.cs" />
7.27 - <Compile Include="GUI\PlotPanel.cs">
7.28 - <SubType>UserControl</SubType>
7.29 - </Compile>
7.30 - <Compile Include="GUI\PlotPanel.Designer.cs">
7.31 - <DependentUpon>PlotPanel.cs</DependentUpon>
7.32 - </Compile>
7.33 <Compile Include="Program.cs" />
7.34 <Compile Include="Hardware\CPU\IntelCPU.cs" />
7.35 <Compile Include="Hardware\CPU\CPUGroup.cs" />
7.36 @@ -170,10 +170,6 @@
7.37 <DependentUpon>AboutBox.cs</DependentUpon>
7.38 <SubType>Designer</SubType>
7.39 </EmbeddedResource>
7.40 - <EmbeddedResource Include="GUI\PlotPanel.resx">
7.41 - <DependentUpon>PlotPanel.cs</DependentUpon>
7.42 - <SubType>Designer</SubType>
7.43 - </EmbeddedResource>
7.44 <EmbeddedResource Include="Resources\ati.png">
7.45 </EmbeddedResource>
7.46 <EmbeddedResource Include="Resources\bigng.png" />