<Activity mc:Ignorable="sap" x:Class="FlowChartSample.ProcessInputData" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:local="clr-namespace:FlowChartSample" xmlns:local1="clr-namespace:BookmarkSample" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=System.Xml" xmlns:s3="clr-namespace:System;assembly=System.Core" xmlns:s4="clr-namespace:System;assembly=System.ServiceModel" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System" xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel" xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.Core" xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:st="clr-namespace:System.Text;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="Result" Type="OutArgument(x:Int32)" />
  </x:Members>
  <sap:VirtualizedContainerService.HintSize>796,848</sap:VirtualizedContainerService.HintSize>
  <mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
  <Flowchart DisplayName="计算器流程" sad:XamlDebuggerXmlReader.FileName="F:\範例程式--sknp00020_bs\Visual C# and UML\Democodes\Ch13\Ch13Sample_03\FlowChartSample\ProcessInputData.xaml" sap:VirtualizedContainerService.HintSize="614,739">
    <Flowchart.Variables>
      <Variable x:TypeArguments="x:String" Default="0" Name="TempString" />
      <Variable x:TypeArguments="x:String" Name="TempChar" />
      <Variable x:TypeArguments="s:String[]" Default="[{&quot;+&quot;, &quot;-&quot;, &quot;*&quot;, &quot;/&quot;}]" Name="Operators" />
      <Variable x:TypeArguments="x:Int32" Default="0" Name="FirstNumber" />
      <Variable x:TypeArguments="x:Int32" Default="0" Name="SecondNumber" />
      <Variable x:TypeArguments="local:CalculationType" Name="OperatorType" />
    </Flowchart.Variables>
    <sap:WorkflowViewStateService.ViewState>
      <scg3:Dictionary x:TypeArguments="x:String, x:Object">
        <x:Boolean x:Key="IsExpanded">False</x:Boolean>
        <av:Point x:Key="ShapeLocation">270,2.5</av:Point>
        <av:Size x:Key="ShapeSize">60,75</av:Size>
        <av:PointCollection x:Key="ConnectorLocation">300,77.5 300,107.5 300,119</av:PointCollection>
        <x:Double x:Key="Height">703</x:Double>
      </scg3:Dictionary>
    </sap:WorkflowViewStateService.ViewState>
    <Flowchart.StartNode>
      <FlowStep x:Name="__ReferenceID0">
        <sap:WorkflowViewStateService.ViewState>
          <scg3:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">200,119</av:Point>
            <av:Size x:Key="ShapeSize">200,22</av:Size>
            <av:PointCollection x:Key="ConnectorLocation">400,130 450,130 450,202.5</av:PointCollection>
          </scg3:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <local1:RetrieveString BookmarkName="Input.Data" DisplayName="接收输入字符串" sap:VirtualizedContainerService.HintSize="200,22" Result="[TempChar]" />
        <FlowStep.Next>
          <FlowDecision x:Name="__ReferenceID1" Condition="[Char.IsNumber(TempChar, 0)]" sap:VirtualizedContainerService.HintSize="60,75">
            <sap:WorkflowViewStateService.ViewState>
              <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                <av:Point x:Key="ShapeLocation">420,202.5</av:Point>
                <av:Size x:Key="ShapeSize">60,75</av:Size>
                <av:PointCollection x:Key="TrueConnector">420,240 390,240 390,239.5 280.5,239.5</av:PointCollection>
                <av:PointCollection x:Key="FalseConnector">480,240 495,240 495,302.5 465,302.5 465,332.5</av:PointCollection>
                <x:String x:Key="TrueLabel">是数字</x:String>
              </scg3:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <FlowDecision.True>
              <FlowStep x:Name="__ReferenceID2">
                <sap:WorkflowViewStateService.ViewState>
                  <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                    <av:Point x:Key="ShapeLocation">38.5,211</av:Point>
                    <av:Size x:Key="ShapeSize">242,57</av:Size>
                    <av:PointCollection x:Key="ConnectorLocation">160,211 160,130 200,130</av:PointCollection>
                  </scg3:Dictionary>
                </sap:WorkflowViewStateService.ViewState>
                <Assign DisplayName="暂存数字" sap:VirtualizedContainerService.HintSize="242,57">
                  <Assign.To>
                    <OutArgument x:TypeArguments="x:String">[TempString]</OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="x:String">[TempString &amp; TempChar]</InArgument>
                  </Assign.Value>
                </Assign>
                <FlowStep.Next>
                  <x:Reference>__ReferenceID0</x:Reference>
                </FlowStep.Next>
              </FlowStep>
            </FlowDecision.True>
            <FlowDecision.False>
              <FlowDecision x:Name="__ReferenceID3" Condition="[Operators.Contains(TempChar)]" sap:VirtualizedContainerService.HintSize="60,75">
                <sap:WorkflowViewStateService.ViewState>
                  <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                    <av:Point x:Key="ShapeLocation">420,332.5</av:Point>
                    <av:Size x:Key="ShapeSize">60,75</av:Size>
                    <av:PointCollection x:Key="TrueConnector">420,370 390,370 390,319.5 280.5,319.5</av:PointCollection>
                    <av:PointCollection x:Key="FalseConnector">480,370 510,370 510,462.5 450,462.5 450,492.5</av:PointCollection>
                    <x:String x:Key="TrueLabel">是运算符</x:String>
                  </scg3:Dictionary>
                </sap:WorkflowViewStateService.ViewState>
                <FlowDecision.True>
                  <FlowStep x:Name="__ReferenceID4">
                    <sap:WorkflowViewStateService.ViewState>
                      <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                        <av:Point x:Key="ShapeLocation">38.5,291</av:Point>
                        <av:Size x:Key="ShapeSize">242,57</av:Size>
                        <av:PointCollection x:Key="ConnectorLocation">159.5,348 159.5,378 160,378 160,381</av:PointCollection>
                      </scg3:Dictionary>
                    </sap:WorkflowViewStateService.ViewState>
                    <Assign DisplayName="取出第一个数字" sap:VirtualizedContainerService.HintSize="242,57">
                      <Assign.To>
                        <OutArgument x:TypeArguments="x:Int32">[FirstNumber]</OutArgument>
                      </Assign.To>
                      <Assign.Value>
                        <InArgument x:TypeArguments="x:Int32">[Integer.Parse(TempString)]</InArgument>
                      </Assign.Value>
                    </Assign>
                    <FlowStep.Next>
                      <FlowStep x:Name="__ReferenceID6">
                        <sap:WorkflowViewStateService.ViewState>
                          <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                            <av:Point x:Key="ShapeLocation">38.5,381</av:Point>
                            <av:Size x:Key="ShapeSize">242,57</av:Size>
                            <av:PointCollection x:Key="ConnectorLocation">159.5,438 150,438 150,464</av:PointCollection>
                          </scg3:Dictionary>
                        </sap:WorkflowViewStateService.ViewState>
                        <Assign DisplayName="暂存字符串归零" sap:VirtualizedContainerService.HintSize="242,57">
                          <Assign.To>
                            <OutArgument x:TypeArguments="x:String">[TempString]</OutArgument>
                          </Assign.To>
                          <Assign.Value>
                            <InArgument x:TypeArguments="x:String">0</InArgument>
                          </Assign.Value>
                        </Assign>
                        <FlowStep.Next>
                          <FlowStep x:Name="__ReferenceID5">
                            <sap:WorkflowViewStateService.ViewState>
                              <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                                <av:Point x:Key="ShapeLocation">50,464</av:Point>
                                <av:Size x:Key="ShapeSize">200,49</av:Size>
                                <av:PointCollection x:Key="ConnectorLocation">50,488.5 20,488.5 20,100 170,100 170,130 200,130</av:PointCollection>
                              </scg3:Dictionary>
                            </sap:WorkflowViewStateService.ViewState>
                            <Switch x:TypeArguments="x:String" DisplayName="选择运算符" Expression="[TempChar]" sap:VirtualizedContainerService.HintSize="200,49">
                              <Assign x:Key="&quot;+&quot;" sap:VirtualizedContainerService.HintSize="461,100">
                                <Assign.To>
                                  <OutArgument x:TypeArguments="local:CalculationType">[OperatorType]</OutArgument>
                                </Assign.To>
                                <Assign.Value>
                                  <InArgument x:TypeArguments="local:CalculationType">[CalculationType.Add]</InArgument>
                                </Assign.Value>
                              </Assign>
                              <Assign x:Key="&quot;-&quot;" sap:VirtualizedContainerService.HintSize="461,100">
                                <Assign.To>
                                  <OutArgument x:TypeArguments="local:CalculationType">[OperatorType]</OutArgument>
                                </Assign.To>
                                <Assign.Value>
                                  <InArgument x:TypeArguments="local:CalculationType">[CalculationType.Subtract]</InArgument>
                                </Assign.Value>
                              </Assign>
                              <Assign x:Key="&quot;*&quot;" sap:VirtualizedContainerService.HintSize="461,100">
                                <Assign.To>
                                  <OutArgument x:TypeArguments="local:CalculationType">[OperatorType]</OutArgument>
                                </Assign.To>
                                <Assign.Value>
                                  <InArgument x:TypeArguments="local:CalculationType">[CalculationType.Multiply]</InArgument>
                                </Assign.Value>
                              </Assign>
                              <Assign x:Key="&quot;/&quot;" sap:VirtualizedContainerService.HintSize="461,100">
                                <Assign.To>
                                  <OutArgument x:TypeArguments="local:CalculationType">[OperatorType]</OutArgument>
                                </Assign.To>
                                <Assign.Value>
                                  <InArgument x:TypeArguments="local:CalculationType">[CalculationType.Divide]</InArgument>
                                </Assign.Value>
                              </Assign>
                            </Switch>
                            <FlowStep.Next>
                              <x:Reference>__ReferenceID0</x:Reference>
                            </FlowStep.Next>
                          </FlowStep>
                        </FlowStep.Next>
                      </FlowStep>
                    </FlowStep.Next>
                  </FlowStep>
                </FlowDecision.True>
                <FlowDecision.False>
                  <FlowDecision x:Name="__ReferenceID7" Condition="[TempChar = &quot;=&quot;]" sap:VirtualizedContainerService.HintSize="60,75">
                    <sap:WorkflowViewStateService.ViewState>
                      <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                        <av:Point x:Key="ShapeLocation">420,492.5</av:Point>
                        <av:Size x:Key="ShapeSize">60,75</av:Size>
                        <av:PointCollection x:Key="TrueConnector">420,530 140,530 140,551</av:PointCollection>
                        <av:PointCollection x:Key="FalseConnector">480,530 500,530 500,589 470,589 470,619</av:PointCollection>
                        <x:String x:Key="TrueLabel">是等号</x:String>
                      </scg3:Dictionary>
                    </sap:WorkflowViewStateService.ViewState>
                    <FlowDecision.True>
                      <FlowStep x:Name="__ReferenceID8">
                        <sap:WorkflowViewStateService.ViewState>
                          <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                            <av:Point x:Key="ShapeLocation">18.5,551</av:Point>
                            <av:Size x:Key="ShapeSize">242,57</av:Size>
                            <av:PointCollection x:Key="ConnectorLocation">139.5,608 139.5,638 140,638 140,654</av:PointCollection>
                          </scg3:Dictionary>
                        </sap:WorkflowViewStateService.ViewState>
                        <Assign DisplayName="取出第二个数字" sap:VirtualizedContainerService.HintSize="242,57">
                          <Assign.To>
                            <OutArgument x:TypeArguments="x:Int32">[SecondNumber]</OutArgument>
                          </Assign.To>
                          <Assign.Value>
                            <InArgument x:TypeArguments="x:Int32">[Integer.Parse(TempString)]</InArgument>
                          </Assign.Value>
                        </Assign>
                        <FlowStep.Next>
                          <FlowStep x:Name="__ReferenceID9">
                            <sap:WorkflowViewStateService.ViewState>
                              <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                                <av:Point x:Key="ShapeLocation">40,654</av:Point>
                                <av:Size x:Key="ShapeSize">200,49</av:Size>
                              </scg3:Dictionary>
                            </sap:WorkflowViewStateService.ViewState>
                            <Switch x:TypeArguments="local:CalculationType" DisplayName="四则运算" Expression="[OperatorType]" sap:VirtualizedContainerService.HintSize="200,49">
                              <Assign x:Key="Add" sap:VirtualizedContainerService.HintSize="461,100">
                                <Assign.To>
                                  <OutArgument x:TypeArguments="x:Int32">[Result]</OutArgument>
                                </Assign.To>
                                <Assign.Value>
                                  <InArgument x:TypeArguments="x:Int32">[FirstNumber + SecondNumber]</InArgument>
                                </Assign.Value>
                              </Assign>
                              <Assign x:Key="Subtract" sap:VirtualizedContainerService.HintSize="461,100">
                                <Assign.To>
                                  <OutArgument x:TypeArguments="x:Int32">[Result]</OutArgument>
                                </Assign.To>
                                <Assign.Value>
                                  <InArgument x:TypeArguments="x:Int32">[FirstNumber - SecondNumber]</InArgument>
                                </Assign.Value>
                              </Assign>
                              <Assign x:Key="Multiply" sap:VirtualizedContainerService.HintSize="511,100">
                                <Assign.To>
                                  <OutArgument x:TypeArguments="x:Int32">[Result]</OutArgument>
                                </Assign.To>
                                <Assign.Value>
                                  <InArgument x:TypeArguments="x:Int32">[FirstNumber * SecondNumber]</InArgument>
                                </Assign.Value>
                              </Assign>
                              <If x:Key="Divide" Condition="[SecondNumber = 0]" sap:VirtualizedContainerService.HintSize="511,208">
                                <If.Then>
                                  <Assign sap:VirtualizedContainerService.HintSize="243,100">
                                    <Assign.To>
                                      <OutArgument x:TypeArguments="x:Int32">[Result]</OutArgument>
                                    </Assign.To>
                                    <Assign.Value>
                                      <InArgument x:TypeArguments="x:Int32">0</InArgument>
                                    </Assign.Value>
                                  </Assign>
                                </If.Then>
                                <If.Else>
                                  <Assign sap:VirtualizedContainerService.HintSize="243,100">
                                    <Assign.To>
                                      <OutArgument x:TypeArguments="x:Int32">[Result]</OutArgument>
                                    </Assign.To>
                                    <Assign.Value>
                                      <InArgument x:TypeArguments="x:Int32">[Convert.ToInt32(FirstNumber / SecondNumber)]</InArgument>
                                    </Assign.Value>
                                  </Assign>
                                </If.Else>
                              </If>
                            </Switch>
                          </FlowStep>
                        </FlowStep.Next>
                      </FlowStep>
                    </FlowDecision.True>
                    <FlowDecision.False>
                      <FlowStep x:Name="__ReferenceID10">
                        <sap:WorkflowViewStateService.ViewState>
                          <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                            <av:Point x:Key="ShapeLocation">370,619</av:Point>
                            <av:Size x:Key="ShapeSize">200,22</av:Size>
                          </scg3:Dictionary>
                        </sap:WorkflowViewStateService.ViewState>
                        <Throw DisplayName="抛出错误" Exception="[New Exception(&quot;錯誤&quot;)]" sap:VirtualizedContainerService.HintSize="200,22" />
                      </FlowStep>
                    </FlowDecision.False>
                  </FlowDecision>
                </FlowDecision.False>
              </FlowDecision>
            </FlowDecision.False>
          </FlowDecision>
        </FlowStep.Next>
      </FlowStep>
    </Flowchart.StartNode>
    <x:Reference>__ReferenceID0</x:Reference>
    <x:Reference>__ReferenceID1</x:Reference>
    <x:Reference>__ReferenceID2</x:Reference>
    <x:Reference>__ReferenceID3</x:Reference>
    <x:Reference>__ReferenceID4</x:Reference>
    <x:Reference>__ReferenceID5</x:Reference>
    <x:Reference>__ReferenceID6</x:Reference>
    <x:Reference>__ReferenceID7</x:Reference>
    <x:Reference>__ReferenceID8</x:Reference>
    <x:Reference>__ReferenceID9</x:Reference>
    <x:Reference>__ReferenceID10</x:Reference>
  </Flowchart>
</Activity>