<UserControl x:Class="StartServerWPF.Modules.Main.Views.SetParamView"
             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:prism="http://prismlibrary.com/" 
             prism:ViewModelLocator.AutoWireViewModel="True"
             mc:Ignorable="d" Background="#FFEEF1F3"
             d:DesignHeight="300" d:DesignWidth="500">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>

            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="60"/>
            <RowDefinition Height="4*"/>
        </Grid.RowDefinitions>
        <Border Background="White">
            <TextBlock Text="{Binding Title}" FontSize="16" FontWeight="Bold" VerticalAlignment="Center"  Margin="10,0,10,0"/>
        </Border>
        <Border Background="White" Grid.Row="1" CornerRadius="5" Margin="10">
            <Grid Margin="100,0,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="60"/>
                    <RowDefinition Height="4*"/>
                    <RowDefinition Height="2*"/>
                    <RowDefinition Height="1*"/>
                    <RowDefinition Height="5*"/>
                </Grid.RowDefinitions>
                <Grid Grid.Row="1"  >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="300"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="IP地址："  Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" />
                    <TextBox Text="{Binding MainModel.VpnIP}"  Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" />
                    <TextBlock Text="VPN名称：" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" />
                    <TextBox Text="{Binding MainModel.VpnName}" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center"  />
                    <TextBlock Text="用户名：" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" />
                    <TextBox Text="{Binding MainModel.VpnPsw}" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" />
                    <TextBlock Text="密码："   Grid.Row="3" Grid.Column="0"  VerticalAlignment="Center" />
                    <TextBox Text="{Binding MainModel.VpnPsw}"  Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" />
                </Grid>
                <Grid Grid.Row="2"  >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="300"/>
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="存储路径：" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"/>
                    <TextBox Text="{Binding MainModel.DataSavePath}" IsReadOnly="True" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
                    <Button Content="..." Command="{Binding FilePathSaveCommand}" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Left"/>
                    <TextBlock Text="日志路径："  Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" />
                    <TextBox Text="{Binding MainModel.SystemLogPath}"  IsReadOnly="True"  Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" />
                    <Button Content="..." Command="{Binding LogPathSaveCommand}"  Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Left"/>
                </Grid>
                <StackPanel Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Center" Visibility="Collapsed">
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Top">
                        <TextBlock>
                        <Run Text="监控日期："/>
                        <Run Text="{Binding MoniTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/>
                        </TextBlock>
                        <Image Name="tb_calendar_img" Source="/Images/calendar.png" Grid.Column="1" Width="18" Height="18" Margin="0,0,0,0"  PreviewMouseLeftButtonUp="tb_calendar_img_MouseLeftButtonUp"/>
                    </StackPanel>
                    <Popup x:Name="Pop" PopupAnimation="None"  Width="200" Height="210" PlacementTarget="{Binding ElementName=tb_calendar}" Placement="Bottom"  AllowsTransparency="True" StaysOpen="False" VerticalAlignment="Top" Margin="-200,0,0,0">
                        <Calendar Name="calendar" SelectedDate="{Binding MoniTime}" HorizontalAlignment="Left" Margin="0,44,0,0" VerticalAlignment="Top" />
                    </Popup>
                </StackPanel>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="3"  >
                    <Button Content="应用" Width="100" Height="30" Margin="150,0"                
                    Background="#FF0ABEFF"
                    Command="{Binding ConfirmCommand}"/>
                    <!--<Button Content="取消" Width="100" Height="30"
                   
                    Background="#DDD" Foreground="#666"
                    Command="{Binding CancelCommand}"/>-->
                </StackPanel>
            </Grid>
        </Border>


    </Grid>
</UserControl>
