<!--
/*
** Job Arranger Manager
** Copyright (C) 2012 FitechForce, Inc. All Rights Reserved.
** Copyright (C) 2013 Daiwa Institute of Research Business Innovation Ltd. All Rights Reserved.
**
**
** Licensed to the Apache Software Foundation (ASF) under one or more 
** contributor license agreements. See the NOTICE file distributed with
** this work for additional information regarding copyright ownership. 
** The ASF licenses this file to you under the Apache License, Version 2.0
** (the "License"); you may not use this file except in compliance with 
** the License. You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
**
**/
-->
    <UserControl x:Class="jp.co.ftf.jobcontroller.JobController.Form.JobEdit.Container"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:src="clr-namespace:jp.co.ftf.jobcontroller.JobController" 
             xmlns:design="clr-namespace:jp.co.ftf.jobcontroller.JobController.Form.JobEdit">
    <Grid x:Name="LayoutRoot"  Background="#FFEEECE1" ShowGridLines="False" Margin="0,0,5,0" >
        <Grid.RowDefinitions >
            <RowDefinition Height="25"/>
            <RowDefinition Height="86"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions >
        <Slider Grid.Row="0" Grid.Column="0" Name="zoomSlider" Minimum="0.3" Maximum="1" IsMoveToPointEnabled="True" Value="1"/>
        <ScrollViewer Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" Name="svSampleContainer" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" >
            <ScrollViewer.Content>
                <Canvas Name="sampleContainer" Background="#FFEEECE1" HorizontalAlignment="Left" Width="860" VerticalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Visible">
                    <design:JobSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="5" x:Name="picJob" MouseLeftButtonDown="JobSample_MouseLeftButtonDown" ></design:JobSample>
                    <design:IfSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="80" x:Name="picIf" MouseLeftButtonDown="IfSample_MouseLeftButtonDown" ></design:IfSample>
                    <design:IfeSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="145" x:Name="picIfe" MouseLeftButtonDown="IfeSample_MouseLeftButtonDown" ></design:IfeSample>
                    <design:MtsSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="180" x:Name="picParallelStart" MouseLeftButtonDown="ParStartSample_MouseLeftButtonDown"></design:MtsSample>
                    <design:MteSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="210" x:Name="picParallelEnd" MouseLeftButtonDown="ParEndSample_MouseLeftButtonDown"></design:MteSample>
                    <design:EnvSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="240" x:Name="picVar" MouseLeftButtonDown="VarSample_MouseLeftButtonDown" ></design:EnvSample>
                    <design:ExtJobSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="315" x:Name="picJobExtention" MouseLeftButtonDown="JobExSample_MouseLeftButtonDown" ></design:ExtJobSample>
                    <design:StartSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="400" x:Name="picStart" MouseLeftButtonDown="StartSample_MouseLeftButtonDown"></design:StartSample>
                    <design:EndSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="475" x:Name="picEnd" MouseLeftButtonDown="EndSample_MouseLeftButtonDown"></design:EndSample>
                    <design:CalSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="548" x:Name="picCalculation" MouseLeftButtonDown="CalcSample_MouseLeftButtonDown"></design:CalSample>
                    <design:LoopSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="625" x:Name="picLoop" MouseLeftButtonDown="LoopSample_MouseLeftButtonDown" ></design:LoopSample>
                    <design:TaskSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="655" x:Name="picTask" MouseLeftButtonDown="TaskSample_MouseLeftButtonDown"></design:TaskSample>
                    <design:InfSample Canvas.ZIndex="100" Canvas.Top="8" Canvas.Left="732" x:Name="picInfomation" MouseLeftButtonDown="InfoSample_MouseLeftButtonDown" ></design:InfSample>
                    <design:FCopySample Canvas.ZIndex="100" Canvas.Top="38" Canvas.Left="5" x:Name="picCopy" MouseLeftButtonDown="FCopySample_MouseLeftButtonDown" ></design:FCopySample>
                    <design:FWaitSample Canvas.ZIndex="100" Canvas.Top="38" Canvas.Left="85" x:Name="picFWait" MouseLeftButtonDown="FWaitSample_MouseLeftButtonDown" ></design:FWaitSample>
                    <design:RebootSample Canvas.ZIndex="100" Canvas.Top="38" Canvas.Left="165" x:Name="picReboot" MouseLeftButtonDown="RebootSample_MouseLeftButtonDown" ></design:RebootSample>
                    <design:ReleaseSample Canvas.ZIndex="100" Canvas.Top="38" Canvas.Left="240" x:Name="picRelease" MouseLeftButtonDown="ReleaseSample_MouseLeftButtonDown" ></design:ReleaseSample>
                    <design:CooperationSample Canvas.ZIndex="100" Canvas.Left="323" Canvas.Top="38" x:Name="cooperationSample1" MouseLeftButtonDown="CooperationSample_MouseLeftButtonDown" ></design:CooperationSample>
                    <design:AgentlessSample Canvas.Left="409" Canvas.Top="39" x:Name="agentlessSample1" MouseLeftButtonDown="AgentlessSample_MouseLeftButtonDow" />
                </Canvas>
            </ScrollViewer.Content>
        </ScrollViewer>
        <Border Margin="0" Grid.Row="2" Grid.Column="0"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderThickness="1" BorderBrush="Black">
            <ScrollViewer HorizontalAlignment="Stretch" Name="svContainer" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Visible" >
                <ScrollViewer.Content>
                    <Canvas Name="cnsDesignerContainer" VerticalAlignment="Stretch" 
                                 MouseLeftButtonDown="Container_MouseLeftButtonDown"
                                 MouseLeftButtonUp="Container_MouseLeftButtonUp"  
                                 MouseEnter="Container_MouseEnter"
                                 MouseLeave="Container_MouseLeave"
                                 AllowDrop="True" Canvas.ZIndex="100"
                                 Width="100000" Height="100000"
                                 Drop="Target_Drop" ClipToBounds="True" Background="WhiteSmoke"
                                 MouseMove="Container_MouseMove">
                        <Canvas.ContextMenu>
                            <ContextMenu Opened="ContextMenu_Open">
                                <!--<design:EditMenu x:Name="canvasMenu"></design:EditMenu>-->
                                <MenuItem Header="{x:Static src:Properties.Resources.linear_flow_menu_text}"  Name="menuitemLine" Click="MenuitemLine_Click"></MenuItem>
                                <MenuItem Header="{x:Static src:Properties.Resources.curve_flow_menu_text}"  Name="menuitemCurve" Click="MenuitemCurve_Click"></MenuItem>
                                <Separator></Separator>
                                <MenuItem Header="{x:Static src:Properties.Resources.true_setting_menu_text}"  Name="menuitemSetTrue" Click="MenuitemSetTrue_Click"></MenuItem>
                                <MenuItem Header="{x:Static src:Properties.Resources.false_setting_menu_text}"  Name="menuitemSetFalse" Click="MenuitemSetFalse_Click"></MenuItem>
                                <Separator></Separator>
                                <MenuItem Header="{x:Static src:Properties.Resources.del_flow_menu_text}"  Name="menuitemDelFlow" Click="MenuitemDelFlow_Click"></MenuItem>
                                <Separator></Separator>
                                <MenuItem Header="{x:Static src:Properties.Resources.del_menu_text}"  Name="menuitemDel" Click="MenuitemlineDel_Click"></MenuItem>
                                <MenuItem Header="{x:Static src:Properties.Resources.setting_menu_text}"  Name="menuitemSet" Click="MenuitemlineSet_Click"></MenuItem>
                                <Separator></Separator>
                                <MenuItem Header="{x:Static src:Properties.Resources.job_run_menu_text}"  Name="menuitemJobRun" Click="MenuitemJobRun_Click"></MenuItem>
                                <Separator></Separator>
                                <MenuItem Header="{x:Static src:Properties.Resources.hold_menu_text}"  Name="menuitemHold" Click="MenuitemHold_Click"></MenuItem>
                                <MenuItem Header="{x:Static src:Properties.Resources.unhold_menu_text}"  Name="menuitemUnHold" Click="MenuitemUnHold_Click"></MenuItem>
                                <Separator></Separator>
                                <MenuItem Header="{x:Static src:Properties.Resources.edit_skip_menu_text}"  Name="menuitemSkip" Click="MenuitemSkip_Click"></MenuItem>
                                <MenuItem Header="{x:Static src:Properties.Resources.unskip_menu_text}"  Name="menuitemUnSkip" Click="MenuitemUnSkip_Click"></MenuItem>
                            </ContextMenu>
                        </Canvas.ContextMenu>
                        <Canvas.LayoutTransform>
                            <ScaleTransform ScaleX="{Binding Path=Value, ElementName=zoomSlider}"
                            ScaleY="{Binding Path=Value, ElementName=zoomSlider}"/>
                        </Canvas.LayoutTransform>
                    </Canvas>
                </ScrollViewer.Content>
            </ScrollViewer>
        </Border>
    </Grid>

</UserControl>
