Skip to content

Commit

Permalink
Add support for .Net 5 and above
Browse files Browse the repository at this point in the history
  • Loading branch information
qbrandon committed Apr 29, 2022
1 parent b2bffe0 commit 5d53f92
Show file tree
Hide file tree
Showing 8 changed files with 750 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Barcode-Net5/.project/design.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"Tags": []
}
140 changes: 140 additions & 0 deletions Barcode-Net5/Decode Image.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
<Activity mc:Ignorable="sap sap2010" x:Class="Decode_Image" this:Decode_Image.Charset="UTF-8" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System.Private.CoreLib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=System.Private.CoreLib" xmlns:sd="clr-namespace:System.Drawing;assembly=System.Drawing.Common" xmlns:this="clr-namespace:" xmlns:ui="http://schemas.uipath.com/workflow/activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:z="clr-namespace:ZXing;assembly=zxing" xmlns:zwc="clr-namespace:ZXing.Windows.Compatibility;assembly=ZXing.Windows.Compatibility">
<x:Members>
<x:Property Name="Output" Type="OutArgument(x:String)" />
<x:Property Name="Image" Type="InArgument(ui:Image)" />
<x:Property Name="Format" Type="OutArgument(z:BarcodeFormat)" />
<x:Property sap2010:Annotation.AnnotationText="Charset to be used for decode (e.g. &quot;SJIS&quot;)" Name="Charset" Type="InArgument(x:String)" />
</x:Members>
<this:Decode_Image.Image>
<InArgument x:TypeArguments="ui:Image" />
</this:Decode_Image.Image>
<VisualBasic.Settings>
<x:Null />
</VisualBasic.Settings>
<sap2010:Annotation.AnnotationText>UPTF00000088eyI8SGVscExpbms+a19fQmFja2luZ0ZpZWxkIjpudWxsLCI8SW5pdGlhbFRvb2x0aXA+a19fQmFja2luZ0ZpZWxkIjpudWxsLCI8VmVyc2lvbj5rX19CYWNraW5nRmllbGQiOjF9</sap2010:Annotation.AnnotationText>
<sap:VirtualizedContainerService.HintSize>1665.3333333333333,913.3333333333334</sap:VirtualizedContainerService.HintSize>
<sap2010:WorkflowViewState.IdRef>Decode_Image_1</sap2010:WorkflowViewState.IdRef>
<TextExpression.NamespacesForImplementation>
<sco:Collection x:TypeArguments="x:String">
<x:String>System.Activities</x:String>
<x:String>System.Activities.Statements</x:String>
<x:String>System.Activities.Expressions</x:String>
<x:String>System.Activities.Validation</x:String>
<x:String>System.Activities.XamlIntegration</x:String>
<x:String>Microsoft.VisualBasic</x:String>
<x:String>Microsoft.VisualBasic.Activities</x:String>
<x:String>System</x:String>
<x:String>System.Collections</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Data</x:String>
<x:String>System.Diagnostics</x:String>
<x:String>System.Drawing</x:String>
<x:String>System.IO</x:String>
<x:String>System.Linq</x:String>
<x:String>System.Net.Mail</x:String>
<x:String>System.Xml</x:String>
<x:String>System.Xml.Linq</x:String>
<x:String>UiPath.Core</x:String>
<x:String>UiPath.Core.Activities</x:String>
<x:String>System.Windows.Markup</x:String>
<x:String>System.Runtime.Serialization</x:String>
<x:String>System.Reflection</x:String>
<x:String>ZXing</x:String>
<x:String>System.Collections.ObjectModel</x:String>
<x:String>ZXing.ZKWeb</x:String>
<x:String>System.DrawingCore</x:String>
<x:String>ZXing.Windows.Compatibility</x:String>
</sco:Collection>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<sco:Collection x:TypeArguments="AssemblyReference">
<AssemblyReference>System.Activities</AssemblyReference>
<AssemblyReference>Microsoft.VisualBasic</AssemblyReference>
<AssemblyReference>System.Private.CoreLib</AssemblyReference>
<AssemblyReference>System.Data</AssemblyReference>
<AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>System.Drawing</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System.Xml</AssemblyReference>
<AssemblyReference>System.Xml.Linq</AssemblyReference>
<AssemblyReference>System.Xaml</AssemblyReference>
<AssemblyReference>UiPath.System.Activities</AssemblyReference>
<AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
<AssemblyReference>System.Runtime.Serialization.Formatters</AssemblyReference>
<AssemblyReference>System.Runtime.Serialization.Primitives</AssemblyReference>
<AssemblyReference>System.Private.DataContractSerialization</AssemblyReference>
<AssemblyReference>System.ObjectModel</AssemblyReference>
<AssemblyReference>System.Reflection.DispatchProxy</AssemblyReference>
<AssemblyReference>System.Reflection.Metadata</AssemblyReference>
<AssemblyReference>zxing</AssemblyReference>
<AssemblyReference>netstandard</AssemblyReference>
<AssemblyReference>ZXing.ZKWeb.System.Drawing</AssemblyReference>
<AssemblyReference>ZKWeb.System.Drawing</AssemblyReference>
<AssemblyReference>ZXing.Windows.Compatibility</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<Sequence DisplayName="Decode_Image" sap:VirtualizedContainerService.HintSize="526,848.6666666666666" sap2010:WorkflowViewState.IdRef="Sequence_1">
<Sequence.Variables>
<Variable x:TypeArguments="sd:Bitmap" Name="bmp" />
<Variable x:TypeArguments="z:Result" Name="result" />
<Variable x:TypeArguments="zwc:BarcodeReader" sap2010:Annotation.AnnotationText="Type 'zz:BarcodeReader' ('clr-namespace:ZXing.ZKWeb;assembly=ZXing.ZKWeb.System.Drawing') could not be resolved and was automatically replaced with 'UnknownType'" Default="[new BarcodeReader]" Name="barcodeReader" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign DisplayName="Convert UiPath.Core.Image to Bitmap" sap:VirtualizedContainerService.HintSize="484,62" sap2010:WorkflowViewState.IdRef="Assign_1">
<Assign.To>
<OutArgument x:TypeArguments="sd:Bitmap">[bmp]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="sd:Bitmap">[new Bitmap(Image)]</InArgument>
</Assign.Value>
</Assign>
<Assign DisplayName="Configure Charset" sap:VirtualizedContainerService.HintSize="484,62" sap2010:WorkflowViewState.IdRef="Assign_2">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[barcodeReader.Options.CharacterSet]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[Charset]</InArgument>
</Assign.Value>
</Assign>
<Assign DisplayName="Decode the Barcode" sap:VirtualizedContainerService.HintSize="484,62" sap2010:WorkflowViewState.IdRef="Assign_3">
<Assign.To>
<OutArgument x:TypeArguments="z:Result">[result]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="z:Result">[barcodeReader.Decode(bmp)]</InArgument>
</Assign.Value>
</Assign>
<If Condition="[result isnot nothing]" DisplayName="Check decode success" sap:VirtualizedContainerService.HintSize="484,450.6666666666667" sap2010:WorkflowViewState.IdRef="If_1">
<If.Then>
<Sequence DisplayName="Extract results" sap:VirtualizedContainerService.HintSize="304,256" sap2010:WorkflowViewState.IdRef="Sequence_2">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign DisplayName="Grab the result text" sap:VirtualizedContainerService.HintSize="262,62" sap2010:WorkflowViewState.IdRef="Assign_4">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[Output]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[result.Text]</InArgument>
</Assign.Value>
</Assign>
<Assign DisplayName="Extract the detected format" sap:VirtualizedContainerService.HintSize="262,62" sap2010:WorkflowViewState.IdRef="Assign_5">
<Assign.To>
<OutArgument x:TypeArguments="z:BarcodeFormat">[Format]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="z:BarcodeFormat">[result.BarcodeFormat]</InArgument>
</Assign.Value>
</Assign>
</Sequence>
</If.Then>
</If>
</Sequence>
</Activity>
46 changes: 46 additions & 0 deletions Barcode-Net5/Decode Image.xaml.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"DisplayName": "Decode Image",
"Tooltip": null,
"HelpLink": null,
"Color": null,
"IconRelativePath": null,
"OriginalIconFileName": null,
"Arguments": [
{
"Name": "Output",
"DisplayName": "Output",
"Category": null,
"Tooltip": null,
"Widget": null,
"IsRequired": false,
"IsPrincipal": true
},
{
"Name": "Image",
"DisplayName": "Image",
"Category": null,
"Tooltip": null,
"Widget": null,
"IsRequired": false,
"IsPrincipal": true
},
{
"Name": "Format",
"DisplayName": "Format",
"Category": null,
"Tooltip": null,
"Widget": null,
"IsRequired": false,
"IsPrincipal": true
},
{
"Name": "Charset",
"DisplayName": "Charset",
"Category": null,
"Tooltip": "Charset to be used for decode (e.g. \"SJIS\")",
"Widget": null,
"IsRequired": false,
"IsPrincipal": true
}
]
}
Loading

0 comments on commit 5d53f92

Please sign in to comment.