|
- <Window
- x:Class="BPASmart.VariableManager.Views.NewDeviceView"
- 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:local="clr-namespace:BPASmart.VariableManager.Views"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmart.VariableManager.ViewModels"
- Title="NewDeviceView"
- Width="400"
- Height="275"
- AllowsTransparency="True"
- Background="{x:Null}"
- Opacity="0.8"
- Topmost="false"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d">
-
- <Window.DataContext>
- <vm:NewDeviceViewModel />
- </Window.DataContext>
-
- <Window.Resources>
- <!--<ResourceDictionary Source="../Resource/Style/BasicStyle.xaml">
- <ResourceDictionary.MergedDictionaries>-->
- <ResourceDictionary>
- <Style x:Key="buttonStyle" TargetType="Button">
- <Setter Property="FontFamily" Value="楷体" />
- <Setter Property="Width" Value="100" />
- <Setter Property="FontSize" Value="18" />
- <Setter Property="Foreground" Value="Aqua" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Grid x:Name="gr">
- <ContentControl
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}"
- Foreground="{TemplateBinding Foreground}" />
- <Polygon
- x:Name="poly"
- Points="0 0,80 0,100 30,20 30"
- Stroke="#FF34F7F7"
- StrokeThickness="2" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="poly" Property="Fill" Value="#2234F7F7" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
- <!--</ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>-->
- </Window.Resources>
-
- <Grid Background="#103153">
- <Grid.RowDefinitions>
- <RowDefinition Height="35" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <!--#region 标题栏设置-->
- <Border
- x:Name="MoveBorder"
- Height="35"
- VerticalAlignment="Top"
- Background="#0C2349"
- BorderBrush="#55ffffff"
- BorderThickness="0,0,0,1">
- <StackPanel Orientation="Horizontal">
- <!--<Image Margin="15,5,0,5" Source="../Resource/Images/HBL.png" />-->
- <TextBlock
- Name="tbTitle"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="18"
- Foreground="White"
- Text="设备管理" />
- </StackPanel>
- </Border>
-
- <UniformGrid
- Width="150"
- Height="30"
- HorizontalAlignment="Right"
- Columns="3">
- <Button
- Name="ButMin"
- Content=""
- Style="{StaticResource TitleBarStyle}"
- Visibility="Hidden" />
- <Button
- Name="ButMax"
- Content=""
- Style="{StaticResource TitleBarStyle}"
- Visibility="Hidden" />
- <Button
- Name="ButClose"
- Content=""
- FontSize="30"
- Style="{StaticResource TitleBarStyle}" />
- </UniformGrid>
- <!--#endregion-->
-
- <!--#region 内容显示区-->
- <Grid Grid.Row="1" Margin="20">
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontFamily="楷体"
- FontSize="20"
- Foreground="#FF34F7F7"
- Text="请选择设备类型:" />
- <ComboBox
- Grid.Column="1"
- VerticalAlignment="Center"
- BorderBrush="#FF23CACA"
- BorderThickness="1"
- FontFamily="楷体"
- FontSize="20"
- Foreground="#ff23caca"
- IsEditable="False"
- ItemsSource="{Binding DeviceType}"
- SelectedIndex="0"
- Style="{StaticResource ComboBoxStyle}"
- Text="{Binding devcieManagerResult.DeviceType}" />
-
- <TextBlock
- Grid.Row="1"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontFamily="楷体"
- FontSize="20"
- Foreground="#FF34F7F7"
- Text="请输入设备名称:" />
- <TextBox
- Grid.Row="1"
- Grid.Column="1"
- Margin="0,10"
- VerticalAlignment="Center"
- Background="Transparent"
- BorderBrush="#FF23CACA"
- CaretBrush="Aqua"
- FontFamily="楷体"
- FontSize="21"
- Foreground="#ff34f7f7"
- Text="{Binding devcieManagerResult.DeviceName}" />
-
- <TextBlock
- Grid.Row="2"
- Grid.ColumnSpan="2"
- Margin="20,0,0,0"
- VerticalAlignment="Center"
- FontFamily="楷体"
- FontSize="16"
- Foreground="#FFE2415C"
- Text="{Binding LogInfo}"
- TextWrapping="Wrap" />
-
- <Button
- Grid.Row="3"
- Margin="20,10"
- Command="{Binding CancelCommand}"
- Content="取消"
- Style="{StaticResource buttonStyle}" />
- <Button
- Grid.Row="3"
- Grid.Column="1"
- Margin="20,10"
- Command="{Binding ConfirmCommand}"
- Content="确认"
- Style="{StaticResource buttonStyle}" />
-
- </Grid>
- <!--#endregion-->
-
- </Grid>
- </Window>
|