diff --git a/.gitignore b/.gitignore index 0249726..66d936e 100644 --- a/.gitignore +++ b/.gitignore @@ -166,4 +166,7 @@ pip-log.txt # Binary archive ################## -bin-archive/ \ No newline at end of file +bin-archive/ + +# Visual Studio 2015 cache/options directory +.vs/ \ No newline at end of file diff --git a/Serial Oscilloscope/Serial Oscilloscope.sln b/Serial Oscilloscope/Serial Oscilloscope.sln index c2f113b..3512cf8 100644 --- a/Serial Oscilloscope/Serial Oscilloscope.sln +++ b/Serial Oscilloscope/Serial Oscilloscope.sln @@ -1,16 +1,24 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34221.43 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serial Oscilloscope", "Serial Oscilloscope\Serial Oscilloscope.csproj", "{37F93890-5296-4350-8F67-28BCC26CD6F2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 + Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {37F93890-5296-4350-8F67-28BCC26CD6F2}.Debug|x64.ActiveCfg = Debug|x64 + {37F93890-5296-4350-8F67-28BCC26CD6F2}.Debug|x64.Build.0 = Debug|x64 {37F93890-5296-4350-8F67-28BCC26CD6F2}.Debug|x86.ActiveCfg = Debug|x86 {37F93890-5296-4350-8F67-28BCC26CD6F2}.Debug|x86.Build.0 = Debug|x86 + {37F93890-5296-4350-8F67-28BCC26CD6F2}.Release|x64.ActiveCfg = Release|x64 + {37F93890-5296-4350-8F67-28BCC26CD6F2}.Release|x64.Build.0 = Release|x64 {37F93890-5296-4350-8F67-28BCC26CD6F2}.Release|x86.ActiveCfg = Release|x86 {37F93890-5296-4350-8F67-28BCC26CD6F2}.Release|x86.Build.0 = Release|x86 EndGlobalSection diff --git a/Serial Oscilloscope/Serial Oscilloscope/FormTerminal.Designer.cs b/Serial Oscilloscope/Serial Oscilloscope/FormTerminal.Designer.cs index c11956a..21f7604 100644 --- a/Serial Oscilloscope/Serial Oscilloscope/FormTerminal.Designer.cs +++ b/Serial Oscilloscope/Serial Oscilloscope/FormTerminal.Designer.cs @@ -40,6 +40,9 @@ private void InitializeComponent() this.toolStripMenuItem460800 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem921600 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemOther = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItemPortSetting = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItemDTREnabled = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItemRTSEnabled = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemTerminal = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemEnabled = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemClear = new System.Windows.Forms.ToolStripMenuItem(); @@ -63,23 +66,25 @@ private void InitializeComponent() // // menuStrip // + this.menuStrip.ImageScalingSize = new System.Drawing.Size(20, 20); this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripMenuItemSerialPort, this.toolStripMenuItemBaudRate, + this.toolStripMenuItemPortSetting, this.toolStripMenuItemTerminal, this.toolStripMenuItemOsciloscope, this.toolStripMenuItemLogToFile, this.toolStripMenuItemHelp}); this.menuStrip.Location = new System.Drawing.Point(0, 0); this.menuStrip.Name = "menuStrip"; - this.menuStrip.Size = new System.Drawing.Size(584, 24); + this.menuStrip.Size = new System.Drawing.Size(779, 28); this.menuStrip.TabIndex = 0; this.menuStrip.Text = "menuStrip1"; // // toolStripMenuItemSerialPort // this.toolStripMenuItemSerialPort.Name = "toolStripMenuItemSerialPort"; - this.toolStripMenuItemSerialPort.Size = new System.Drawing.Size(72, 20); + this.toolStripMenuItemSerialPort.Size = new System.Drawing.Size(90, 24); this.toolStripMenuItemSerialPort.Text = "Serial Port"; this.toolStripMenuItemSerialPort.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.toolStripMenuItemSerialPort_DropDownItemClicked); // @@ -96,71 +101,96 @@ private void InitializeComponent() this.toolStripMenuItem921600, this.toolStripMenuItemOther}); this.toolStripMenuItemBaudRate.Name = "toolStripMenuItemBaudRate"; - this.toolStripMenuItemBaudRate.Size = new System.Drawing.Size(72, 20); + this.toolStripMenuItemBaudRate.Size = new System.Drawing.Size(91, 24); this.toolStripMenuItemBaudRate.Text = "Baud Rate"; this.toolStripMenuItemBaudRate.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.toolStripMenuItemBaudRate_DropDownItemClicked); // // toolStripMenuItem9600 // this.toolStripMenuItem9600.Name = "toolStripMenuItem9600"; - this.toolStripMenuItem9600.Size = new System.Drawing.Size(110, 22); + this.toolStripMenuItem9600.Size = new System.Drawing.Size(140, 26); this.toolStripMenuItem9600.Text = "9600"; // // toolStripMenuItem19200 // this.toolStripMenuItem19200.Name = "toolStripMenuItem19200"; - this.toolStripMenuItem19200.Size = new System.Drawing.Size(110, 22); + this.toolStripMenuItem19200.Size = new System.Drawing.Size(140, 26); this.toolStripMenuItem19200.Text = "19200"; // // toolStripMenuItem38400 // this.toolStripMenuItem38400.Name = "toolStripMenuItem38400"; - this.toolStripMenuItem38400.Size = new System.Drawing.Size(110, 22); + this.toolStripMenuItem38400.Size = new System.Drawing.Size(140, 26); this.toolStripMenuItem38400.Text = "38400"; // // toolStripMenuItem57600 // this.toolStripMenuItem57600.Name = "toolStripMenuItem57600"; - this.toolStripMenuItem57600.Size = new System.Drawing.Size(110, 22); + this.toolStripMenuItem57600.Size = new System.Drawing.Size(140, 26); this.toolStripMenuItem57600.Text = "57600"; // // toolStripMenuItem115200 // this.toolStripMenuItem115200.Name = "toolStripMenuItem115200"; - this.toolStripMenuItem115200.Size = new System.Drawing.Size(110, 22); + this.toolStripMenuItem115200.Size = new System.Drawing.Size(140, 26); this.toolStripMenuItem115200.Text = "115200"; // // toolStripMenuItem230400 // this.toolStripMenuItem230400.Name = "toolStripMenuItem230400"; - this.toolStripMenuItem230400.Size = new System.Drawing.Size(110, 22); + this.toolStripMenuItem230400.Size = new System.Drawing.Size(140, 26); this.toolStripMenuItem230400.Text = "230400"; // // toolStripMenuItem460800 // this.toolStripMenuItem460800.Name = "toolStripMenuItem460800"; - this.toolStripMenuItem460800.Size = new System.Drawing.Size(110, 22); + this.toolStripMenuItem460800.Size = new System.Drawing.Size(140, 26); this.toolStripMenuItem460800.Text = "460800"; // // toolStripMenuItem921600 // this.toolStripMenuItem921600.Name = "toolStripMenuItem921600"; - this.toolStripMenuItem921600.Size = new System.Drawing.Size(110, 22); + this.toolStripMenuItem921600.Size = new System.Drawing.Size(140, 26); this.toolStripMenuItem921600.Text = "921600"; // // toolStripMenuItemOther // this.toolStripMenuItemOther.Name = "toolStripMenuItemOther"; - this.toolStripMenuItemOther.Size = new System.Drawing.Size(110, 22); + this.toolStripMenuItemOther.Size = new System.Drawing.Size(140, 26); this.toolStripMenuItemOther.Text = "Other"; // + // toolStripMenuItemPortSetting + // + this.toolStripMenuItemPortSetting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItemDTREnabled, + this.toolStripMenuItemRTSEnabled}); + this.toolStripMenuItemPortSetting.Name = "toolStripMenuItemPortSetting"; + this.toolStripMenuItemPortSetting.Size = new System.Drawing.Size(100, 24); + this.toolStripMenuItemPortSetting.Text = "Port Setting"; + // + // toolStripMenuItemDTREnabled + // + this.toolStripMenuItemDTREnabled.CheckOnClick = true; + this.toolStripMenuItemDTREnabled.Name = "toolStripMenuItemDTREnabled"; + this.toolStripMenuItemDTREnabled.Size = new System.Drawing.Size(224, 26); + this.toolStripMenuItemDTREnabled.Text = "DTR Enabled"; + this.toolStripMenuItemDTREnabled.CheckStateChanged += new System.EventHandler(this.toolStripMenuItemDTREnabled_CheckStateChanged); + // + // toolStripMenuItemRTSEnabled + // + this.toolStripMenuItemRTSEnabled.CheckOnClick = true; + this.toolStripMenuItemRTSEnabled.Name = "toolStripMenuItemRTSEnabled"; + this.toolStripMenuItemRTSEnabled.Size = new System.Drawing.Size(224, 26); + this.toolStripMenuItemRTSEnabled.Text = "RTS Enabled"; + this.toolStripMenuItemRTSEnabled.CheckStateChanged += new System.EventHandler(this.toolStripMenuItemRTSEnabled_CheckStateChanged); + // // toolStripMenuItemTerminal // this.toolStripMenuItemTerminal.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripMenuItemEnabled, this.toolStripMenuItemClear}); this.toolStripMenuItemTerminal.Name = "toolStripMenuItemTerminal"; - this.toolStripMenuItemTerminal.Size = new System.Drawing.Size(66, 20); + this.toolStripMenuItemTerminal.Size = new System.Drawing.Size(80, 24); this.toolStripMenuItemTerminal.Text = "Terminal"; // // toolStripMenuItemEnabled @@ -169,14 +199,14 @@ private void InitializeComponent() this.toolStripMenuItemEnabled.CheckOnClick = true; this.toolStripMenuItemEnabled.CheckState = System.Windows.Forms.CheckState.Checked; this.toolStripMenuItemEnabled.Name = "toolStripMenuItemEnabled"; - this.toolStripMenuItemEnabled.Size = new System.Drawing.Size(116, 22); + this.toolStripMenuItemEnabled.Size = new System.Drawing.Size(146, 26); this.toolStripMenuItemEnabled.Text = "Enabled"; this.toolStripMenuItemEnabled.CheckStateChanged += new System.EventHandler(this.toolStripMenuItemEnabled_CheckStateChanged); // // toolStripMenuItemClear // this.toolStripMenuItemClear.Name = "toolStripMenuItemClear"; - this.toolStripMenuItemClear.Size = new System.Drawing.Size(116, 22); + this.toolStripMenuItemClear.Size = new System.Drawing.Size(146, 26); this.toolStripMenuItemClear.Text = "Clear"; this.toolStripMenuItemClear.Click += new System.EventHandler(this.toolStripMenuItemClear_Click); // @@ -187,14 +217,14 @@ private void InitializeComponent() this.toolStripMenuItemChannels456, this.toolStripMenuItemChannels789}); this.toolStripMenuItemOsciloscope.Name = "toolStripMenuItemOsciloscope"; - this.toolStripMenuItemOsciloscope.Size = new System.Drawing.Size(83, 20); + this.toolStripMenuItemOsciloscope.Size = new System.Drawing.Size(103, 24); this.toolStripMenuItemOsciloscope.Text = "Osciloscope"; // // toolStripMenuItemChannels123 // this.toolStripMenuItemChannels123.CheckOnClick = true; this.toolStripMenuItemChannels123.Name = "toolStripMenuItemChannels123"; - this.toolStripMenuItemChannels123.Size = new System.Drawing.Size(176, 22); + this.toolStripMenuItemChannels123.Size = new System.Drawing.Size(219, 26); this.toolStripMenuItemChannels123.Text = "Channels 1, 2 and 3"; this.toolStripMenuItemChannels123.CheckStateChanged += new System.EventHandler(this.toolStripMenuItemChannels123_CheckStateChanged); // @@ -202,7 +232,7 @@ private void InitializeComponent() // this.toolStripMenuItemChannels456.CheckOnClick = true; this.toolStripMenuItemChannels456.Name = "toolStripMenuItemChannels456"; - this.toolStripMenuItemChannels456.Size = new System.Drawing.Size(176, 22); + this.toolStripMenuItemChannels456.Size = new System.Drawing.Size(219, 26); this.toolStripMenuItemChannels456.Text = "Channels 3, 4 and 5"; this.toolStripMenuItemChannels456.Click += new System.EventHandler(this.toolStripMenuItemChannels456_CheckStateChanged); // @@ -210,55 +240,81 @@ private void InitializeComponent() // this.toolStripMenuItemChannels789.CheckOnClick = true; this.toolStripMenuItemChannels789.Name = "toolStripMenuItemChannels789"; - this.toolStripMenuItemChannels789.Size = new System.Drawing.Size(176, 22); + this.toolStripMenuItemChannels789.Size = new System.Drawing.Size(219, 26); this.toolStripMenuItemChannels789.Text = "Channels 7, 8 and 9"; this.toolStripMenuItemChannels789.CheckStateChanged += new System.EventHandler(this.toolStripMenuItemChannels789_CheckStateChanged); // + // toolStripMenuItemLogToFile + // + this.toolStripMenuItemLogToFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItemStartLogging, + this.toolStripMenuItemStopLogging}); + this.toolStripMenuItemLogToFile.Name = "toolStripMenuItemLogToFile"; + this.toolStripMenuItemLogToFile.Size = new System.Drawing.Size(95, 24); + this.toolStripMenuItemLogToFile.Text = "Log To File"; + // + // toolStripMenuItemStartLogging + // + this.toolStripMenuItemStartLogging.Name = "toolStripMenuItemStartLogging"; + this.toolStripMenuItemStartLogging.Size = new System.Drawing.Size(182, 26); + this.toolStripMenuItemStartLogging.Text = "Start Logging"; + this.toolStripMenuItemStartLogging.Click += new System.EventHandler(this.toolStripMenuItemStartLogging_Click); + // + // toolStripMenuItemStopLogging + // + this.toolStripMenuItemStopLogging.Enabled = false; + this.toolStripMenuItemStopLogging.Name = "toolStripMenuItemStopLogging"; + this.toolStripMenuItemStopLogging.Size = new System.Drawing.Size(182, 26); + this.toolStripMenuItemStopLogging.Text = "Stop Logging"; + this.toolStripMenuItemStopLogging.Click += new System.EventHandler(this.toolStripMenuItemStopLogging_Click); + // // toolStripMenuItemHelp // this.toolStripMenuItemHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripMenuItemAbout0, this.toolStripMenuItemSourceCode}); this.toolStripMenuItemHelp.Name = "toolStripMenuItemHelp"; - this.toolStripMenuItemHelp.Size = new System.Drawing.Size(44, 20); + this.toolStripMenuItemHelp.Size = new System.Drawing.Size(55, 24); this.toolStripMenuItemHelp.Text = "Help"; // // toolStripMenuItemAbout0 // this.toolStripMenuItemAbout0.Name = "toolStripMenuItemAbout0"; - this.toolStripMenuItemAbout0.Size = new System.Drawing.Size(141, 22); + this.toolStripMenuItemAbout0.Size = new System.Drawing.Size(176, 26); this.toolStripMenuItemAbout0.Text = "About"; this.toolStripMenuItemAbout0.Click += new System.EventHandler(this.toolStripMenuItemAbout_Click); // // toolStripMenuItemSourceCode // this.toolStripMenuItemSourceCode.Name = "toolStripMenuItemSourceCode"; - this.toolStripMenuItemSourceCode.Size = new System.Drawing.Size(141, 22); + this.toolStripMenuItemSourceCode.Size = new System.Drawing.Size(176, 26); this.toolStripMenuItemSourceCode.Text = "Source Code"; this.toolStripMenuItemSourceCode.Click += new System.EventHandler(this.toolStripMenuItemSourceCode_Click); // // statusStrip // + this.statusStrip.ImageScalingSize = new System.Drawing.Size(20, 20); this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripStatusLabelSamplesReceived, this.toolStripStatusLabelSampleRate}); this.statusStrip.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; - this.statusStrip.Location = new System.Drawing.Point(0, 342); + this.statusStrip.Location = new System.Drawing.Point(0, 420); this.statusStrip.Name = "statusStrip"; - this.statusStrip.Size = new System.Drawing.Size(584, 20); + this.statusStrip.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0); + this.statusStrip.Size = new System.Drawing.Size(779, 26); this.statusStrip.TabIndex = 1; this.statusStrip.Text = "statusStrip1"; // // toolStripStatusLabelSamplesReceived // this.toolStripStatusLabelSamplesReceived.Name = "toolStripStatusLabelSamplesReceived"; - this.toolStripStatusLabelSamplesReceived.Size = new System.Drawing.Size(203, 15); + this.toolStripStatusLabelSamplesReceived.Size = new System.Drawing.Size(259, 20); this.toolStripStatusLabelSamplesReceived.Text = "toolStripStatusLabelSamplesReceived"; // // toolStripStatusLabelSampleRate // this.toolStripStatusLabelSampleRate.Name = "toolStripStatusLabelSampleRate"; - this.toolStripStatusLabelSampleRate.Size = new System.Drawing.Size(174, 15); + this.toolStripStatusLabelSampleRate.Size = new System.Drawing.Size(223, 20); this.toolStripStatusLabelSampleRate.Text = "toolStripStatusLabelSampleRate"; // // textBox @@ -267,47 +323,25 @@ private void InitializeComponent() this.textBox.Dock = System.Windows.Forms.DockStyle.Fill; this.textBox.Font = new System.Drawing.Font("Courier New", 8.25F); this.textBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); - this.textBox.Location = new System.Drawing.Point(0, 24); + this.textBox.Location = new System.Drawing.Point(0, 28); + this.textBox.Margin = new System.Windows.Forms.Padding(4); this.textBox.Multiline = true; this.textBox.Name = "textBox"; this.textBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.textBox.Size = new System.Drawing.Size(584, 318); + this.textBox.Size = new System.Drawing.Size(779, 392); this.textBox.TabIndex = 1; this.textBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); // - // toolStripMenuItemLogToFile - // - this.toolStripMenuItemLogToFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripMenuItemStartLogging, - this.toolStripMenuItemStopLogging}); - this.toolStripMenuItemLogToFile.Name = "toolStripMenuItemLogToFile"; - this.toolStripMenuItemLogToFile.Size = new System.Drawing.Size(77, 20); - this.toolStripMenuItemLogToFile.Text = "Log To File"; - // - // toolStripMenuItemStartLogging - // - this.toolStripMenuItemStartLogging.Name = "toolStripMenuItemStartLogging"; - this.toolStripMenuItemStartLogging.Size = new System.Drawing.Size(152, 22); - this.toolStripMenuItemStartLogging.Text = "Start Logging"; - this.toolStripMenuItemStartLogging.Click += new System.EventHandler(this.toolStripMenuItemStartLogging_Click); - // - // toolStripMenuItemStopLogging - // - this.toolStripMenuItemStopLogging.Enabled = false; - this.toolStripMenuItemStopLogging.Name = "toolStripMenuItemStopLogging"; - this.toolStripMenuItemStopLogging.Size = new System.Drawing.Size(152, 22); - this.toolStripMenuItemStopLogging.Text = "Stop Logging"; - this.toolStripMenuItemStopLogging.Click += new System.EventHandler(this.toolStripMenuItemStopLogging_Click); - // // FormTerminal // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(584, 362); + this.ClientSize = new System.Drawing.Size(779, 446); this.Controls.Add(this.textBox); this.Controls.Add(this.statusStrip); this.Controls.Add(this.menuStrip); this.MainMenuStrip = this.menuStrip; + this.Margin = new System.Windows.Forms.Padding(4); this.Name = "FormTerminal"; this.Text = "FormTerminal"; this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FormTerminal_FormClosed); @@ -352,6 +386,9 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemLogToFile; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemStartLogging; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemStopLogging; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemPortSetting; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemDTREnabled; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemRTSEnabled; } } diff --git a/Serial Oscilloscope/Serial Oscilloscope/FormTerminal.cs b/Serial Oscilloscope/Serial Oscilloscope/FormTerminal.cs index 0ece8a4..e425461 100644 --- a/Serial Oscilloscope/Serial Oscilloscope/FormTerminal.cs +++ b/Serial Oscilloscope/Serial Oscilloscope/FormTerminal.cs @@ -222,6 +222,30 @@ private void toolStripMenuItemBaudRate_DropDownItemClicked(object sender, ToolSt } } + /// + /// toolStripMenuItemDTREnabled CheckStgateChanged event to toggle the DTR enabled flag on serial port. + /// + private void toolStripMenuItemDTREnabled_CheckStateChanged(object sender, EventArgs e) + { + // Open serial port + if (!OpenSerialPort()) + { + RefreshSerialPortList(); // refresh port list if open fails, this also ensures port object is closed + } + } + + /// + /// toolStripMenuItemRTSEnabled CheckStgateChanged event to toggle the RTS enabled flag on serial port. + /// + private void toolStripMenuItemRTSEnabled_CheckStateChanged(object sender, EventArgs e) + { + // Open serial port + if (!OpenSerialPort()) + { + RefreshSerialPortList(); // refresh port list if open fails, this also ensures port object is closed + } + } + /// /// toolStripMenuItemEnabled CheckStateChanged event to toggle enabled state of the terminal text box. /// @@ -407,6 +431,8 @@ private bool OpenSerialPort() try { serialPort = new SerialPort(portName, baudRate, Parity.None, 8, StopBits.One); + serialPort.DtrEnable = toolStripMenuItemDTREnabled.Checked; + serialPort.RtsEnable = toolStripMenuItemRTSEnabled.Checked; serialPort.DataReceived += new SerialDataReceivedEventHandler(serialPort_DataReceived); serialPort.Open(); this.Text = Assembly.GetExecutingAssembly().GetName().Name + " (" + portName + ", " + baudRate.ToString() + ")"; diff --git a/Serial Oscilloscope/Serial Oscilloscope/FormTerminal.resx b/Serial Oscilloscope/Serial Oscilloscope/FormTerminal.resx index 46480ab..98cfc97 100644 --- a/Serial Oscilloscope/Serial Oscilloscope/FormTerminal.resx +++ b/Serial Oscilloscope/Serial Oscilloscope/FormTerminal.resx @@ -112,18 +112,18 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 17, 17 - + 132, 17 - + 79 \ No newline at end of file diff --git a/Serial Oscilloscope/Serial Oscilloscope/Oscilloscope/Osc_DLL.dll b/Serial Oscilloscope/Serial Oscilloscope/Oscilloscope/Osc_DLL.dll index cb34cc0..c6e4888 100644 Binary files a/Serial Oscilloscope/Serial Oscilloscope/Oscilloscope/Osc_DLL.dll and b/Serial Oscilloscope/Serial Oscilloscope/Oscilloscope/Osc_DLL.dll differ diff --git a/Serial Oscilloscope/Serial Oscilloscope/Oscilloscope/Osc_DLL64.dll b/Serial Oscilloscope/Serial Oscilloscope/Oscilloscope/Osc_DLL64.dll new file mode 100644 index 0000000..d7fecb6 Binary files /dev/null and b/Serial Oscilloscope/Serial Oscilloscope/Oscilloscope/Osc_DLL64.dll differ diff --git a/Serial Oscilloscope/Serial Oscilloscope/Properties/Resources.Designer.cs b/Serial Oscilloscope/Serial Oscilloscope/Properties/Resources.Designer.cs index 749387f..f2b871b 100644 --- a/Serial Oscilloscope/Serial Oscilloscope/Properties/Resources.Designer.cs +++ b/Serial Oscilloscope/Serial Oscilloscope/Properties/Resources.Designer.cs @@ -1,17 +1,17 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.17929 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Serial_Oscilloscope.Properties -{ - - +namespace Serial_Oscilloscope.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,51 +19,43 @@ namespace Serial_Oscilloscope.Properties // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Serial_Oscilloscope.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/Serial Oscilloscope/Serial Oscilloscope/Properties/Settings.Designer.cs b/Serial Oscilloscope/Serial Oscilloscope/Properties/Settings.Designer.cs index b791548..4df6ffa 100644 --- a/Serial Oscilloscope/Serial Oscilloscope/Properties/Settings.Designer.cs +++ b/Serial Oscilloscope/Serial Oscilloscope/Properties/Settings.Designer.cs @@ -1,28 +1,24 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.17929 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Serial_Oscilloscope.Properties -{ - - +namespace Serial_Oscilloscope.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/Serial Oscilloscope/Serial Oscilloscope/Serial Oscilloscope.csproj b/Serial Oscilloscope/Serial Oscilloscope/Serial Oscilloscope.csproj index ccb2449..b306819 100644 --- a/Serial Oscilloscope/Serial Oscilloscope/Serial Oscilloscope.csproj +++ b/Serial Oscilloscope/Serial Oscilloscope/Serial Oscilloscope.csproj @@ -1,5 +1,5 @@  - + Debug x86 @@ -10,8 +10,9 @@ Properties Serial_Oscilloscope Serial Oscilloscope - v3.5 + v4.8 512 + x86 @@ -22,6 +23,7 @@ DEBUG;TRACE prompt 4 + false x86 @@ -31,6 +33,25 @@ TRACE prompt 4 + false + + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + 7.3 + prompt + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + 7.3 + prompt @@ -76,10 +97,12 @@ True Resources.resx + True PreserveNewest + SettingsSingleFileGenerator Settings.Designer.cs @@ -91,7 +114,10 @@ - + + PreserveNewest + + PreserveNewest diff --git a/Serial Oscilloscope/Serial Oscilloscope/app.config b/Serial Oscilloscope/Serial Oscilloscope/app.config new file mode 100644 index 0000000..3e0e37c --- /dev/null +++ b/Serial Oscilloscope/Serial Oscilloscope/app.config @@ -0,0 +1,3 @@ + + +