1 Star 1 Fork 1

卖萌小老头/网络驱动器连接管理

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
NetDriveEditWindow.xaml 10.23 KB
一键复制 编辑 原始数据 按行查看 历史
卖萌小老头 提交于 2022-09-23 04:37 . 忽略.vs
<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>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/liulei901112/NetDriveManage.git
git@gitee.com:liulei901112/NetDriveManage.git
liulei901112
NetDriveManage
网络驱动器连接管理
master

搜索帮助