代码拉取完成,页面将自动刷新
<Window x:Class="NetDriveManage.NetDriveEditWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:NetDriveManage"
mc:Ignorable="d"
Title="网络驱动器编辑" Height="350" Width="600" WindowStartupLocation="CenterOwner" WindowStyle="ToolWindow" ResizeMode="CanMinimize" Loaded="Window_Loaded">
<Grid Margin="10">
<StackPanel>
<!-- 文字提示 -->
<TextBlock Text="请为网络驱动设置别称,并填写相关信息。" FontWeight="Bold" Foreground="OrangeRed"/>
<!-- 网络驱动别称 -->
<Grid Margin="0,10,0,0" VerticalAlignment="Center">
<TextBlock Text="驱动器别称:" Margin="0,0,480,0" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<TextBox x:Name="NetDriveName" Margin="100,0,0,0" Width="440" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBox.Resources>
<VisualBrush x:Key="HintText" TileMode="None" Opacity="0.5" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBlock Text="请输入网络驱动器别称(如:办公室网络共享)" Foreground="Gray"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
</Grid>
<!-- 驱动器盘符 -->
<Grid Margin="0,10,0,0" VerticalAlignment="Center">
<TextBlock Text="驱动器盘符:" Margin="0,0,480,0" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<TextBox x:Name="NetDriveTag" Margin="100,0,0,0" Width="440" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBox.Resources>
<VisualBrush x:Key="HintText" TileMode="None" Opacity="0.5" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBlock Text="请输入驱动器盘符(如:Z:)" Foreground="Gray"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
</Grid>
<!-- 访问主机IP -->
<Grid Margin="0,30,0,0" VerticalAlignment="Center">
<TextBlock Text="访问主机IP:" Margin="0,0,480,0" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<TextBox x:Name="Host" Margin="100,0,0,0" Width="440" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBox.Resources>
<VisualBrush x:Key="HintText" TileMode="None" Opacity="0.5" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBlock Text="请输入要访问的主机IP(如:10.11.27.90)" Foreground="Gray"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
</Grid>
<!-- 访问文件夹 -->
<Grid Margin="0,10,0,0" VerticalAlignment="Center">
<TextBlock Text="访问文件夹:" Margin="0,0,480,0" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<TextBox x:Name="Folder" Margin="100,0,0,0" Width="440" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBox.Resources>
<VisualBrush x:Key="HintText" TileMode="None" Opacity="0.5" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBlock Text="请输入要访问的文件夹(如:Public)" Foreground="Gray"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
</Grid>
<!-- 账号 -->
<Grid Margin="0,10,0,0" VerticalAlignment="Center">
<TextBlock Text="授权账号:" Margin="0,0,480,0" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<TextBox x:Name="User" Margin="100,0,0,0" Width="440" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBox.Resources>
<VisualBrush x:Key="HintText" TileMode="None" Opacity="0.5" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBlock Text="请输入授权账号(如:admin)" Foreground="Gray"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
</Grid>
<!-- 密码 -->
<Grid Margin="0,10,0,0" VerticalAlignment="Center">
<TextBlock Text="授权密码:" Margin="0,0,480,0" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<TextBox x:Name="Password" Margin="100,0,0,0" Width="440" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBox.Resources>
<VisualBrush x:Key="HintText" TileMode="None" Opacity="0.5" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBlock Text="请输入授权密码(如:admin)" Foreground="Gray"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
</Grid>
</StackPanel>
<Grid Margin="0,10,0,0" VerticalAlignment="Bottom">
<Button x:Name="SaveButton" Content="保存" Margin="0,0,100,0" Width="80" Height="30" Background="Green" Foreground="White" Click="SaveButton_Click"/>
<Button x:Name="ExitButton" Content="退出" Margin="100,0,0,0" Width="80" Height="30" Background="Red" Foreground="White" Click="ExitButton_Click"/>
</Grid>
</Grid>
</Window>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。