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
8 changes: 4 additions & 4 deletions SingleEntryUsingCapture/App.config
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0"/>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
2 changes: 1 addition & 1 deletion SingleEntryUsingCapture/Form1.Designer.cs

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

8 changes: 4 additions & 4 deletions SingleEntryUsingCapture/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// and the decoded data into a list box
///
/// Follow the steps from 1 to 4
/// ©2016-2020 Socket Mobile, Inc.
/// ©2016-2024 Socket Mobile, Inc.

using System;
using System.Collections.Generic;
Expand All @@ -20,12 +20,12 @@ namespace SingleEntryUsingCapture
public partial class Form1 : Form
{
//2- Create a CaptureHelper member
CaptureHelper mCapture;
readonly CaptureHelper mCapture;
public Form1()
{
InitializeComponent();
// 3- instantiate and configure CaptureHelper
mCapture = new CaptureHelper {ContextForEvents = WindowsFormsSynchronizationContext.Current};
mCapture = new CaptureHelper {ContextForEvents = System.Threading.SynchronizationContext.Current };
mCapture.DeviceArrival += mCapture_DeviceArrival;
mCapture.DeviceRemoval += mCapture_DeviceRemoval;
mCapture.DecodedData += mCapture_DecodedData;
Expand Down Expand Up @@ -95,7 +95,7 @@ private void mCapture_Terminate(object sender, CaptureHelper.TerminateArgs e)
// received when a barcode has been decoded correctly
void mCapture_DecodedData(object sender, CaptureHelper.DecodedDataArgs e)
{
string infoAndDecodedData = $"{e.DecodedData.SymbologyName}: {e.DecodedData.DataToUTF8String}";
string infoAndDecodedData = $"{e.DecodedData.DataSourceName}: {e.DecodedData.DataToUTF8String}";
listBoxDecodedData.Items.Add(infoAndDecodedData);
}

Expand Down
37 changes: 31 additions & 6 deletions SingleEntryUsingCapture/SingleEntryUsingCapture.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -36,12 +51,11 @@
<ApplicationIcon>barcodeAndScanner.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="SocketMobile.Capture, Version=1.0.396.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SocketMobile.Capture.1.0.396.477\lib\net\SocketMobile.Capture.dll</HintPath>
<Reference Include="SocketMobile.Capture, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SocketMobile.Capture.1.4.17.146\lib\net48\SocketMobile.Capture.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -55,7 +69,6 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CaptureHelper.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
Expand Down Expand Up @@ -94,6 +107,18 @@
<ItemGroup>
<Content Include="barcodeAndScanner.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.8 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
5 changes: 3 additions & 2 deletions SingleEntryUsingCapture/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="SocketMobile.Capture" version="1.0.396.477" targetFramework="net45" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
<package id="SocketMobile.Capture" version="1.4.17.146" targetFramework="net48" />
</packages>