-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for DecodeMultiple and fix namespace redundancy
- Loading branch information
Showing
10 changed files
with
291 additions
and
26 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
<Activity mc:Ignorable="sap sap2010" x:Class="Main" this:Main.Charset="UTF-8" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" 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=mscorlib" xmlns:sd="clr-namespace:System.Drawing;assembly=System.Drawing" 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"> | ||
<x:Members> | ||
<x:Property Name="Output" Type="OutArgument(s: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. "SJIS")" Name="Charset" Type="InArgument(x:String)" /> | ||
</x:Members> | ||
<this:Main.Image> | ||
<InArgument x:TypeArguments="ui:Image" /> | ||
</this:Main.Image> | ||
<mva:VisualBasic.Settings> | ||
<x:Null /> | ||
</mva:VisualBasic.Settings> | ||
<sap2010:Annotation.AnnotationText>UPTF00000140eyI8SGVscExpbms+a19fQmFja2luZ0ZpZWxkIjoiaHR0cHM6XC9cL2dpdGh1Yi5jb21cL3FicmFuZG9uXC9VaVBhdGhUZWFtLkJhcmNvZGUiLCI8SW5pdGlhbFRvb2x0aXA+a19fQmFja2luZ0ZpZWxkIjoiRGVjb2RlIE11bHRpcGxlIEJhcmNvZGVzIGZyb20gYW4gaW5wdXQgVWlQYXRoLkNvcmUuSW1hZ2UgdXNpbmcgdGhlIFpYaW5nLkJhcmNvZGVSZWFkZXIgY2xhc3MiLCI8VmVyc2lvbj5rX19CYWNraW5nRmllbGQiOjF9</sap2010:Annotation.AnnotationText> | ||
<sap:VirtualizedContainerService.HintSize>1721.33333333333,1496</sap:VirtualizedContainerService.HintSize> | ||
<sap2010:WorkflowViewState.IdRef>ActivityBuilder_1</sap2010:WorkflowViewState.IdRef> | ||
<TextExpression.NamespacesForImplementation> | ||
<scg:List x:TypeArguments="x:String" Capacity="44"> | ||
<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>ZXing</x:String> | ||
<x:String>Microsoft.VisualBasic.CompilerServices</x:String> | ||
<x:String>ZXing.Common</x:String> | ||
<x:String>System.Reflection</x:String> | ||
<x:String>System.Runtime.InteropServices</x:String> | ||
<x:String>System.Collections.ObjectModel</x:String> | ||
<x:String>System.Activities.DynamicUpdate</x:String> | ||
</scg:List> | ||
</TextExpression.NamespacesForImplementation> | ||
<TextExpression.ReferencesForImplementation> | ||
<scg:List x:TypeArguments="AssemblyReference" Capacity="34"> | ||
<AssemblyReference>System.Activities</AssemblyReference> | ||
<AssemblyReference>Microsoft.VisualBasic</AssemblyReference> | ||
<AssemblyReference>mscorlib</AssemblyReference> | ||
<AssemblyReference>System.Data</AssemblyReference> | ||
<AssemblyReference>System</AssemblyReference> | ||
<AssemblyReference>System.Drawing</AssemblyReference> | ||
<AssemblyReference>System.Core</AssemblyReference> | ||
<AssemblyReference>System.Xml</AssemblyReference> | ||
<AssemblyReference>System.Xml.Linq</AssemblyReference> | ||
<AssemblyReference>PresentationFramework</AssemblyReference> | ||
<AssemblyReference>WindowsBase</AssemblyReference> | ||
<AssemblyReference>PresentationCore</AssemblyReference> | ||
<AssemblyReference>System.Xaml</AssemblyReference> | ||
<AssemblyReference>UiPath.System.Activities</AssemblyReference> | ||
<AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference> | ||
<AssemblyReference>zxing</AssemblyReference> | ||
<AssemblyReference>zxing.presentation</AssemblyReference> | ||
<AssemblyReference>System.ServiceModel</AssemblyReference> | ||
<AssemblyReference>UiPath.Excel</AssemblyReference> | ||
<AssemblyReference>UiPath.Mail</AssemblyReference> | ||
<AssemblyReference>System.ComponentModel.Composition</AssemblyReference> | ||
<AssemblyReference>System.Runtime.WindowsRuntime</AssemblyReference> | ||
</scg:List> | ||
</TextExpression.ReferencesForImplementation> | ||
<Sequence sap2010:Annotation.AnnotationText="Decode Multiple Barcodes from an input UiPath.Core.Image using the ZXing.BarcodeReader class" DisplayName="Decode input Image" sap:VirtualizedContainerService.HintSize="604.666666666667,1431.33333333333" sap2010:WorkflowViewState.IdRef="Sequence_1"> | ||
<Sequence.Variables> | ||
<Variable x:TypeArguments="z:BarcodeReader" Default="[new BarcodeReader]" Name="barcodeReader" /> | ||
<Variable x:TypeArguments="z:Result[]" Name="result" /> | ||
<Variable x:TypeArguments="sd:Bitmap" Name="bmp" /> | ||
</Sequence.Variables> | ||
<sap:WorkflowViewStateService.ViewState> | ||
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | ||
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | ||
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean> | ||
</scg:Dictionary> | ||
</sap:WorkflowViewStateService.ViewState> | ||
<Assign DisplayName="Convert UiPath.Core.Image to Bitmap" sap:VirtualizedContainerService.HintSize="562.666666666667,62" sap2010:WorkflowViewState.IdRef="Assign_2"> | ||
<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="562.666666666667,62" sap2010:WorkflowViewState.IdRef="Assign_5"> | ||
<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="562.666666666667,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.DecodeMultiple(bmp)]</InArgument> | ||
</Assign.Value> | ||
</Assign> | ||
<If Condition="[result isnot nothing AndAlso result.Length > 0]" DisplayName="Check decode success" sap:VirtualizedContainerService.HintSize="562.666666666667,1002.66666666667" sap2010:WorkflowViewState.IdRef="If_1"> | ||
<If.Then> | ||
<Sequence DisplayName="Extract results" sap:VirtualizedContainerService.HintSize="526,818" sap2010:WorkflowViewState.IdRef="Sequence_2"> | ||
<Sequence.Variables> | ||
<Variable x:TypeArguments="x:Int32" Default="0" Name="index" /> | ||
</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="Init Output Array" sap:VirtualizedContainerService.HintSize="484,62" sap2010:WorkflowViewState.IdRef="Assign_7"> | ||
<Assign.To> | ||
<OutArgument x:TypeArguments="s:String[]">[Output]</OutArgument> | ||
</Assign.To> | ||
<Assign.Value> | ||
<InArgument x:TypeArguments="s:String[]">[new String(result.Length - 1) {}]</InArgument> | ||
</Assign.Value> | ||
</Assign> | ||
<Assign DisplayName="Init Format Array" sap:VirtualizedContainerService.HintSize="484,62" sap2010:WorkflowViewState.IdRef="Assign_8"> | ||
<Assign.To> | ||
<OutArgument x:TypeArguments="z:BarcodeFormat[]">[Format]</OutArgument> | ||
</Assign.To> | ||
<Assign.Value> | ||
<InArgument x:TypeArguments="z:BarcodeFormat[]">[new BarcodeFormat(result.Length - 1) {}]</InArgument> | ||
</Assign.Value> | ||
</Assign> | ||
<While DisplayName="Loop over results" sap:VirtualizedContainerService.HintSize="484,522" sap2010:WorkflowViewState.IdRef="While_1" Condition="[index < result.Length]"> | ||
<Sequence DisplayName="Loop body" sap:VirtualizedContainerService.HintSize="304,358" sap2010:WorkflowViewState.IdRef="Sequence_3"> | ||
<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_9"> | ||
<Assign.To> | ||
<OutArgument x:TypeArguments="x:String">[Output(index)]</OutArgument> | ||
</Assign.To> | ||
<Assign.Value> | ||
<InArgument x:TypeArguments="x:String">[result(index).Text]</InArgument> | ||
</Assign.Value> | ||
</Assign> | ||
<Assign DisplayName="Extract the detected format" sap:VirtualizedContainerService.HintSize="262,62" sap2010:WorkflowViewState.IdRef="Assign_10"> | ||
<Assign.To> | ||
<OutArgument x:TypeArguments="z:BarcodeFormat">[Format(index)]</OutArgument> | ||
</Assign.To> | ||
<Assign.Value> | ||
<InArgument x:TypeArguments="z:BarcodeFormat">[result(index).BarcodeFormat]</InArgument> | ||
</Assign.Value> | ||
</Assign> | ||
<Assign sap:VirtualizedContainerService.HintSize="262,62" sap2010:WorkflowViewState.IdRef="Assign_11"> | ||
<Assign.To> | ||
<OutArgument x:TypeArguments="x:Int32">[index]</OutArgument> | ||
</Assign.To> | ||
<Assign.Value> | ||
<InArgument x:TypeArguments="x:Int32">[index + 1]</InArgument> | ||
</Assign.Value> | ||
</Assign> | ||
</Sequence> | ||
</While> | ||
</Sequence> | ||
</If.Then> | ||
</If> | ||
</Sequence> | ||
</Activity> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.