# 位运算(右移) <<的疑问

0

```/*

*/```

Coca-code | 初学一级 | 园豆：6

0

dudu | 高人七级 |园豆：37154 | 2018-02-07 11:27

Coca-code | 园豆：6 (初学一级) | 2018-02-07 12:11

0

protected override void OnWriteToBuffer(BinaryWriter writer)
{
writer.WriterBig(Length);
writer.WriterBig(Number);
writer.WriterBig((ushort)Catelog);
writer.WriterBig(SessionId);
writer.WriterBig(Version.Buffer);
writer.WriterBig((byte)EncryptOpition);
writer.WriterBig(KeyForCommonEncript);
}

@Coca-code: 呵呵。有想象力很好，你那么有兴趣应该好好看看计算机原理，看看布尔数学。

@花飘水流兮: 恩师

```<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
>
<!--  应该在此定义资源字典条目。  -->
<BitmapImage x:Key="LogoImage" UriSource="/WpfApp1;component/Image/Logo/Logo.png" />

<!--  Close Resources。  -->
<BitmapImage x:Key="CloseNormalImage" UriSource="/WpfApp1;component/Image/Close/Close-Normal.png" />
<BitmapImage x:Key="CloseIsMouseOverImage" UriSource="/WpfApp1;component/Image/Maximize/Maximize-IsMouseOver.png" />
<BitmapImage x:Key="CloseIsPressedImage" UriSource="/WpfApp1;component/Image/Close/Close-IsPressed.png" />

<!--  Minimize Resources。  -->
<BitmapImage x:Key="MinimizeNormalImage" UriSource="/WpfApp1;component/Image/Maximize/Minimize-Normal.png" />
<BitmapImage x:Key="MinimizeIsMouseOverImage" UriSource="/WpfApp1;component/Image/Maximize/Minimize-IsMouseOver.png" />
<BitmapImage x:Key="MinimizeIsPressedImage" UriSource="/WpfApp1;component/Image/Minimize/Minimize-IsPressed.png" />

<!--  Maximise Resources。  -->
<BitmapImage x:Key="MaximizeNormalImage" UriSource="/WpfApp1;component/Image/Maximize/Maximize-Normal.png" />
<BitmapImage x:Key="MaximizeIsMouseOverImage" UriSource="/WpfApp1;component/Image/Maximize/Maximize-IsMouseOver.png" />
<BitmapImage x:Key="MaximizeIsPressedImage" UriSource="/WpfApp1;component/Image/Maximize/Maximize-IsPressed.png" />

<LinearGradientBrush x:Key="ButtonCommonBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FFC7E4FE" />
<GradientStop Offset="0.5" Color="#FFC7E4FE" />
<GradientStop Offset="0.5" Color="#FFA2D8F8" />
<GradientStop Offset="0.55" Color="#FFA2D8F8" />
<GradientStop Offset="0.55" Color="#FF8DD5F6" />
<GradientStop Offset="1" Color="#FF8DD5F6" />
<LinearGradientBrush x:Key="ButtonPressedBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FF8DC7FC" />
<GradientStop Offset="0.5" Color="#FF8DC7FC" />
<GradientStop Offset="0.5" Color="#FF6CB1F1" />
<GradientStop Offset="0.55" Color="#FF6CB1F1" />
<GradientStop Offset="0.55" Color="#FF54A4EA" />
<GradientStop Offset="1" Color="#FF54A4EA" />
<LinearGradientBrush x:Key="ButtonNormalBackground" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#FFE5E5E5" />
<GradientStop Offset="0.5" Color="#EBEBEB" />
<GradientStop Offset="0.5" Color="#FFCACACA" />
<GradientStop Offset="1" Color="DarkGray" />
<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070" />
<SolidColorBrush x:Key="ButtonMouseOverBorder" Color="#FF5FAFEE" />
<SolidColorBrush x:Key="ButtonPressedBorderBrush" Color="#FF7BCB48" />
<Style TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Border x:Name="border"
Background="{DynamicResource ButtonNormalBackground}"
BorderBrush="{DynamicResource ButtonNormalBorder}"
BorderThickness="1"
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True" />
<Trigger Property="IsDefaulted" Value="True" />
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource ButtonCommonBrush}" />
<Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource ButtonMouseOverBorder}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource ButtonPressedBrush}" />
<Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource ButtonPressedBorderBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False" />
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TabControlButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Border x:Name="border"
Background="{DynamicResource ButtonNormalBackground}"
BorderBrush="{DynamicResource ButtonNormalBorder}"
BorderThickness="1"
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True" />
<Trigger Property="IsDefaulted" Value="True" />
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource ButtonCommonBrush}" />
<Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource ButtonMouseOverBorder}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource ButtonPressedBrush}" />
<Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource ButtonPressedBorderBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False" />
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CloseButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Image Name="image" Source="{StaticResource CloseNormalImage}" />
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="image" Property="Source" Value="{StaticResource CloseIsMouseOverImage}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="image" Property="Source" Value="{StaticResource CloseIsPressedImage}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MinimizeButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Image Name="image" Source="{StaticResource MinimizeNormalImage}" />
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="image" Property="Source" Value="{StaticResource MinimizeIsMouseOverImage}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="image" Property="Source" Value="{StaticResource MinimizeIsPressedImage}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MaximizeButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Image Name="image" Source="{StaticResource MaximizeNormalImage}" />
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="image" Property="Source" Value="{StaticResource MaximizeIsMouseOverImage}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="image" Property="Source" Value="{StaticResource MaximizeIsPressedImage}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>```

您需要登录以后才能回答，未注册用户请先注册