Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,7 @@ pip-log.txt
# Binary archive
##################

bin-archive/
bin-archive/

# Visual Studio 2015 cache/options directory
.vs/
12 changes: 10 additions & 2 deletions Serial Oscilloscope/Serial Oscilloscope.sln
Original file line number Diff line number Diff line change
@@ -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
Expand Down
145 changes: 91 additions & 54 deletions Serial Oscilloscope/Serial Oscilloscope/FormTerminal.Designer.cs

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions Serial Oscilloscope/Serial Oscilloscope/FormTerminal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,30 @@ private void toolStripMenuItemBaudRate_DropDownItemClicked(object sender, ToolSt
}
}

/// <summary>
/// toolStripMenuItemDTREnabled CheckStgateChanged event to toggle the DTR enabled flag on serial port.
/// </summary>
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
}
}

/// <summary>
/// toolStripMenuItemRTSEnabled CheckStgateChanged event to toggle the RTS enabled flag on serial port.
/// </summary>
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
}
}

/// <summary>
/// toolStripMenuItemEnabled CheckStateChanged event to toggle enabled state of the terminal text box.
/// </summary>
Expand Down Expand Up @@ -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() + ")";
Expand Down
10 changes: 5 additions & 5 deletions Serial Oscilloscope/Serial Oscilloscope/FormTerminal.resx
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,18 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>79</value>
</metadata>
</root>
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 29 additions & 3 deletions Serial Oscilloscope/Serial Oscilloscope/Serial Oscilloscope.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand All @@ -10,8 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Serial_Oscilloscope</RootNamespace>
<AssemblyName>Serial Oscilloscope</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
Expand All @@ -22,6 +23,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
Expand All @@ -31,6 +33,25 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down Expand Up @@ -76,10 +97,12 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Content Include="Oscilloscope\Oscilloscope_settings.ini">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand All @@ -91,7 +114,10 @@
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="Oscilloscope\Osc_DLL.dll">
<Content Include="Oscilloscope\Osc_DLL.dll" Condition="'$(Platform)' == 'x86'">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Oscilloscope\Osc_DLL64.dll" Condition="'$(Platform)' == 'x64'" TargetPath="Oscilloscope\Osc_DLL.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions Serial Oscilloscope/Serial Oscilloscope/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>