| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377 |
- <windows:WindowBase x:Class="Muchinfo.MTPClient.UI.Views.CommunicationSetView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:dataGrid="clr-namespace:Muchinfo.WPF.Controls.DataGrid;assembly=Muchinfo.WPF.Controls"
- xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Muchinfo.MTPClient.Resources"
- xmlns:windows="clr-namespace:Muchinfo.WPF.Controls.Windows;assembly=Muchinfo.WPF.Controls"
- x:Name="view"
- Title="{x:Static resource:Muchinfo_Resource.CommunicationSet_Title}"
- Width="434"
- Height="358"
- BorderThickness="6,0,6,6"
- ClosedCommand="{Binding ClosedCommand}"
- CornerRadius="0"
- Style="{DynamicResource WindowBaseStyle}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <TabControl Grid.Row="0"
- Margin="20,10"
- Style="{DynamicResource TabControlStyle1}">
- <TabItem Header="{x:Static resource:Muchinfo_Resource.Content_LoginSet}" Style="{DynamicResource TabItemStyle1}">
- <Grid>
- <dataGrid:MuchinfoDataGrid x:Name="grid"
- EnableRowVirtualization="False"
- ItemsSource="{Binding ServerCollection}"
- MouseDoubleClick="grid_MouseDoubleClick"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- SelectionUnit="FullRow"
- Style="{DynamicResource LinkDataGridStyle}">
- <DataGrid.ColumnHeaderStyle>
- <Style TargetType="DataGridColumnHeader">
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Height" Value="22" />
- <Setter Property="Background" Value="{DynamicResource MuchinfoBrush63}" />
- </Style>
- </DataGrid.ColumnHeaderStyle>
- <DataGrid.CellStyle>
- <Style TargetType="DataGridCell">
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Style.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Foreground" Value="{DynamicResource MuchinfoBrush3}" />
- <Setter Property="BorderThickness" Value="0" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.CellStyle>
- <DataGrid.RowStyle>
- <Style TargetType="DataGridRow">
- <Setter Property="Height" Value="22" />
- <Style.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Foreground" Value="{DynamicResource MuchinfoBrush3}" />
- <Setter Property="BorderThickness" Value="0" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.RowStyle>
- <DataGrid.Columns>
- <DataGridTemplateColumn Width="8"
- Header=""
- IsReadOnly="False">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Grid>
- <RadioButton VerticalContentAlignment="Center"
- GroupName="temp"
- IsChecked="{Binding IsChecked,
- UpdateSourceTrigger=PropertyChanged}">
- <RadioButton.Style>
- <Style TargetType="RadioButton">
- <Setter Property="Background" Value="{DynamicResource MuchinfoBrush66}" />
- <Setter Property="BorderBrush" Value="{DynamicResource MuchinfoBrush22}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Grid Width="8" Height="8">
- <Border x:Name="Border"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}" />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsChecked" Value="True">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Path Data="M1.5,5.7816667 C2.125,6.1566667 5.75,10.906333 5.75,10.906333 L12.5,0.78165909"
- SnapsToDevicePixels="False"
- Stroke="{DynamicResource MuchinfoBrush1}"
- StrokeThickness="2"
- Visibility="Visible" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Trigger>
- </Style.Triggers>
- </Style>
- </RadioButton.Style>
- </RadioButton>
- </Grid>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Width="*"
- Binding="{Binding Path=ServerName}"
- Header="{x:Static resource:Muchinfo_Resource.Content_ServerName}" />
- <DataGridTextColumn Width="108"
- Binding="{Binding Path=ServerIP}"
- Header="{x:Static resource:Muchinfo_Resource.Content_Ip}"
- Visibility="Collapsed" />
- <DataGridTextColumn Width="68"
- Binding="{Binding Path=ServerPort}"
- Header="{x:Static resource:Muchinfo_Resource.Content_Port}"
- Visibility="Collapsed" />
- <DataGridTextColumn Width="68"
- Binding="{Binding Path=Rate}"
- Header="{x:Static resource:Muchinfo_Resource.Content_Rate}"
- Visibility="Collapsed" />
- <DataGridTemplateColumn Width="*"
- Header="{x:Static resource:Muchinfo_Resource.Content_TimeDelay}"
- IsReadOnly="False">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Button Background="Blue"
- Command="{Binding Path=DataContext.TestSpeedCommand,
- RelativeSource={RelativeSource Mode=FindAncestor,
- AncestorType={x:Type Window}}}"
- CommandParameter="{Binding }"
- Cursor="Hand"
- ToolTip="{x:Static resource:Muchinfo_Resource.Button_Speed}">
- <Button.Template>
- <ControlTemplate>
- <TextBlock Text="{Binding Path=RequestTimeText}" TextDecorations="Underline" />
- </ControlTemplate>
- </Button.Template>
- </Button>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </dataGrid:MuchinfoDataGrid>
- </Grid>
- </TabItem>
- <TabItem Header="{x:Static resource:Muchinfo_Resource.Content_ServerSet}" Style="{DynamicResource TabItemStyle1}">
- <Grid>
- <dataGrid:MuchinfoDataGrid x:Name="gridRealTime"
- EnableRowVirtualization="False"
- ItemsSource="{Binding RealQuoteServers}"
- MouseDoubleClick="grid_MouseDoubleClick"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- SelectionUnit="FullRow"
- Style="{DynamicResource LinkDataGridStyle}">
- <DataGrid.ColumnHeaderStyle>
- <Style TargetType="DataGridColumnHeader">
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Height" Value="22" />
- <Setter Property="Background" Value="{DynamicResource MuchinfoBrush63}" />
- </Style>
- </DataGrid.ColumnHeaderStyle>
- <DataGrid.CellStyle>
- <Style TargetType="DataGridCell">
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Style.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Foreground" Value="{DynamicResource MuchinfoBrush3}" />
- <Setter Property="BorderThickness" Value="0" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.CellStyle>
- <DataGrid.RowStyle>
- <Style TargetType="DataGridRow">
- <Setter Property="Height" Value="22" />
- <Style.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Foreground" Value="{DynamicResource MuchinfoBrush3}" />
- <Setter Property="BorderThickness" Value="0" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.RowStyle>
- <DataGrid.Columns>
- <DataGridTemplateColumn Width="8"
- Header=""
- IsReadOnly="False">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Grid>
- <RadioButton VerticalContentAlignment="Center"
- GroupName="temp1"
- IsChecked="{Binding IsChecked,
- UpdateSourceTrigger=PropertyChanged}">
- <RadioButton.Style>
- <Style TargetType="RadioButton">
- <Setter Property="Background" Value="{DynamicResource MuchinfoBrush66}" />
- <Setter Property="BorderBrush" Value="{DynamicResource MuchinfoBrush22}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Grid Width="8" Height="8">
- <Border x:Name="Border"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}" />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsChecked" Value="True">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Path Data="M1.5,5.7816667 C2.125,6.1566667 5.75,10.906333 5.75,10.906333 L12.5,0.78165909"
- SnapsToDevicePixels="False"
- Stroke="{DynamicResource MuchinfoBrush1}"
- StrokeThickness="2"
- Visibility="Visible" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Trigger>
- </Style.Triggers>
- </Style>
- </RadioButton.Style>
- </RadioButton>
- </Grid>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Width="*"
- Binding="{Binding Path=ServerName}"
- Header="{x:Static resource:Muchinfo_Resource.Content_ServerName}" />
- <DataGridTextColumn Width="108"
- Binding="{Binding Path=ServerIP}"
- Header="{x:Static resource:Muchinfo_Resource.Content_Ip}"
- Visibility="Collapsed" />
- <DataGridTextColumn Width="68"
- Binding="{Binding Path=ServerPort}"
- Header="{x:Static resource:Muchinfo_Resource.Content_Ports}"
- Visibility="Collapsed" />
- <DataGridTextColumn Width="68"
- Binding="{Binding Path=Rate}"
- Header="{x:Static resource:Muchinfo_Resource.Content_Rate}"
- Visibility="Collapsed" />
- <DataGridTemplateColumn Width="*"
- Header="{x:Static resource:Muchinfo_Resource.Content_TimeDelay}"
- IsReadOnly="False">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Button Background="Blue"
- Command="{Binding Path=DataContext.TestSpeedCommand,
- RelativeSource={RelativeSource Mode=FindAncestor,
- AncestorType={x:Type Window}}}"
- CommandParameter="{Binding }"
- Cursor="Hand"
- ToolTip="{x:Static resource:Muchinfo_Resource.Button_Speed}">
- <Button.Template>
- <ControlTemplate>
- <TextBlock Text="{Binding Path=RequestTimeText}" TextDecorations="Underline" />
- </ControlTemplate>
- </Button.Template>
- </Button>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </dataGrid:MuchinfoDataGrid>
- </Grid>
- </TabItem>
- </TabControl>
- <!--
- <StackPanel Grid.Row="1">
- <GroupBox Margin="0,18,0,0"
- IsEnabled="False"
- Padding="10">
- <GroupBox.Header>
- <CheckBox Content="使用代理" />
- </GroupBox.Header>
-
-
- <StackPanel>
- <WrapPanel Margin="10,0,5,0">
- <RadioButton Margin="0,0,5,0"
- VerticalAlignment="Center"
- Content="socket5" />
- <RadioButton VerticalAlignment="Center" Content="http" />
- </WrapPanel>
-
- <WrapPanel Margin="10,8,0,0">
-
- <WrapPanel>
- <TextBlock Margin="0,0,6,0"
- VerticalAlignment="Center"
- Text="代理地址" />
- <TextBox Width="100" Height="22" />
-
- <TextBlock Margin="12,0,6,0"
- VerticalAlignment="Center"
- Text="端 口" />
- <TextBox Width="100" Height="22" />
-
- </WrapPanel>
-
- <WrapPanel Margin="0,8,0,0">
- <TextBlock Margin="0,0,6,0"
- VerticalAlignment="Center"
- Text="验证用户" />
- <TextBox Width="100" Height="22" />
-
- <TextBlock Margin="12,0,6,0"
- VerticalAlignment="Center"
- Text="密 码" />
- <TextBox Width="100" Height="22" />
- </WrapPanel>
-
- <Button Width="57"
- Height="22"
- Margin="10,-20,0,0"
- Content="测试代理"
- Padding="0"
- Style="{StaticResource CommonButtonStyle}" />
- </WrapPanel>
- </StackPanel>
-
- </GroupBox>
- </StackPanel>
- -->
- <WrapPanel Grid.Row="2" Margin="99,8,0,5">
- <Button Width="82"
- Height="28"
- Margin="0,0,60,0"
- Command="{Binding OKCommand}"
- CommandParameter="{Binding ElementName=view}"
- Content="{x:Static resource:Muchinfo_Resource.Button_Ok}"
- IsDefault="True"
- Style="{StaticResource CommonButtonStyle}" />
- <Button Width="82"
- Height="28"
- Command="{Binding CancelCommand}"
- CommandParameter="{Binding ElementName=view}"
- Content="{x:Static resource:Muchinfo_Resource.Button_Cancel}"
- IsCancel="True"
- Style="{StaticResource CommonButtonStyle}" />
- </WrapPanel>
- </Grid>
- </windows:WindowBase>
|