| | |
| | | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| | | Height="700" Width="900" |
| | | Loaded="Window_Loaded" |
| | | Title="影忰æ®å
¥åº v1.5" WindowStartupLocation="CenterScreen"> |
| | | Title="æ°æ®å
¥åº v1.5" WindowStartupLocation="CenterScreen"> |
| | | <Window.Resources> |
| | | <Style x:Key="btn" TargetType="Button"> |
| | | <Setter Property="Background" Value="#005699"/> |
| | |
| | | <Setter Property="Height" Value="30"/> |
| | | <Setter Property="FontSize" Value="20"/> |
| | | </Style> |
| | | |
| | | <!--Combox--> |
| | | <Style TargetType="ToggleButton" x:Key="ComboxStyleBtn"> |
| | | <Setter Property="Template"> |
| | | <Setter.Value> |
| | | <ControlTemplate> |
| | | <!--䏿æé®å
é¨èæ¯è²--> |
| | | <Border x:Name="Back" BorderThickness="1" BorderBrush="Transparent"> |
| | | <!--䏿æé®å
è¾¹æ¡--> |
| | | <Path Name="PathFill" Fill="#136BAF" Width="10" Height="6" StrokeThickness="0" Data="M5,0 L10,10 L0,10 z" RenderTransformOrigin="0.5,0.5" Stretch="Fill"> |
| | | <Path.RenderTransform> |
| | | <TransformGroup> |
| | | <ScaleTransform/> |
| | | <SkewTransform/> |
| | | <RotateTransform Angle="180"/> |
| | | <TranslateTransform/> |
| | | </TransformGroup> |
| | | </Path.RenderTransform> |
| | | </Path> |
| | | </Border> |
| | | <ControlTemplate.Triggers> |
| | | <Trigger Property="IsMouseOver" Value="True"> |
| | | <Setter TargetName="PathFill" Property="Fill" Value="White"></Setter> |
| | | <Setter TargetName="Back" Property="Background" Value="#136BAF"></Setter> |
| | | <Setter TargetName="Back" Property="BorderBrush" Value="#136BAF"></Setter> |
| | | </Trigger> |
| | | </ControlTemplate.Triggers> |
| | | </ControlTemplate> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </Style> |
| | | <Style TargetType="ComboBox" x:Key="ComboBoxStyle"> |
| | | <Setter Property="ItemContainerStyle"> |
| | | <Setter.Value> |
| | | <!--ComBoxItem--> |
| | | <Style TargetType="ComboBoxItem"> |
| | | <Setter Property="MinHeight" Value="30"></Setter> |
| | | <Setter Property="MinWidth" Value="60"></Setter> |
| | | <Setter Property="Foreground" Value="White"></Setter> |
| | | <Setter Property="FontWeight" Value="Bold"></Setter> |
| | | <Setter Property="Template"> |
| | | <Setter.Value> |
| | | <ControlTemplate TargetType="ComboBoxItem"> |
| | | <Border Name="Back" Background="Transparent" BorderThickness="0,0,0,0" BorderBrush="#136BAF" > |
| | | <ContentPresenter ContentSource="{Binding Source}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0 0 30 0"></ContentPresenter> |
| | | </Border> |
| | | <ControlTemplate.Triggers> |
| | | <Trigger Property="IsMouseOver" Value="True"> |
| | | <Setter TargetName="Back" Property="Background" Value="LightGray"></Setter> |
| | | </Trigger> |
| | | <!--䏿æ¡èæ¯è²--> |
| | | <Trigger Property="IsHighlighted" Value="True"> |
| | | <Setter TargetName="Back" Property="Background" Value="Transparent"></Setter> |
| | | </Trigger> |
| | | </ControlTemplate.Triggers> |
| | | </ControlTemplate> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </Style> |
| | | </Setter.Value> |
| | | </Setter> |
| | | <Setter Property="Template"> |
| | | <Setter.Value> |
| | | <ControlTemplate TargetType="ComboBox"> |
| | | <Grid> |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition Width="0.7*"/> |
| | | <ColumnDefinition Width="0.3*" MaxWidth="30"/> |
| | | </Grid.ColumnDefinitions> |
| | | <!--æååºåèæ¯åè¾¹çº¿æ ·å¼--> |
| | | <TextBox Background="Transparent" HorizontalContentAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Foreground="White" BorderBrush="#136BAF" BorderThickness="0,0,0,0" IsReadOnly="{TemplateBinding IsReadOnly}" Text="{TemplateBinding Text}"></TextBox> |
| | | <Border Grid.Column="0" BorderThickness="1,1,0,1" BorderBrush="#136BAF" CornerRadius="0,0,0,0"> |
| | | </Border> |
| | | <!--å³ä¾§ä¸æbutton设置--> |
| | | <Border Grid.Column="1" BorderThickness="0,1,1,1" BorderBrush="#136BAF" CornerRadius="0,0,0,0"> |
| | | <ToggleButton BorderThickness="3" BorderBrush="#136BAF" Style="{StaticResource ComboxStyleBtn}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"></ToggleButton> |
| | | </Border> |
| | | <!--å¼¹åºpopupæ´ä½è®¾ç½®--> |
| | | <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide" > |
| | | <!--å¼¹åºpopupè¾¹æ¡--> |
| | | <Border CornerRadius="1" BorderBrush="#136BAF" BorderThickness="1,0,1,1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True"> |
| | | <Border.Effect> |
| | | <DropShadowEffect Color="Black" BlurRadius="2" ShadowDepth="0" Opacity="1"/> |
| | | </Border.Effect> |
| | | <!--䏿å¹å¸è¾¹çèæ¯è®¾ç½® MaxHeight="{TemplateBinding MaxDropDownHeight}"--> |
| | | <ScrollViewer Margin="0,0,0,0" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" BorderBrush="#136BAF" BorderThickness="2" > |
| | | <!-- StackPanel ç¨äºæ¾ç¤ºåçº§ï¼æ¹æ³æ¯å° IsItemsHost 设置为 True --> |
| | | <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" Background="#001f55" /> |
| | | </ScrollViewer> |
| | | </Border> |
| | | </Popup> |
| | | </Grid> |
| | | </ControlTemplate> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </Style> |
| | | <Style TargetType="ListBoxItem"> |
| | | <Setter Property="Height" Value="35"/> |
| | | <Setter Property="BorderThickness" Value="0"/> |
| | | </Style> |
| | | </Window.Resources> |
| | | <Grid x:Name="gMain"> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="40"/> |
| | | <RowDefinition Height="40"/> |
| | | <RowDefinition Height="40"/> |
| | | <RowDefinition Height="40"/> |
| | | <RowDefinition Height="40"/> |
| | |
| | | </Grid.RowDefinitions> |
| | | |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition Width="4*" /> |
| | | <ColumnDefinition Width="5*" /> |
| | | <ColumnDefinition Width="20*" /> |
| | | <ColumnDefinition Width="4*" /> |
| | | <ColumnDefinition Width="5*" /> |
| | | <ColumnDefinition Width="20*" /> |
| | | <ColumnDefinition Width="5*" /> |
| | | </Grid.ColumnDefinitions> |
| | | |
| | | <Label Grid.Row="0" Grid.Column="0" Content="ç¨æ·åï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="0" Grid.Column="1" Style="{StaticResource tb}" IsReadOnly="True" x:Name="tbUname"/> |
| | | <Label Grid.Row="0" Grid.Column="2" Content="令çï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="0" Grid.Column="3" Style="{StaticResource tb}" IsReadOnly="True" x:Name="tbToken"/> |
| | | <Label Grid.Row="0" Grid.Column="0" Content="ç¨æ·IDï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="0" Grid.Column="1" Style="{StaticResource tb}" IsReadOnly="True" x:Name="tbUid"/> |
| | | <Label Grid.Row="0" Grid.Column="2" Content="ç¨æ·åï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="0" Grid.Column="3" Style="{StaticResource tb}" IsReadOnly="True" x:Name="tbUname"/> |
| | | <Button Grid.Row="0" Grid.Column="4" Content="ç» å½" Style="{StaticResource btn}" Click="Login_MouseLeftButtonDown"/> |
| | | |
| | | <Label Grid.Row="1" Grid.Column="0" Content="èµæºç®å½ï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Style="{StaticResource tb}" x:Name="tbDir"/> |
| | | <Button Grid.Row="1" Grid.Column="4" Content="é æ©" Style="{StaticResource btn}" Click="Dir_MouseLeftButtonDown" x:Name="btnDir"/> |
| | | <Label Grid.Row="1" Grid.Column="0" Content="令çï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="1" Grid.Column="1" Style="{StaticResource tb}" IsReadOnly="True" x:Name="tbToken"/> |
| | | <Label Grid.Row="1" Grid.Column="2" Content="å
æ°æ®ç±»åï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <!--<TextBox Grid.Row="1" Grid.Column="3" Style="{StaticResource tb}" x:Name="tbAcqTim2e"/>--> |
| | | <!--<ComboBox Grid.Row="1" Grid.Column="3" IsReadOnly="True" DisplayMemberPath="Name" Style="{StaticResource ComboBoxStyle}" Width="320" Height="30" HorizontalAlignment="Left" x:Name="cbMetaType"></ComboBox>--> |
| | | <ComboBox Grid.Row="1" Grid.Column="3" HorizontalAlignment="Left" VerticalContentAlignment="Center" Background="White" SelectedIndex="0" Width="322" Height="38" BorderThickness="0" x:Name="cbMetaType"> |
| | | <ComboBoxItem>è¯·éæ©</ComboBoxItem> |
| | | <ComboBoxItem>æ°åæ£å°å½±åå¾</ComboBoxItem> |
| | | <ComboBoxItem>æ°åé«ç¨æ¨¡å</ComboBoxItem> |
| | | <ComboBoxItem>åæ³¢æ®µæ
æ ¼æ°æ®</ComboBoxItem> |
| | | <ComboBoxItem>å¤å
è°±æ
æ ¼æ°æ®</ComboBoxItem> |
| | | <ComboBoxItem>é«å
è°±æ
æ ¼æ°æ®</ComboBoxItem> |
| | | <ComboBoxItem>ç¢éæ°æ®</ComboBoxItem> |
| | | <ComboBoxItem>ä¸ç»´æ¨¡å</ComboBoxItem> |
| | | </ComboBox> |
| | | |
| | | <Label Grid.Row="2" Grid.Column="0" Content="æ°æ®ç®å½ï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" Style="{StaticResource tb}" x:Name="tbSource"/> |
| | | <Button Grid.Row="2" Grid.Column="4" Content="é æ©" Style="{StaticResource btn}" Click="Source_MouseLeftButtonDown" x:Name="btnSource"/> |
| | | <Label Grid.Row="2" Grid.Column="0" Content="ä¼ æå¨ç±»åï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="2" Grid.Column="1" Style="{StaticResource tb}" x:Name="tbSensorType"/> |
| | | <Label Grid.Row="2" Grid.Column="2" Content="ééæ¶é´ï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="2" Grid.Column="3" Style="{StaticResource tb}" x:Name="tbAcqTime"/> |
| | | |
| | | <Label Grid.Row="3" Grid.Column="0" Content="å
¥åºç®å½ï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3" Style="{StaticResource tb}" x:Name="tbTarget"/> |
| | | <Button Grid.Row="3" Grid.Column="4" Content="é æ©" Style="{StaticResource btn}" Click="Target_MouseLeftButtonDown" x:Name="btnTarget"/> |
| | | <Label Grid.Row="3" Grid.Column="0" Content="èµæºç®å½ï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3" Style="{StaticResource tb}" x:Name="tbDir"/> |
| | | <Button Grid.Row="3" Grid.Column="4" Content="é æ©" Style="{StaticResource btn}" Click="Dir_MouseLeftButtonDown" x:Name="btnDir"/> |
| | | |
| | | <ScrollViewer Grid.Row="4" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="4" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="2"> |
| | | <Label Grid.Row="4" Grid.Column="0" Content="æ°æ®ç®å½ï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3" Style="{StaticResource tb}" x:Name="tbSource"/> |
| | | <Button Grid.Row="4" Grid.Column="4" Content="é æ©" Style="{StaticResource btn}" Click="Source_MouseLeftButtonDown" x:Name="btnSource"/> |
| | | |
| | | <Label Grid.Row="5" Grid.Column="0" Content="å
¥åºç®å½ï¼" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="3" Style="{StaticResource tb}" x:Name="tbTarget"/> |
| | | <Button Grid.Row="5" Grid.Column="4" Content="é æ©" Style="{StaticResource btn}" Click="Target_MouseLeftButtonDown" x:Name="btnTarget"/> |
| | | |
| | | <ScrollViewer Grid.Row="6" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="4" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="5 5 0 5"> |
| | | <ListView x:Name="lvView"> |
| | | <ListView.View> |
| | | <GridView> |
| | |
| | | </ListView> |
| | | </ScrollViewer> |
| | | |
| | | <Button x:Name="btnLoad" Grid.Row="4" Grid.Column="4" Content="å è½½" Style="{StaticResource btn}" Click="Load_MouseLeftButtonDown"/> |
| | | <Button x:Name="btnImport" Grid.Row="5" Grid.Column="4" Content="导 å
¥" Style="{StaticResource btn}" VerticalAlignment="Top" Click="Import_MouseLeftButtonDown"/> |
| | | <Button x:Name="btnLoad" Grid.Row="6" Grid.Column="4" Content="å è½½" Style="{StaticResource btn}" Click="Load_MouseLeftButtonDown"/> |
| | | <Button x:Name="btnImport" Grid.Row="7" Grid.Column="4" Content="导 å
¥" Style="{StaticResource btn}" VerticalAlignment="Top" Click="Import_MouseLeftButtonDown"/> |
| | | </Grid> |
| | | </Window> |