You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

175 lines
14 KiB

<Window x:Class="Container.ChildWindows.ServiceInfo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
xmlns:winForms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:gifLib="clr-namespace:GifImageLib;assembly=GifImageLib"
Title="设备信息" Height="600" Topmost="True" Width="400" Loaded="Services_Loaded" Closed="Services_Closed" WindowStyle="None" AllowsTransparency="True">
<Canvas x:Name="Mainp">
<Canvas x:Name="Loading" Height="600" Width="400" Visibility="Visible">
<Canvas.Background>
<ImageBrush ImageSource="../image/connection.jpg"/>
</Canvas.Background>
<gifLib:GifImage Source="../image/Loading.gif" Width="120" Height="120" Canvas.Left="140" Canvas.Top="125"/>
<TextBlock x:Name="Time" FontSize="12" Width="400" HorizontalAlignment="Center" TextAlignment="Center" Visibility="Visible" Text="倒计时60s" Foreground="#FF777777" Canvas.Left="0" Canvas.Top="374"/>
</Canvas>
<Canvas x:Name="ConnectFailed" Height="600" Width="400" Visibility="Hidden">
<Canvas.Background>
<ImageBrush ImageSource="../image/connectfailed.jpg"/>
</Canvas.Background>
<Label x:Name="ErrorInfo" Visibility="Hidden" Content="(未查询到楼栋信息)" Foreground="DarkGray" Canvas.Left="135" Canvas.Top="321"/>
<Button Canvas.Left="154" Canvas.Top="351" Width="91" Height="27" Click="Btn_ReConnection">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Canvas Name="cvs" Background="Transparent" Canvas.Top="351" Width="91" Height="27">
<TextBlock Name="tbSale" FontWeight="Bold" Foreground="Transparent" Width="91" Canvas.Top="7" FontFamily="HYQiHei" Height="27" FontSize="15" TextAlignment="Center" Text="重试"></TextBlock>
</Canvas>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#b6b6b6" TargetName="cvs" />
<Setter Property="Foreground" Value="White" TargetName="tbSale" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
</Button>
</Canvas>
<Canvas x:Name="UpdateFailed" Height="600" Width="400" Visibility="Hidden">
<Canvas.Background>
<ImageBrush ImageSource="../image/failed.jpg"/>
</Canvas.Background>
<!--<Label x:Name="UpdateErrorInfo" Visibility="Visible" Content="" Foreground="DarkGray" Canvas.Left="135" Canvas.Top="321"/>-->
<StackPanel Canvas.Left="0" Canvas.Top="240" Width="400" Height="48">
<TextBlock x:Name="UpdateErrorInfo" Foreground="DarkGray" FontSize="15" FontFamily="HYQiHei" Text="" TextWrapping = "Wrap" TextAlignment="Center" Height="47"/>
</StackPanel>
<Button Canvas.Left="154" Canvas.Top="351" Width="91" Height="27" Click="Btn_ReUpdate">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Canvas Name="cvs" Background="Transparent" Canvas.Top="351" Width="91" Height="27">
<TextBlock Name="tbSale" FontWeight="Bold" Foreground="Transparent" Width="91" Canvas.Top="7" FontFamily="HYQiHei" Height="27" FontSize="15" TextAlignment="Center" Text="重试"></TextBlock>
</Canvas>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#b6b6b6" TargetName="cvs" />
<Setter Property="Foreground" Value="White" TargetName="tbSale" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
</Button>
</Canvas>
<Canvas x:Name="UpdateSuccess" Visibility="Hidden" Height="600" Width="400" >
<Canvas.Background>
<ImageBrush ImageSource="../image/success.jpg"/>
</Canvas.Background>
</Canvas>
<Canvas x:Name="deviceinfo" Visibility="Visible" Height="600" Width="400" >
<Canvas.Background>
<ImageBrush ImageSource="../image/background.jpg"/>
</Canvas.Background>
<Label x:Name="Label_Info" FontWeight="Bold" FontSize="12" FontFamily="HYQiHei" Foreground="#A0A0A0" Content="请输入设备信息" Canvas.Top="138" Canvas.Left="237"/>
<Label x:Name="Label_Building" FontWeight="Bold" FontSize="12" FontFamily="HYQiHei" Foreground="#808080" Content="当前楼栋" Canvas.Top="180" Canvas.Left="65"/>
<ComboBox x:Name="ComBox_Building" IsEditable="True" FontSize="18" Foreground="#FFA5A5A5" SelectionChanged="Combox_Building_changed" HorizontalAlignment="Left" Focusable="False" MouseLeftButtonDown="Combox_LeftButtonDown" IsReadOnly="True" VerticalAlignment="Center" VerticalContentAlignment="Center" Width="199" Height="39" Canvas.Left="127" Canvas.Top="172" BorderThickness="0" Background="{x:Null}"/>
<Label x:Name="Label_Floor" FontWeight="Bold" FontSize="12" FontFamily="HYQiHei" Foreground="#808080" Content="当前楼层" Canvas.Top="240" Canvas.Left="64"/>
<ComboBox x:Name="ComBox_Floor" IsEditable="True" FontSize="18" Foreground="#FFA5A5A5" Background="{x:Null}" HorizontalAlignment="Left" IsReadOnly="True" Focusable="False" MouseLeftButtonDown="Combox_LeftButtonDown" VerticalAlignment="Center" VerticalContentAlignment="Center" Width="199" Height="39" Canvas.Top="231" Canvas.Left="127" BorderThickness="0"/>
<Label x:Name="Label_Device" FontWeight="Bold" FontSize="12" FontFamily="HYQiHei" Foreground="#808080" Content="设备标识" Canvas.Top="294" Canvas.Left="65"/>
<TextBox x:Name="Text_Device" FontSize="18" Foreground="#FFA5A5A5" HorizontalAlignment="Left" VerticalAlignment="Center" VerticalContentAlignment="Center" Width="199" Height="39" Canvas.Top="287" Canvas.Left="127" BorderThickness="0">
<TextBox.Resources>
<VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="1" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBox Width="237" Height="39" Foreground="#C0C0C0" BorderThickness="0" Background="White" FontSize="10" VerticalContentAlignment="Center" VerticalAlignment="Center" Text="可选" />
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HelpBrush}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HelpBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<Label x:Name="Label_Type" FontWeight="Bold" FontSize="12" FontFamily="HYQiHei" Foreground="#808080" Content="设备类型" Canvas.Top="350" Canvas.Left="64"/>
<ComboBox x:Name="ComBox_Type" IsEditable="True" FontSize="18" Foreground="#FFA5A5A5" Background="{x:Null}" HorizontalAlignment="Left" IsReadOnly="True" Focusable="False" MouseLeftButtonDown="Combox_LeftButtonDown" VerticalAlignment="Center" VerticalContentAlignment="Center" Width="199" Height="39" Canvas.Top="341" Canvas.Left="127" BorderThickness="0"/>
<Label x:Name="Label_File" FontWeight="Bold" FontSize="12" FontFamily="HYQiHei" Foreground="#808080" Content="文件存储" Canvas.Top="410" Canvas.Left="65"/>
<ComboBox x:Name="ComBox_File" IsEditable="True" FontSize="18" Foreground="#FFA5A5A5" SelectionChanged="Combox_File_changed" HorizontalAlignment="Left" Focusable="False" MouseLeftButtonDown="Combox_LeftButtonDown" IsReadOnly="True" VerticalAlignment="Center" VerticalContentAlignment="Center" Width="199" Height="39" Canvas.Left="127" Canvas.Top="400" BorderThickness="0" Background="{x:Null}"/>
<Label x:Name="Label_FilePath" Visibility="Hidden" FontWeight="Bold" FontSize="12" FontFamily="HYQiHei" Foreground="#808080" Content="文件地址" Canvas.Top="470" Canvas.Left="65"/>
<TextBox x:Name="Text_FilePath" Visibility="Hidden" FontSize="18" Foreground="#FFA5A5A5" HorizontalAlignment="Left" VerticalAlignment="Center" VerticalContentAlignment="Center" Width="199" Height="39" Canvas.Top="459" Canvas.Left="127" BorderThickness="0">
<TextBox.Resources>
<VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="1" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBox Width="237" Height="39" Foreground="#C0C0C0" BorderThickness="0" Background="White" FontSize="10" VerticalContentAlignment="Center" VerticalAlignment="Center" Text="可选" />
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HelpBrush}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HelpBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<Button Canvas.Left="154" Canvas.Top="520" Width="91" Height="27" Click="Button_Click">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Canvas Name="cvs" Background="Transparent" Canvas.Top="351" Width="91" Height="27">
<Image Name="Img" Source="../image/Btn_OK.jpg" Height="27" Width="91"/>
<TextBlock Name="tbSale" FontWeight="Bold" Foreground="Transparent" Width="91" Canvas.Top="7" FontFamily="HYQiHei" Height="27" FontSize="15" TextAlignment="Center" Text="完成"></TextBlock>
</Canvas>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#b6b6b6" TargetName="cvs" />
<Setter Property="Foreground" Value="White" TargetName="tbSale" />
<Setter Property="Visibility" Value="Hidden" TargetName="Img" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
</Button>
<!--<Button x:Name="Btn_Next" Content="下一步" Canvas.Left="248" Canvas.Top="250" Width="75" Click="Button_Click"/>-->
<!--<Label x:Name="Label_Building" Content="请选择楼栋信息" Canvas.Left="10" Canvas.Top="63"/>-->
<!--<Button x:Name="reclient" Visibility="Hidden" Content="重试" Canvas.Left="29" Canvas.Top="250" Width="75" Click="reclient_Click"/>-->
<!--<Button x:Name="Btn_back" Content="上一步" Visibility="Hidden" Canvas.Left="168" Canvas.Top="250" Width="75" Click="ButtonBack_Click"/>-->
<Label x:Name="lab_msg" HorizontalAlignment="Center" HorizontalContentAlignment="Center" Foreground="Red" Content="Label" Visibility="Hidden" Canvas.Top="326" Width="400" Height="27"/>
</Canvas>
</Canvas>
</Window>