Add console based test app.

Changeup on namespaces.
Experimenting with events.
This commit is contained in:
Erick Kinnee 2019-03-07 07:25:09 -06:00
parent 978c15b951
commit b3c5c52965
10 changed files with 227 additions and 20 deletions

View file

@ -28,43 +28,99 @@
/// </summary>
private void InitializeComponent()
{
this.ComPorts = new System.Windows.Forms.ListBox();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.ComPort1Tab = new System.Windows.Forms.TabPage();
this.ComPort2Tab = new System.Windows.Forms.TabPage();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.ComPortListBox = new System.Windows.Forms.ListBox();
this.tabControl1.SuspendLayout();
this.ComPort1Tab.SuspendLayout();
this.ComPort2Tab.SuspendLayout();
this.SuspendLayout();
//
// ComPorts
// tabControl1
//
this.ComPorts.FormattingEnabled = true;
this.ComPorts.Location = new System.Drawing.Point(229, 25);
this.ComPorts.Name = "ComPorts";
this.ComPorts.Size = new System.Drawing.Size(120, 95);
this.ComPorts.TabIndex = 0;
this.tabControl1.Controls.Add(this.ComPort1Tab);
this.tabControl1.Controls.Add(this.ComPort2Tab);
this.tabControl1.Location = new System.Drawing.Point(12, 12);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(364, 410);
this.tabControl1.TabIndex = 0;
//
// ComPort1Tab
//
this.ComPort1Tab.Controls.Add(this.textBox1);
this.ComPort1Tab.Location = new System.Drawing.Point(4, 22);
this.ComPort1Tab.Name = "ComPort1Tab";
this.ComPort1Tab.Padding = new System.Windows.Forms.Padding(3);
this.ComPort1Tab.Size = new System.Drawing.Size(356, 384);
this.ComPort1Tab.TabIndex = 0;
this.ComPort1Tab.Text = "Port 1";
this.ComPort1Tab.UseVisualStyleBackColor = true;
//
// ComPort2Tab
//
this.ComPort2Tab.Controls.Add(this.textBox2);
this.ComPort2Tab.Location = new System.Drawing.Point(4, 22);
this.ComPort2Tab.Name = "ComPort2Tab";
this.ComPort2Tab.Padding = new System.Windows.Forms.Padding(3);
this.ComPort2Tab.Size = new System.Drawing.Size(356, 384);
this.ComPort2Tab.TabIndex = 1;
this.ComPort2Tab.Text = "Port 2";
this.ComPort2Tab.UseVisualStyleBackColor = true;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(98, 335);
this.textBox1.Location = new System.Drawing.Point(7, 7);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 20);
this.textBox1.TabIndex = 1;
this.textBox1.Size = new System.Drawing.Size(340, 371);
this.textBox1.TabIndex = 0;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(7, 7);
this.textBox2.Multiline = true;
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(340, 371);
this.textBox2.TabIndex = 1;
//
// ComPortListBox
//
this.ComPortListBox.FormattingEnabled = true;
this.ComPortListBox.Location = new System.Drawing.Point(462, 48);
this.ComPortListBox.Name = "ComPortListBox";
this.ComPortListBox.Size = new System.Drawing.Size(120, 95);
this.ComPortListBox.TabIndex = 1;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.ComPorts);
this.Controls.Add(this.ComPortListBox);
this.Controls.Add(this.tabControl1);
this.Name = "Form1";
this.Text = "Form1";
this.tabControl1.ResumeLayout(false);
this.ComPort1Tab.ResumeLayout(false);
this.ComPort1Tab.PerformLayout();
this.ComPort2Tab.ResumeLayout(false);
this.ComPort2Tab.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListBox ComPorts;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage ComPort1Tab;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TabPage ComPort2Tab;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.ListBox ComPortListBox;
}
}

View file

@ -11,7 +11,7 @@ namespace SharpCATForms
InitializeComponent();
ComPorts.DataSource = sharpCAT.PortNames;
ComPortListBox.DataSource = sharpCAT.PortNames;
}
}
}

View file

@ -40,9 +40,6 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Ports.4.5.0\lib\net461\System.IO.Ports.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@ -74,7 +71,6 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="System.IO.Ports" version="4.5.0" targetFramework="net472" />
</packages>