<!--
/*
** 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.
**
**/
-->
    <Window x:Class="jp.co.ftf.jobcontroller.JobController.Form.JobEdit.JobSetting"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:src="clr-namespace:jp.co.ftf.jobcontroller.JobController" 
        Title="{x:Static src:Properties.Resources.job_icon_screen_name}" FontSize="11" FontFamily="Meiryo"
        WindowStartupLocation="CenterScreen" ResizeMode="NoResize" MouseUp="Window_MouseUp" Closing="Window_Closed" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="750" d:DesignWidth="414" SizeToContent="WidthAndHeight">
    <Grid Background="#FFEEECE1" Width="394" Name="GridSetting" Height="715">
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
            <RowDefinition Height="73" />
            <RowDefinition Height="30" />
            <RowDefinition Height="120" />
            <RowDefinition Height="112" />
            <RowDefinition Height="46" />
            <RowDefinition Height="112" />
            <RowDefinition Height="30" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Label Grid.Row="0" Content="{x:Static src:Properties.Resources.job_id_label_text}" Height="28" HorizontalAlignment="Left" Margin="12,3,0,0" 
               VerticalAlignment="Top" VerticalContentAlignment="Center" />
        <TextBox Grid.Row="0" Name="txtJobId" Height="23" Width="305" Margin="82,6,0,0" HorizontalAlignment="Left" 
                 VerticalAlignment="Top" VerticalContentAlignment="Center" MaxLength="32" />
        <Label Grid.Row="1" Content="{x:Static src:Properties.Resources.job_name_label_text}" Height="28" HorizontalAlignment="Left" Margin="12,3,0,0" 
               VerticalAlignment="Top" VerticalContentAlignment="Center" />
        <TextBox Grid.Row="1" Name="txtJobName" Height="23" Width="305" Margin="82,6,0,0" HorizontalAlignment="Left" 
                 VerticalAlignment="Top" VerticalContentAlignment="Center" MaxLength="64" />
        <GroupBox Grid.Row="2" Header="{x:Static src:Properties.Resources.host_label_text}" Height="79" Width="385" Margin="7,2,0,0" Name="gbHost" 
                  VerticalAlignment="Top" HorizontalAlignment="Left" Grid.RowSpan="2">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="28" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <RadioButton Grid.Row="0" GroupName="hostGroup" Content="{x:Static src:Properties.Resources.host_name_label_text}" Name="rbHostName" Height="16"
                             HorizontalAlignment="Left" Margin="6,6,0,0" VerticalAlignment="Top" 
                             Checked="rbHostName_Checked"/>
                <ComboBox Name="combHostName" Height="23" Width="270" HorizontalAlignment="Left" 
                  Margin="102,1,0,0" VerticalAlignment="Top" >
                </ComboBox>
                <RadioButton Grid.Row="1" Content="{x:Static src:Properties.Resources.value_name_label_text}" GroupName="hostGroup" Height="16" HorizontalAlignment="Left" 
                             Margin="6,5,0,0" Name="rbVariableName" VerticalAlignment="Top" Checked="rbVariableName_Checked"/>
                <TextBox Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="102,0,0,0" Name="textVariableName"
                         VerticalAlignment="Top" VerticalContentAlignment="Center" Width="270" MaxLength="128"/>
            </Grid>
        </GroupBox>
        <CheckBox Grid.Row="3" Content="{x:Static src:Properties.Resources.stop_command_label_text}" Height="16" HorizontalAlignment="Left" Margin="17,16,0,0" 
                  Name="cbStop" VerticalAlignment="Top" Click="cbStop_Click" Grid.RowSpan="2" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="123,10,0,0" Name="txtStopCmd" VerticalAlignment="Top" 
                 VerticalContentAlignment="Center" Width="264" Grid.Row="3" MaxLength="4000" Grid.RowSpan="2" />
        <GroupBox Header="{x:Static src:Properties.Resources.exec_label_text}" Height="115" HorizontalAlignment="Left" Margin="7,8,0,0" Name="gbExcute" 
                  VerticalAlignment="Top" Width="390" Grid.Row="4" Grid.RowSpan="2">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="20*" />
                    <ColumnDefinition Width="358*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <TextBox Height="92" Width="374" HorizontalAlignment="Left" Name="txtCmd" TextWrapping="Wrap"
                         Margin="0,4,0,0" VerticalAlignment="Top" VerticalScrollBarVisibility="Auto" MaxLength="4000" AcceptsReturn="True" Grid.ColumnSpan="2" />
            </Grid>
        </GroupBox>
        <Label Grid.Row="5" Content="{x:Static src:Properties.Resources.job_value_label_text}" Height="23" HorizontalAlignment="Left" Margin="9,3,0,0" 
               VerticalAlignment="Top" />
        <DataGrid Grid.Row="5" Name="dgJobValue" Height="89" Width="374" AutoGenerateColumns="False" 
                  HorizontalAlignment="Left" Margin="13,23,0,0" VerticalAlignment="Top" Background="White" 
                  BorderBrush="Black" GridLinesVisibility="None" RowHeight="18" CanUserAddRows="False"
                  SelectionMode="Single" RowHeaderWidth="0" IsReadOnly="True" KeyUp="dgJobValue_KeyUp" SelectionChanged="dgJobValue_SelectionChanged"
                  VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Auto"
                ScrollViewer.IsDeferredScrollingEnabled="True"
                VirtualizingStackPanel.IsVirtualizing="True"
                VirtualizingStackPanel.VirtualizationMode= "Standard"
                EnableColumnVirtualization="True" GotFocus="DataGrid_GotFocus" LostFocus="DataGrid_LostFocus"
                RowDetailsVisibilityMode="Visible" SnapsToDevicePixels="True"
                KeyboardNavigation.TabNavigation="Once">
            <DataGrid.Resources>
                <SolidColorBrush x:Key="SelectionColorKey" Color="#FF316AC5"/>
                <Style TargetType="DataGridRow">
                    <Style.Resources>
                        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="{Binding Source={StaticResource SelectionColorKey}, Path=Color}"/>
                    </Style.Resources>
                </Style>
            </DataGrid.Resources>

            <DataGrid.ColumnHeaderStyle>
                <Style TargetType="DataGridColumnHeader">
                    <Setter Property="Background" Value="White"/>
                    <Setter Property="BorderThickness" Value="1,0,0,1"/>
                    <Setter Property="BorderBrush" Value="Black"/>
                    <Setter Property="FontWeight" Value="Bold"/>
                    <Setter Property="Height" Value="18"/>
                    <Setter Property="Padding" Value="4,0,0,0"/>
                </Style>
            </DataGrid.ColumnHeaderStyle>
            <DataGrid.Columns>
                <DataGridTextColumn Header="{x:Static src:Properties.Resources.value_name_col_head_text}" Binding="{Binding Path=value_name}" Width="Auto" />
                <DataGridTextColumn Header="{x:Static src:Properties.Resources.value_col_head_text}" Binding="{Binding Path=value}" Width="Auto" >
                    <DataGridTextColumn.CellStyle>
                        <Style TargetType="{x:Type DataGridCell}">
                            <Setter Property="KeyboardNavigation.IsTabStop" Value="False"></Setter>
                        </Style>
                    </DataGridTextColumn.CellStyle>
                </DataGridTextColumn>
            </DataGrid.Columns>
        </DataGrid>
        <Label Grid.Row="6" Content="{x:Static src:Properties.Resources.value_name_label_text}" Height="23" HorizontalAlignment="Left" Margin="9,4,0,0" 
               VerticalAlignment="Top" />
        <TextBox Grid.Row="6" Name="txtJobValueName" Height="23" Width="130" HorizontalAlignment="Left"
                 Margin="13,26,0,0" VerticalAlignment="Top" VerticalContentAlignment="Center" MaxLength="128" Grid.RowSpan="2" />
        <Label Grid.Row="6" Content="{x:Static src:Properties.Resources.value_label_text}" Height="23" HorizontalAlignment="Left" Margin="146,4,0,0" 
               VerticalAlignment="Top" />
        <TextBox Grid.Row="6" Name="txtJobValue" Height="23" Width="139" HorizontalAlignment="Left" 
                 Margin="146,26,0,0" VerticalAlignment="Top" VerticalContentAlignment="Center" MaxLength="4000" Grid.RowSpan="2" />
        <Button Grid.Row="6" Content="{x:Static src:Properties.Resources.del_button_text}" Height="23" HorizontalAlignment="Left" Margin="290,26,0,0" 
                Name="btnDel" VerticalAlignment="Top" Width="45" Click ="btnDel_Click" Grid.RowSpan="2" />
        <Button Grid.Row="6" Content="{x:Static src:Properties.Resources.add_button_text}" Height="23" HorizontalAlignment="Left" Margin="337,26,0,0" Name="btnAdd" 
                VerticalAlignment="Top" Width="45" Click="btnAdd_Click" Grid.RowSpan="2" />
        <Label Content="{x:Static src:Properties.Resources.jobcon_value_label_text}" Height="23" HorizontalAlignment="Left" Margin="9,7,0,0" VerticalAlignment="Top" Grid.Row="7" Width="149" />
        <ListBox Grid.Row="7" Height="86" HorizontalAlignment="Left" Margin="13,28,0,0" Name="lstbJobCon" Padding="2"
                 VerticalAlignment="Top" Width="374" BorderBrush="Black" Background="#FFEEECE1" KeyboardNavigation.TabNavigation="Once"  GotFocus="ListBox_GotFocus" Grid.RowSpan="2">
            <ListBox.Resources>
                <Style TargetType="ListBoxItem">
                    <Style.Resources>
                        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FF316AC5" />
                        <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#FF316AC5" />
                    </Style.Resources>
                </Style>
            </ListBox.Resources>
        </ListBox>
        <Label Grid.Row="9" Content="{x:Static src:Properties.Resources.timeout_label_text}" Height="23" Width="157" HorizontalAlignment="Left" 
               Margin="9,4,0,0" VerticalAlignment="Top" />
        <TextBox Grid.Row="9" Name="txtTimeOut" Height="23" Width="40" HorizontalAlignment="Left" Margin="162,7,0,0" 
                 VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" MaxLength="5" />
        <Label Grid.Row="8" Content="{x:Static src:Properties.Resources.stop_code_label_text}" Height="23" Width="105" HorizontalAlignment="Left" 
               Margin="9,5,0,0" VerticalAlignment="Top" />
        <TextBox Grid.Row="8" Name="txtStopCode" Height="23" Width="72" HorizontalAlignment="Left" Margin="130,6,0,0" 
                 VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" MaxLength="32" />
        <ComboBox Grid.Row="9" Name="combRunType" Height="23" Width="80" HorizontalAlignment="Left" 
                  Margin="220,7,0,0" VerticalAlignment="Top" >
            <ComboBoxItem Content="{x:Static src:Properties.Resources.timeout_run_type_label_text}"></ComboBoxItem>
            <ComboBoxItem>job stop</ComboBoxItem>
        </ComboBox>
        <CheckBox Grid.Row="8" Content="{x:Static src:Properties.Resources.force_label_text}" Height="13" HorizontalAlignment="Left" Margin="212,9,0,0" VerticalAlignment="Top" Name="cbForce" Width="79" />
        <CheckBox Grid.Row="8" Content="{x:Static src:Properties.Resources.continue_label_text}" Height="13" HorizontalAlignment="Left" Margin="306,9,0,0" VerticalAlignment="Top" Name="cbContinue" Width="79" />
        <Label Grid.Row="9" Content="{x:Static src:Properties.Resources.run_user_label_text}" Height="23" Width="82" HorizontalAlignment="Left" 
               Margin="9,34,0,0" VerticalAlignment="Top" />
        <Label Grid.Row="9" Content="{x:Static src:Properties.Resources.run_user_password_label_text}" Height="23" Width="82" HorizontalAlignment="Left" 
               Margin="9,64,0,0" VerticalAlignment="Top" />
        <TextBox Grid.Row="9" Height="24" HorizontalAlignment="Left" Margin="95,35,0,0" Name="txtRunUser" VerticalAlignment="Top" Width="291" />
        <TextBox Grid.Row="9" Height="24" HorizontalAlignment="Left" Margin="95,65,0,0" Name="txtRunUserPW" VerticalAlignment="Top" Width="291" />
        <Button Grid.Row="9" Content="{x:Static src:Properties.Resources.regist_button_text}" Height="28" HorizontalAlignment="Left" Margin="231,98,0,0" 
                Name="btnToroku" VerticalAlignment="Top" Width="75" Click="btnToroku_Click" IsDefault="True"/>
        <Button Grid.Row="9" Content="{x:Static src:Properties.Resources.cancel_button_text}" Height="28" HorizontalAlignment="Left" Margin="311,98,0,0" 
                Name="btnCancel" VerticalAlignment="Top" Width="75" Click="btnCancel_Click" IsCancel="True"/>
    </Grid>
</Window>
