From aa334c58d9f71585b5bac42914ee9bc4d969b37b Mon Sep 17 00:00:00 2001 From: "Burns, Terry" <Terry.Burns@ricardo.com> Date: Mon, 20 Oct 2014 10:05:51 +0000 Subject: [PATCH] Updates Before Changing ElectricalConsumer list to List from Dictionary git-tfs-id: [http://tfs00.element.root.com:8080/tfs/TFSCollection]$/VECTO;C1643 --- .../AuxillaryTestHarness.vbproj | 9 + AuxillaryTestHarness/ConsumerList.Designer.vb | 62 +++++ AuxillaryTestHarness/ConsumerList.resx | 120 +++++++++ AuxillaryTestHarness/ConsumerList.vb | 46 ++++ AuxillaryTestHarness/Dashboard.Designer.vb | 239 +++++++++++++++--- AuxillaryTestHarness/Dashboard.resx | 8 +- AuxillaryTestHarness/Dashboard.vb | 19 +- .../My Project/Application.Designer.vb | 2 +- .../My Project/Application.myapp | 5 +- .../Electrics/ElectricalConsumer.vb | 22 ++ .../VectoAuxiliaries/VectoAuxiliaries.vbproj | 30 --- 11 files changed, 473 insertions(+), 89 deletions(-) create mode 100644 AuxillaryTestHarness/ConsumerList.Designer.vb create mode 100644 AuxillaryTestHarness/ConsumerList.resx create mode 100644 AuxillaryTestHarness/ConsumerList.vb diff --git a/AuxillaryTestHarness/AuxillaryTestHarness.vbproj b/AuxillaryTestHarness/AuxillaryTestHarness.vbproj index b935f4aaf6..3efd9f3349 100644 --- a/AuxillaryTestHarness/AuxillaryTestHarness.vbproj +++ b/AuxillaryTestHarness/AuxillaryTestHarness.vbproj @@ -75,6 +75,12 @@ <Import Include="System.Threading.Tasks" /> </ItemGroup> <ItemGroup> + <Compile Include="ConsumerList.Designer.vb"> + <DependentUpon>ConsumerList.vb</DependentUpon> + </Compile> + <Compile Include="ConsumerList.vb"> + <SubType>Form</SubType> + </Compile> <Compile Include="Dashboard.Designer.vb"> <DependentUpon>Dashboard.vb</DependentUpon> </Compile> @@ -98,6 +104,9 @@ </Compile> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="ConsumerList.resx"> + <DependentUpon>ConsumerList.vb</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="Dashboard.resx"> <DependentUpon>Dashboard.vb</DependentUpon> </EmbeddedResource> diff --git a/AuxillaryTestHarness/ConsumerList.Designer.vb b/AuxillaryTestHarness/ConsumerList.Designer.vb new file mode 100644 index 0000000000..a39cafb9dc --- /dev/null +++ b/AuxillaryTestHarness/ConsumerList.Designer.vb @@ -0,0 +1,62 @@ +<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ +Partial Class ConsumerList + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + <System.Diagnostics.DebuggerNonUserCode()> _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + <System.Diagnostics.DebuggerStepThrough()> _ + Private Sub InitializeComponent() + Me.DataGridView1 = New System.Windows.Forms.DataGridView() + Me.Button1 = New System.Windows.Forms.Button() + CType(Me.DataGridView1,System.ComponentModel.ISupportInitialize).BeginInit + Me.SuspendLayout + ' + 'DataGridView1 + ' + Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize + Me.DataGridView1.Location = New System.Drawing.Point(46, 193) + Me.DataGridView1.Name = "DataGridView1" + Me.DataGridView1.Size = New System.Drawing.Size(516, 150) + Me.DataGridView1.TabIndex = 0 + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(46, 60) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(75, 23) + Me.Button1.TabIndex = 1 + Me.Button1.Text = "Button1" + Me.Button1.UseVisualStyleBackColor = true + ' + 'ConsumerList + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(622, 447) + Me.Controls.Add(Me.Button1) + Me.Controls.Add(Me.DataGridView1) + Me.Name = "ConsumerList" + Me.Text = "ConsumerList" + CType(Me.DataGridView1,System.ComponentModel.ISupportInitialize).EndInit + Me.ResumeLayout(false) + +End Sub + Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView + Friend WithEvents Button1 As System.Windows.Forms.Button +End Class diff --git a/AuxillaryTestHarness/ConsumerList.resx b/AuxillaryTestHarness/ConsumerList.resx new file mode 100644 index 0000000000..1af7de150c --- /dev/null +++ b/AuxillaryTestHarness/ConsumerList.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/AuxillaryTestHarness/ConsumerList.vb b/AuxillaryTestHarness/ConsumerList.vb new file mode 100644 index 0000000000..f5b2771047 --- /dev/null +++ b/AuxillaryTestHarness/ConsumerList.vb @@ -0,0 +1,46 @@ +imports VectoAuxiliaries.Electrics +Public Class ConsumerList + + + +Friend ConsumerList As List(Of IElectricalConsumer) + + + + +Private Sub ConsumerList_Load( sender As Object, e As EventArgs) Handles MyBase.Load + + +ConsumerList = New List(Of IElectricalConsumer) + + + + + +End Sub + +Private sub AddConsumer( consumer as IElectricalConsumer) + +If Not ConsumerList.Contains( consumer ) then + + +ConsumerList.Add(consumer) + +Else + +MessageBox.Show("Already Exists") + + +End If + + + +End Sub + + +Private Sub Button1_Click( sender As Object, e As EventArgs) Handles Button1.Click + + AddConsumer( New ElectricalConsumer(False,"Test","Test1",2.2,.5,26.3,1)) + +End Sub +End Class \ No newline at end of file diff --git a/AuxillaryTestHarness/Dashboard.Designer.vb b/AuxillaryTestHarness/Dashboard.Designer.vb index dd37ab725f..292e23f804 100644 --- a/AuxillaryTestHarness/Dashboard.Designer.vb +++ b/AuxillaryTestHarness/Dashboard.Designer.vb @@ -23,6 +23,18 @@ Partial Class Dashboard <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() + Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.tabMain = New System.Windows.Forms.TabControl() Me.tabGeneralConfig = New System.Windows.Forms.TabPage() Me.cboCycle = New System.Windows.Forms.ComboBox() @@ -39,7 +51,6 @@ Partial Class Dashboard Me.chkSmartElectricals = New System.Windows.Forms.CheckBox() Me.Label6 = New System.Windows.Forms.Label() Me.gvElectricalConsumables = New System.Windows.Forms.DataGridView() - Me.bsElectricalConsumables = New System.Windows.Forms.BindingSource(Me.components) Me.txtDoorActuationTimeSeconds = New System.Windows.Forms.TextBox() Me.labelDoorActuationTimeSeconds = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label() @@ -51,7 +62,13 @@ Partial Class Dashboard Me.tabPneumaticConfig = New System.Windows.Forms.TabPage() Me.tabHVACConfig = New System.Windows.Forms.TabPage() Me.tabPlayground = New System.Windows.Forms.TabPage() - Me.BindingSource1 = New System.Windows.Forms.BindingSource(Me.components) + Me.bndgsElecConsumables = New System.Windows.Forms.BindingSource(Me.components) + Me.Panel1 = New System.Windows.Forms.Panel() + Me.btnStart = New System.Windows.Forms.Button() + Me.btnBack = New System.Windows.Forms.Button() + Me.btnForward = New System.Windows.Forms.Button() + Me.btnFinish = New System.Windows.Forms.Button() + Me.btnCancel = New System.Windows.Forms.Button() Me.tabMain.SuspendLayout Me.tabGeneralConfig.SuspendLayout Me.tabElectricalConfig.SuspendLayout @@ -59,8 +76,8 @@ Partial Class Dashboard CType(Me.DataGridView2,System.ComponentModel.ISupportInitialize).BeginInit CType(Me.DataGridView1,System.ComponentModel.ISupportInitialize).BeginInit CType(Me.gvElectricalConsumables,System.ComponentModel.ISupportInitialize).BeginInit - CType(Me.bsElectricalConsumables,System.ComponentModel.ISupportInitialize).BeginInit - CType(Me.BindingSource1,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.bndgsElecConsumables,System.ComponentModel.ISupportInitialize).BeginInit + Me.Panel1.SuspendLayout Me.SuspendLayout ' 'tabMain @@ -71,10 +88,10 @@ Partial Class Dashboard Me.tabMain.Controls.Add(Me.tabPneumaticConfig) Me.tabMain.Controls.Add(Me.tabHVACConfig) Me.tabMain.Controls.Add(Me.tabPlayground) - Me.tabMain.Location = New System.Drawing.Point(30, 12) + Me.tabMain.Location = New System.Drawing.Point(13, 14) Me.tabMain.Name = "tabMain" Me.tabMain.SelectedIndex = 0 - Me.tabMain.Size = New System.Drawing.Size(1116, 687) + Me.tabMain.Size = New System.Drawing.Size(751, 467) Me.tabMain.TabIndex = 0 Me.tabMain.Tag = "" ' @@ -87,7 +104,7 @@ Partial Class Dashboard Me.tabGeneralConfig.Location = New System.Drawing.Point(4, 22) Me.tabGeneralConfig.Name = "tabGeneralConfig" Me.tabGeneralConfig.Padding = New System.Windows.Forms.Padding(3) - Me.tabGeneralConfig.Size = New System.Drawing.Size(1108, 661) + Me.tabGeneralConfig.Size = New System.Drawing.Size(743, 441) Me.tabGeneralConfig.TabIndex = 0 Me.tabGeneralConfig.Text = "GeneralConfig" Me.tabGeneralConfig.UseVisualStyleBackColor = true @@ -148,39 +165,111 @@ Partial Class Dashboard Me.tabElectricalConfig.Location = New System.Drawing.Point(4, 22) Me.tabElectricalConfig.Name = "tabElectricalConfig" Me.tabElectricalConfig.Padding = New System.Windows.Forms.Padding(3) - Me.tabElectricalConfig.Size = New System.Drawing.Size(1108, 661) + Me.tabElectricalConfig.Size = New System.Drawing.Size(743, 441) Me.tabElectricalConfig.TabIndex = 1 Me.tabElectricalConfig.Text = "ElectricalConfig" Me.tabElectricalConfig.UseVisualStyleBackColor = true ' 'DataGridView3 ' + DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.DataGridView3.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1 Me.DataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.DataGridView3.Location = New System.Drawing.Point(161, 529) + DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.DataGridView3.DefaultCellStyle = DataGridViewCellStyle2 + Me.DataGridView3.Location = New System.Drawing.Point(502, 331) Me.DataGridView3.Name = "DataGridView3" - Me.DataGridView3.Size = New System.Drawing.Size(141, 81) + DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.DataGridView3.RowHeadersDefaultCellStyle = DataGridViewCellStyle3 + Me.DataGridView3.Size = New System.Drawing.Size(191, 81) Me.DataGridView3.TabIndex = 18 ' 'DataGridView2 ' + DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.DataGridView2.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4 Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.DataGridView2.Location = New System.Drawing.Point(161, 431) + DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.DataGridView2.DefaultCellStyle = DataGridViewCellStyle5 + Me.DataGridView2.Location = New System.Drawing.Point(260, 331) Me.DataGridView2.Name = "DataGridView2" - Me.DataGridView2.Size = New System.Drawing.Size(141, 81) + DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.DataGridView2.RowHeadersDefaultCellStyle = DataGridViewCellStyle6 + Me.DataGridView2.Size = New System.Drawing.Size(191, 81) Me.DataGridView2.TabIndex = 17 ' 'DataGridView1 ' + DataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.DataGridView1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle7 Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.DataGridView1.Location = New System.Drawing.Point(161, 324) + DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.DataGridView1.DefaultCellStyle = DataGridViewCellStyle8 + Me.DataGridView1.Location = New System.Drawing.Point(33, 328) Me.DataGridView1.Name = "DataGridView1" - Me.DataGridView1.Size = New System.Drawing.Size(141, 84) + DataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle9.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.DataGridView1.RowHeadersDefaultCellStyle = DataGridViewCellStyle9 + Me.DataGridView1.Size = New System.Drawing.Size(191, 81) Me.DataGridView1.TabIndex = 16 ' 'Label9 ' Me.Label9.AutoSize = true - Me.Label9.Location = New System.Drawing.Point(74, 530) + Me.Label9.Location = New System.Drawing.Point(505, 315) Me.Label9.Name = "Label9" Me.Label9.Size = New System.Drawing.Size(83, 13) Me.Label9.TabIndex = 15 @@ -189,7 +278,7 @@ Partial Class Dashboard 'Label8 ' Me.Label8.AutoSize = true - Me.Label8.Location = New System.Drawing.Point(71, 428) + Me.Label8.Location = New System.Drawing.Point(260, 315) Me.Label8.Name = "Label8" Me.Label8.Size = New System.Drawing.Size(84, 13) Me.Label8.TabIndex = 14 @@ -198,7 +287,7 @@ Partial Class Dashboard 'Label7 ' Me.Label7.AutoSize = true - Me.Label7.Location = New System.Drawing.Point(92, 325) + Me.Label7.Location = New System.Drawing.Point(30, 312) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(62, 13) Me.Label7.TabIndex = 13 @@ -217,7 +306,7 @@ Partial Class Dashboard 'Label6 ' Me.Label6.AutoSize = true - Me.Label6.Location = New System.Drawing.Point(27, 166) + Me.Label6.Location = New System.Drawing.Point(35, 154) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(116, 13) Me.Label6.TabIndex = 11 @@ -225,12 +314,34 @@ Partial Class Dashboard ' 'gvElectricalConsumables ' - Me.gvElectricalConsumables.AutoGenerateColumns = false + DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle10.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gvElectricalConsumables.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle10 Me.gvElectricalConsumables.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.gvElectricalConsumables.DataSource = Me.bsElectricalConsumables - Me.gvElectricalConsumables.Location = New System.Drawing.Point(161, 170) + DataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle11.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.gvElectricalConsumables.DefaultCellStyle = DataGridViewCellStyle11 + Me.gvElectricalConsumables.Location = New System.Drawing.Point(33, 170) Me.gvElectricalConsumables.Name = "gvElectricalConsumables" - Me.gvElectricalConsumables.Size = New System.Drawing.Size(877, 118) + DataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle12.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gvElectricalConsumables.RowHeadersDefaultCellStyle = DataGridViewCellStyle12 + Me.gvElectricalConsumables.Size = New System.Drawing.Size(659, 127) Me.gvElectricalConsumables.TabIndex = 10 ' 'txtDoorActuationTimeSeconds @@ -301,7 +412,7 @@ Partial Class Dashboard ' Me.tabPneumaticConfig.Location = New System.Drawing.Point(4, 22) Me.tabPneumaticConfig.Name = "tabPneumaticConfig" - Me.tabPneumaticConfig.Size = New System.Drawing.Size(1108, 661) + Me.tabPneumaticConfig.Size = New System.Drawing.Size(743, 441) Me.tabPneumaticConfig.TabIndex = 2 Me.tabPneumaticConfig.Text = "PneumaticConfig" Me.tabPneumaticConfig.UseVisualStyleBackColor = true @@ -310,7 +421,7 @@ Partial Class Dashboard ' Me.tabHVACConfig.Location = New System.Drawing.Point(4, 22) Me.tabHVACConfig.Name = "tabHVACConfig" - Me.tabHVACConfig.Size = New System.Drawing.Size(1108, 661) + Me.tabHVACConfig.Size = New System.Drawing.Size(743, 441) Me.tabHVACConfig.TabIndex = 3 Me.tabHVACConfig.Text = "HVACConfig" Me.tabHVACConfig.UseVisualStyleBackColor = true @@ -319,21 +430,76 @@ Partial Class Dashboard ' Me.tabPlayground.Location = New System.Drawing.Point(4, 22) Me.tabPlayground.Name = "tabPlayground" - Me.tabPlayground.Size = New System.Drawing.Size(1108, 661) + Me.tabPlayground.Size = New System.Drawing.Size(743, 441) Me.tabPlayground.TabIndex = 4 Me.tabPlayground.Text = "Playground" Me.tabPlayground.UseVisualStyleBackColor = true ' - 'BindingSource1 - ' - Me.BindingSource1.DataSource = GetType(AuxillaryTestHarness.Dashboard) + 'Panel1 + ' + Me.Panel1.Controls.Add(Me.btnCancel) + Me.Panel1.Controls.Add(Me.btnFinish) + Me.Panel1.Controls.Add(Me.btnForward) + Me.Panel1.Controls.Add(Me.btnBack) + Me.Panel1.Controls.Add(Me.btnStart) + Me.Panel1.Controls.Add(Me.tabMain) + Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill + Me.Panel1.Location = New System.Drawing.Point(0, 0) + Me.Panel1.Name = "Panel1" + Me.Panel1.Size = New System.Drawing.Size(813, 566) + Me.Panel1.TabIndex = 1 + ' + 'btnStart + ' + Me.btnStart.Location = New System.Drawing.Point(320, 511) + Me.btnStart.Name = "btnStart" + Me.btnStart.Size = New System.Drawing.Size(75, 23) + Me.btnStart.TabIndex = 1 + Me.btnStart.Text = "|< Start" + Me.btnStart.UseVisualStyleBackColor = true + ' + 'btnBack + ' + Me.btnBack.Location = New System.Drawing.Point(437, 511) + Me.btnBack.Name = "btnBack" + Me.btnBack.Size = New System.Drawing.Size(75, 23) + Me.btnBack.TabIndex = 2 + Me.btnBack.Text = "<< Back" + Me.btnBack.UseVisualStyleBackColor = true + ' + 'btnForward + ' + Me.btnForward.Location = New System.Drawing.Point(521, 511) + Me.btnForward.Name = "btnForward" + Me.btnForward.Size = New System.Drawing.Size(75, 23) + Me.btnForward.TabIndex = 3 + Me.btnForward.Text = "Fwd >>" + Me.btnForward.UseVisualStyleBackColor = true + ' + 'btnFinish + ' + Me.btnFinish.Location = New System.Drawing.Point(645, 511) + Me.btnFinish.Name = "btnFinish" + Me.btnFinish.Size = New System.Drawing.Size(75, 23) + Me.btnFinish.TabIndex = 4 + Me.btnFinish.Text = "Finish >|" + Me.btnFinish.UseVisualStyleBackColor = true + ' + 'btnCancel + ' + Me.btnCancel.Location = New System.Drawing.Point(727, 510) + Me.btnCancel.Name = "btnCancel" + Me.btnCancel.Size = New System.Drawing.Size(75, 23) + Me.btnCancel.TabIndex = 5 + Me.btnCancel.Text = "Cancel" + Me.btnCancel.UseVisualStyleBackColor = true ' 'Dashboard ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(1192, 711) - Me.Controls.Add(Me.tabMain) + Me.ClientSize = New System.Drawing.Size(813, 566) + Me.Controls.Add(Me.Panel1) Me.Name = "Dashboard" Me.Text = "Dashboard" Me.tabMain.ResumeLayout(false) @@ -345,8 +511,8 @@ Partial Class Dashboard CType(Me.DataGridView2,System.ComponentModel.ISupportInitialize).EndInit CType(Me.DataGridView1,System.ComponentModel.ISupportInitialize).EndInit CType(Me.gvElectricalConsumables,System.ComponentModel.ISupportInitialize).EndInit - CType(Me.bsElectricalConsumables,System.ComponentModel.ISupportInitialize).EndInit - CType(Me.BindingSource1,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.bndgsElecConsumables,System.ComponentModel.ISupportInitialize).EndInit + Me.Panel1.ResumeLayout(false) Me.ResumeLayout(false) End Sub @@ -377,6 +543,11 @@ End Sub Friend WithEvents chkSmartElectricals As System.Windows.Forms.CheckBox Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents gvElectricalConsumables As System.Windows.Forms.DataGridView - Friend WithEvents bsElectricalConsumables As System.Windows.Forms.BindingSource - Friend WithEvents BindingSource1 As System.Windows.Forms.BindingSource + Friend WithEvents bndgsElecConsumables As System.Windows.Forms.BindingSource + Friend WithEvents Panel1 As System.Windows.Forms.Panel + Friend WithEvents btnCancel As System.Windows.Forms.Button + Friend WithEvents btnFinish As System.Windows.Forms.Button + Friend WithEvents btnForward As System.Windows.Forms.Button + Friend WithEvents btnBack As System.Windows.Forms.Button + Friend WithEvents btnStart As System.Windows.Forms.Button End Class diff --git a/AuxillaryTestHarness/Dashboard.resx b/AuxillaryTestHarness/Dashboard.resx index 0df5ca240e..43940a0112 100644 --- a/AuxillaryTestHarness/Dashboard.resx +++ b/AuxillaryTestHarness/Dashboard.resx @@ -117,13 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="bsElectricalConsumables.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <metadata name="bndgsElecConsumables.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> - <metadata name="BindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>202, 17</value> - </metadata> - <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>42</value> - </metadata> </root> \ No newline at end of file diff --git a/AuxillaryTestHarness/Dashboard.vb b/AuxillaryTestHarness/Dashboard.vb index 1c0b80995f..9c925bcb1a 100644 --- a/AuxillaryTestHarness/Dashboard.vb +++ b/AuxillaryTestHarness/Dashboard.vb @@ -1,14 +1,10 @@ - -Imports VectoAuxiliaries +Imports VectoAuxiliaries Imports VectoAuxiliaries.Electrics - Public Class Dashboard - public auxEnvironment As New AuxillaryEnvironment("") - Private Sub Dashboard_Load( sender As Object, e As EventArgs) Handles MyBase.Load cboCycle.SelectedIndex=0 @@ -37,18 +33,13 @@ Private Sub CreateBindings chkSmartElectricals.DataBindings.Add("Checked",auxEnvironment.ElectricalUserInputsConfig,"SmartElectrical") - Dim cIndex As Integer = gvElectricalConsumables.Columns.Add("ConsumerName","ConsumerName") - gvElectricalConsumables.Columns(cIndex).DataPropertyName="Value.ConsumerName" - - - Dim list As New List(of IElectricalConsumer) - - + 'Dim cIndex As Integer = gvElectricalConsumables.Columns.Add("ConsumerName","ConsumerName") + 'gvElectricalConsumables.Columns(cIndex).DataPropertyName="Value.ConsumerName" - gvElectricalConsumables.DataSource = list + 'Dim list As New List(of IElectricalConsumer) + 'gvElectricalConsumables.DataSource = list - End Sub diff --git a/AuxillaryTestHarness/My Project/Application.Designer.vb b/AuxillaryTestHarness/My Project/Application.Designer.vb index e466da946d..742d626d3c 100644 --- a/AuxillaryTestHarness/My Project/Application.Designer.vb +++ b/AuxillaryTestHarness/My Project/Application.Designer.vb @@ -32,7 +32,7 @@ Namespace My <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() - Me.MainForm = Global.AuxillaryTestHarness.Dashboard + Me.MainForm = Global.AuxillaryTestHarness.ConsumerList End Sub End Class End Namespace diff --git a/AuxillaryTestHarness/My Project/Application.myapp b/AuxillaryTestHarness/My Project/Application.myapp index 1243847fd9..4b5af526bc 100644 --- a/AuxillaryTestHarness/My Project/Application.myapp +++ b/AuxillaryTestHarness/My Project/Application.myapp @@ -1,11 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> - <MainForm>Form1</MainForm> + <MainForm>ConsumerList</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> - <ApplicationType>0</ApplicationType> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> -</MyApplicationData> +</MyApplicationData> \ No newline at end of file diff --git a/VECTOAux/VectoAuxiliaries/Electrics/ElectricalConsumer.vb b/VECTOAux/VectoAuxiliaries/Electrics/ElectricalConsumer.vb index 341a4888de..287c54a175 100644 --- a/VECTOAux/VectoAuxiliaries/Electrics/ElectricalConsumer.vb +++ b/VECTOAux/VectoAuxiliaries/Electrics/ElectricalConsumer.vb @@ -8,6 +8,10 @@ Implements IElectricalConsumer + + + + 'Calculated Private Property AvgConsumptionAmps As Single Implements IElectricalConsumer.AvgConsumptionAmps @@ -58,5 +62,23 @@ End Sub + + + Public Overrides Function Equals(obj As Object) As Boolean + + Dim other As IElectricalConsumer = CType(obj, IElectricalConsumer) + + + Return Me.ConsumerName=other.ConsumerName + + + End Function + + Public Overrides Function GetHashCode() As Integer + Return 0 + End Function + + + End Class End Namespace \ No newline at end of file diff --git a/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj b/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj index 70870d7360..b3c951f849 100644 --- a/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj +++ b/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj @@ -131,36 +131,12 @@ <Compile Include="Pneumatics\PneumaticsAuxilliariesConfig.vb" /> <Compile Include="Pneumatics\PneumaticUserInputsConfig.vb" /> <Compile Include="Signals.vb" /> - <Compile Include="UI\ElectricalConsumers.Designer.vb"> - <DependentUpon>ElectricalConsumers.vb</DependentUpon> - </Compile> - <Compile Include="UI\ElectricalConsumers.vb"> - <SubType>Form</SubType> - </Compile> - <Compile Include="UI\F_Alternator.Designer.vb"> - <DependentUpon>F_Alternator.vb</DependentUpon> - </Compile> - <Compile Include="UI\F_Alternator.vb"> - <SubType>Form</SubType> - </Compile> - <Compile Include="UI\F_Compressor.Designer.vb"> - <DependentUpon>F_Compressor.vb</DependentUpon> - </Compile> - <Compile Include="UI\F_Compressor.vb"> - <SubType>Form</SubType> - </Compile> <Compile Include="UI\F_HVAC.Designer.vb"> <DependentUpon>F_HVAC.vb</DependentUpon> </Compile> <Compile Include="UI\F_HVAC.vb"> <SubType>Form</SubType> </Compile> - <Compile Include="UI\F_PneumaticConsumers.Designer.vb"> - <DependentUpon>F_PneumaticConsumers.vb</DependentUpon> - </Compile> - <Compile Include="UI\F_PneumaticConsumers.vb"> - <SubType>Form</SubType> - </Compile> <Compile Include="VectoInputs.vb" /> </ItemGroup> <ItemGroup> @@ -170,15 +146,9 @@ <CustomToolNamespace>My.Resources</CustomToolNamespace> <SubType>Designer</SubType> </EmbeddedResource> - <EmbeddedResource Include="UI\F_Compressor.resx"> - <DependentUpon>F_Compressor.vb</DependentUpon> - </EmbeddedResource> <EmbeddedResource Include="UI\F_HVAC.resx"> <DependentUpon>F_HVAC.vb</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="UI\F_PneumaticConsumers.resx"> - <DependentUpon>F_PneumaticConsumers.vb</DependentUpon> - </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="My Project\Application.myapp"> -- GitLab