|
|
|
@ -6,8 +6,76 @@ |
|
|
|
|
xmlns:local="clr-namespace:UserManagerTool" |
|
|
|
|
mc:Ignorable="d" WindowStartupLocation="CenterScreen" |
|
|
|
|
ResizeMode="NoResize" |
|
|
|
|
Icon="./instal.ico" |
|
|
|
|
Title="Spark 1.0 Install Tools" Height="550" Width="500"> |
|
|
|
|
Icon="./instal.ico" Loaded="InstallWindow_OnLoaded" |
|
|
|
|
Title="Spark 1.0 Install Tools" Height="450" Width="500"> |
|
|
|
|
<Window.Resources> |
|
|
|
|
<LinearGradientBrush x:Key="PrimaryBlueColor" StartPoint="0,0" EndPoint="0,1"> |
|
|
|
|
<GradientStop Color="#40b1ff" Offset="0"/> |
|
|
|
|
<GradientStop Color="#3c9ce6" Offset="1"/> |
|
|
|
|
</LinearGradientBrush> |
|
|
|
|
<LinearGradientBrush x:Key="PrimaryBlueColorHover" StartPoint="0,0" EndPoint="0,1"> |
|
|
|
|
<GradientStop Color="#40b1ff" Offset="0"/> |
|
|
|
|
<GradientStop Color="#1c8ccc" Offset="1"/> |
|
|
|
|
</LinearGradientBrush> |
|
|
|
|
|
|
|
|
|
<Style x:Key="InstallButton" TargetType="Button"> |
|
|
|
|
<Setter Property="Cursor" Value="Hand"/> |
|
|
|
|
<Setter Property="Template"> |
|
|
|
|
<Setter.Value> |
|
|
|
|
<ControlTemplate TargetType="Button"> |
|
|
|
|
<Border x:Name="Border" |
|
|
|
|
Background="{StaticResource PrimaryBlueColor}" |
|
|
|
|
CornerRadius="5"> |
|
|
|
|
<Label Content="{TemplateBinding Content}" |
|
|
|
|
Foreground="Azure" |
|
|
|
|
FontSize="16" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
HorizontalAlignment="Center"/> |
|
|
|
|
</Border> |
|
|
|
|
<ControlTemplate.Triggers> |
|
|
|
|
<Trigger Property="IsMouseOver" Value="True"> |
|
|
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource PrimaryBlueColorHover}"/> |
|
|
|
|
</Trigger> |
|
|
|
|
</ControlTemplate.Triggers> |
|
|
|
|
</ControlTemplate> |
|
|
|
|
</Setter.Value> |
|
|
|
|
</Setter> |
|
|
|
|
</Style> |
|
|
|
|
<Style x:Key="PrimaryButton" TargetType="Button"> |
|
|
|
|
<Setter Property="Cursor" Value="Hand"/> |
|
|
|
|
<Setter Property="Template"> |
|
|
|
|
<Setter.Value> |
|
|
|
|
<ControlTemplate TargetType="Button"> |
|
|
|
|
<Border x:Name="Border" |
|
|
|
|
Background="{StaticResource PrimaryBlueColor}" |
|
|
|
|
CornerRadius="0 5 5 0"> |
|
|
|
|
<Label Content="{TemplateBinding Content}" |
|
|
|
|
Foreground="Azure" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
HorizontalAlignment="Center"/> |
|
|
|
|
</Border> |
|
|
|
|
<ControlTemplate.Triggers> |
|
|
|
|
<Trigger Property="IsMouseOver" Value="True"> |
|
|
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource PrimaryBlueColorHover}"/> |
|
|
|
|
</Trigger> |
|
|
|
|
</ControlTemplate.Triggers> |
|
|
|
|
</ControlTemplate> |
|
|
|
|
</Setter.Value> |
|
|
|
|
</Setter> |
|
|
|
|
</Style> |
|
|
|
|
<Style x:Key="TextBox" TargetType="TextBox"> |
|
|
|
|
<Setter Property="BorderThickness" Value="0" /> |
|
|
|
|
<Setter Property="BorderBrush" Value="Transparent" /> |
|
|
|
|
<Setter Property="Margin" Value="1" /> |
|
|
|
|
<Setter Property="TextAlignment" Value="Left" /> |
|
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|
|
|
|
</Style> |
|
|
|
|
<Style x:Key="TextBlockTitle" TargetType="TextBlock"> |
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center" /> |
|
|
|
|
<Setter Property="Width" Value="80" /> |
|
|
|
|
<Setter Property="FontSize" Value="14" /> |
|
|
|
|
</Style> |
|
|
|
|
</Window.Resources> |
|
|
|
|
<Grid> |
|
|
|
|
|
|
|
|
|
<Grid.RowDefinitions> |
|
|
|
@ -17,14 +85,29 @@ |
|
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
|
<RowDefinition Height="*" /> |
|
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
|
</Grid.RowDefinitions> |
|
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="0" Text="Spark 1.0 安装部署工具" FontSize="20" |
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 20 0 0" |
|
|
|
|
/> |
|
|
|
|
<Grid Grid.Column="0" Grid.Row="0" Margin="0 20 0 0"> |
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
|
<ColumnDefinition Width="*"/> |
|
|
|
|
<ColumnDefinition Width="Auto"/> |
|
|
|
|
<ColumnDefinition Width="Auto"/> |
|
|
|
|
<ColumnDefinition Width="*"/> |
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
<Image Grid.Column="1" Source="Images/install.png" Width="50"></Image> |
|
|
|
|
<TextBlock Grid.Column="2" Text="Spark 1.0 安装部署工具" FontSize="25" |
|
|
|
|
Foreground="{StaticResource PrimaryBlueColor}" |
|
|
|
|
FontWeight="Bold" |
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center" |
|
|
|
|
/> |
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 部署路径 --> |
|
|
|
|
<Grid Grid.Row="2" Grid.Column="0" Margin="20 10 20 0" Height="30"> |
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
@ -32,9 +115,15 @@ |
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
<TextBlock Grid.Column="0" Text="部 署 路 径:" VerticalAlignment="Center" Width="80"/> |
|
|
|
|
<TextBox Grid.Column="1" Text="" x:Name="InstallPath" TextAlignment="Left" VerticalContentAlignment="Center"/> |
|
|
|
|
<Button Grid.Column="2" Content="浏览" Width="40" x:Name="BrowseInstallPath" Click="ButtonBase_OnClick"/> |
|
|
|
|
<TextBlock Grid.Column="0" Text="部 署 路 径:" Style="{StaticResource TextBlockTitle}"/> |
|
|
|
|
|
|
|
|
|
<Border Grid.Column="1" BorderBrush="#40b1ff" |
|
|
|
|
BorderThickness="1" |
|
|
|
|
CornerRadius="5 0 0 5"> |
|
|
|
|
<TextBox Style="{StaticResource TextBox}" Text="D:\SparkClient" x:Name="InstallPath" /> |
|
|
|
|
</Border> |
|
|
|
|
|
|
|
|
|
<Button Grid.Column="2" Style="{StaticResource PrimaryButton}" Content="浏览" Width="40" x:Name="BrowseInstallPath" Click="ButtonBase_OnClick"/> |
|
|
|
|
</Grid> |
|
|
|
|
<!-- 登录用户 --> |
|
|
|
|
<Grid Grid.Row="3" Grid.Column="0" Margin="20 10 20 0" Height="30"> |
|
|
|
@ -43,8 +132,12 @@ |
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
<TextBlock Grid.Column="0" Text="登录用户名:" VerticalAlignment="Center" Width="80"/> |
|
|
|
|
<TextBox Grid.Column="1" Text="" x:Name="DefaultUserName" TextAlignment="Left" VerticalContentAlignment="Center"/> |
|
|
|
|
<TextBlock Grid.Column="0" Text="登录用户名:" Style="{StaticResource TextBlockTitle}"/> |
|
|
|
|
<Border Grid.Column="1" BorderBrush="#40b1ff" |
|
|
|
|
BorderThickness="1" |
|
|
|
|
CornerRadius="5"> |
|
|
|
|
<TextBox Style="{StaticResource TextBox}" Text="" x:Name="DefaultUserName" /> |
|
|
|
|
</Border> |
|
|
|
|
</Grid> |
|
|
|
|
<!-- 登陆密码 --> |
|
|
|
|
<Grid Grid.Row="4" Grid.Column="0" Margin="20 10 20 0" Height="30"> |
|
|
|
@ -53,8 +146,13 @@ |
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
<TextBlock Grid.Column="0" Text="登 录 密 码:" VerticalAlignment="Center" Width="80"/> |
|
|
|
|
<TextBox Grid.Column="1" Text="" x:Name="DefaultPassword" TextAlignment="Left" VerticalContentAlignment="Center"/> |
|
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Text="登 录 密 码:" Style="{StaticResource TextBlockTitle}"/> |
|
|
|
|
<Border Grid.Column="1" BorderBrush="#40b1ff" |
|
|
|
|
BorderThickness="1" |
|
|
|
|
CornerRadius="5"> |
|
|
|
|
<TextBox Style="{StaticResource TextBox}" Text="" x:Name="DefaultPassword" /> |
|
|
|
|
</Border> |
|
|
|
|
</Grid> |
|
|
|
|
<!-- 设备号 --> |
|
|
|
|
<Grid Grid.Row="5" Grid.Column="0" Margin="20 10 20 0" Height="30"> |
|
|
|
@ -63,28 +161,52 @@ |
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
<TextBlock Grid.Column="0" Text="设 备 号 码:" VerticalAlignment="Center" Width="80"/> |
|
|
|
|
<TextBox Grid.Column="1" Text="" x:Name="DeviceCode" TextAlignment="Left" VerticalContentAlignment="Center"/> |
|
|
|
|
<TextBlock Grid.Column="0" Text="设 备 号 码:" Style="{StaticResource TextBlockTitle}"/> |
|
|
|
|
<Border Grid.Column="1" BorderBrush="#40b1ff" |
|
|
|
|
BorderThickness="1" |
|
|
|
|
CornerRadius="5"> |
|
|
|
|
<TextBox Style="{StaticResource TextBox}" Text="" x:Name="DeviceCode" /> |
|
|
|
|
</Border> |
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="7" Grid.Column="0" Margin="20 10 20 0" Height="20"> |
|
|
|
|
<!-- <Grid.ColumnDefinitions> --> |
|
|
|
|
<!-- <ColumnDefinition Width="Auto" /> --> |
|
|
|
|
<!-- <ColumnDefinition Width="*" /> --> |
|
|
|
|
<!-- <ColumnDefinition Width="*" /> --> |
|
|
|
|
<!-- <ColumnDefinition Width="Auto" /> --> |
|
|
|
|
<!-- </Grid.ColumnDefinitions> --> |
|
|
|
|
<!-- <Button Grid.Column="1" Content="资源完整性检测" x:Name="InstallCheck" Click="ButtonBase_OnClick"/> --> |
|
|
|
|
<!-- <Button Grid.Column="2" Content="运行环境检测" x:Name="ll1" Click="ButtonBase_OnClick"/> --> |
|
|
|
|
<CheckBox Content="部署完成后,在桌面创建快捷方式。" IsChecked="True"></CheckBox> |
|
|
|
|
<Grid Grid.Row="6" Grid.Column="0" Margin="20 10 20 0" Height="30"> |
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
<TextBlock Grid.Column="0" Text="切工仪URL:" Style="{StaticResource TextBlockTitle}"/> |
|
|
|
|
|
|
|
|
|
<Border Grid.Column="1" BorderBrush="#40b1ff" |
|
|
|
|
BorderThickness="1" |
|
|
|
|
CornerRadius="5 0 0 5"> |
|
|
|
|
<TextBox Style="{StaticResource TextBox}" Text="http://127.0.0.1/cut" x:Name="CutUrl" /> |
|
|
|
|
</Border> |
|
|
|
|
<Button Grid.Column="2" Style="{StaticResource PrimaryButton}" Content="Ping" Width="40" x:Name="TestCutUrl" Click="ButtonBase_OnClick"/> |
|
|
|
|
</Grid> |
|
|
|
|
<Grid Grid.Row="8" Grid.Column="0" Margin="20 10 20 20" Height="30"> |
|
|
|
|
<!-- <Grid Grid.Row="7" Grid.Column="0" Margin="20 10 20 0" Height="30"> --> |
|
|
|
|
<!-- <Grid.ColumnDefinitions> --> |
|
|
|
|
<!-- <ColumnDefinition Width="Auto" /> --> |
|
|
|
|
<!-- <ColumnDefinition Width="*" /> --> |
|
|
|
|
<!-- <ColumnDefinition Width="Auto" /> --> |
|
|
|
|
<!-- </Grid.ColumnDefinitions> --> |
|
|
|
|
<!-- <TextBlock Grid.Column="0" Text="工 作 空 间:" Style="{StaticResource TextBlockTitle}"/> --> |
|
|
|
|
<!-- <TextBox Grid.Column="1" Text="" x:Name="WorkSpace" TextAlignment="Left" VerticalContentAlignment="Center"/> --> |
|
|
|
|
<!-- <Button Grid.Column="2" Content="浏览" Width="40" x:Name="BrowseWorkSpace" Click="ButtonBase_OnClick"/> --> |
|
|
|
|
<!-- </Grid> --> |
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="9" Grid.Column="0" Margin="20 10 20 20" Height="60"> |
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
<Button Grid.Column="1" Content="一键部署" x:Name="Install" Click="ButtonBase_OnClick"/> |
|
|
|
|
<Grid.RowDefinitions> |
|
|
|
|
<RowDefinition Height="*"/> |
|
|
|
|
<RowDefinition Height="*"/> |
|
|
|
|
</Grid.RowDefinitions> |
|
|
|
|
<Button Grid.Row="0" Grid.Column="1" Style="{StaticResource InstallButton}" Content="开始部署" x:Name="Install" Click="ButtonBase_OnClick"/> |
|
|
|
|
<CheckBox Grid.Row="1" Grid.Column="1" Content="部署成功后,在桌面创建快捷方式。" Height="20" IsChecked="True" Margin="0 5 0 0" x:Name="CheckBox"/> |
|
|
|
|
</Grid> |
|
|
|
|
</Grid> |
|
|
|
|
</Window> |
|
|
|
|