先上图

新建CustomControl,名:HeaderedWindow

Themes\Generic.aml文件夹下加入

笔刷,转换器

     <SolidColorBrush x:Key="ActiveBackground" Color="#FF66CBEA"/>
<SolidColorBrush x:Key="DeactiveBackground" Color="#FFC2D6DC"/>
<loc:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>

最大化,最小化,关闭按钮

 <Style x:Key="styleWindowButtonMinimize" TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid x:Name="buttonClose">
<Border x:Name="btnEllipse" BorderThickness="1,0,1,1" BorderBrush="Black" Background="{TemplateBinding Background}"/>
<Path x:Name="iconMin" SnapsToDevicePixels="False" Height="21" Width="28" StrokeThickness="3" Stroke="Black" Fill="#FFFFFFFF" Data="M 8,13.5 L 19 13.5"/>
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True"/>
<Trigger Property="IsDefaulted" Value="True"/>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="LightGreen" TargetName="btnEllipse"/>
</Trigger>
<Trigger Property="IsPressed" Value="True"/>
<Trigger Property="IsEnabled" Value="False"/>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style> <Style x:Key="styleWindowButtonMaximize" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid>
<Border x:Name="btnEllipse" Background="{TemplateBinding Background}" Width="25" Height="21" BorderBrush="Black" BorderThickness="0,0,0,1"/>
<Path x:Name="iconMax" SnapsToDevicePixels="False" Stroke="Black" StrokeThickness="2" Data="F1 M 9 7 H 18 V 14 H 9 V 7 H 18"/>
<Path x:Name="iconRestore" SnapsToDevicePixels="False" Visibility="Collapsed" Stroke="Black" StrokeThickness="1" Data="F1 M 10.5 5.5 H 17.5 V 12.5 M 8.5 7.5 H 15.5 V 14.5 H 8.5 V 7.5 H 9.5 V 13.5 H 14.5 V 8.5 H 8.5"/>
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True"/>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="LightGreen" TargetName="btnEllipse"/>
</Trigger>
<Trigger Property="IsPressed" Value="True"/>
<Trigger Property="IsEnabled" Value="False"/>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="iconMax" Property="Visibility" Value="Collapsed" />
<Setter TargetName="iconRestore" Property="Visibility" Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style> <Style x:Key="styleMainWindowButtonClose" TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid x:Name="buttonClose" Width="47" Height="21">
<Border x:Name="btnEllipse" BorderBrush="Black" BorderThickness="1,0,1,1" Background="{TemplateBinding Background}"/>
<Path x:Name="iconX" ClipToBounds="True" Stroke="Black" StrokeThickness="1" Data="F1 M 20 7 L 26 15 M 21 7 L 27 15 M 22 7 L 28 15 M 20 15 L 26 7 M 21 15 L 27 7 M 22 15 L 28 7"/>
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True"/>
<Trigger Property="IsDefaulted" Value="True"/>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FFEC6C60" TargetName="btnEllipse"/>
</Trigger>
<Trigger Property="IsPressed" Value="True"/>
<Trigger Property="IsEnabled" Value="False"/>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

窗口样式

     <Style TargetType="{x:Type loc:HeaderedWindow}">
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="ResizeMode" Value="NoResize"/>
<Setter Property="Background" Value="#FF66CBEA"/>
<Setter Property="BorderBrush" Value="Black"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="MinWidth" Value="90"/>
<Setter Property="MinHeight" Value="30"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type loc:HeaderedWindow}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<Grid SnapsToDevicePixels="True" Background="{TemplateBinding Background}">
<Grid.RowDefinitions>
<RowDefinition x:Name="HeaderRow" Height="30" />
<RowDefinition />
</Grid.RowDefinitions>
<!-- Window header-->
<Grid Name="PART_HeaderContainer" Background="Transparent">
<StackPanel Orientation="Horizontal" Margin="4,0" Visibility="{Binding RelativeSource={ x:Static RelativeSource.TemplatedParent}, Path=ShowDefaultHeader, Converter={ StaticResource BoolToVisibilityConverter }}">
<Image Height="24" Width="24" HorizontalAlignment="Left" VerticalAlignment="Center" Source="{TemplateBinding Icon}"/>
<TextBlock Text="{TemplateBinding Title}" Margin="4,0" VerticalAlignment="Center" FontFamily="Arial" FontSize="15" Foreground="#FFFFFFFF" TextWrapping="NoWrap"/>
</StackPanel>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Orientation="Horizontal" Margin="0,0,5,0">
<Button x:Name="PART_MinimizeButton" IsTabStop="False" Style="{StaticResource styleWindowButtonMinimize}" Width="28" Height="21" ToolTip="Minimize" Visibility="{Binding RelativeSource={ x:Static RelativeSource.TemplatedParent}, Path=CanResize, Converter={ StaticResource BoolToVisibilityConverter }}"/>
<ToggleButton x:Name="PART_RestoreButton" IsTabStop="False" Style="{StaticResource styleWindowButtonMaximize}" Width="25" Height="21" ToolTip="Maximize" Visibility="{Binding RelativeSource={ x:Static RelativeSource.TemplatedParent}, Path=CanResize, Converter={ StaticResource BoolToVisibilityConverter }}"/>
<Button x:Name="PART_CloseButton" IsTabStop="False" Style="{StaticResource styleMainWindowButtonClose}" Width="47" Height="21" ToolTip="Close"/>
</StackPanel>
<ContentPresenter ContentSource="{TemplateBinding Header}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
</Grid>
<Grid Grid.RowSpan="2" x:Name="PART_ResizerContainers" Visibility="Hidden">
<Grid.Resources>
<sys:Double x:Key="StraightResizerSize">4</sys:Double>
<sys:Double x:Key="SlantResizerSize">8</sys:Double>
<Style TargetType="{x:Type Thumb}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Fill="Transparent"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Grid.Resources>
<Thumb Width="{StaticResource StraightResizerSize}" VerticalAlignment="Stretch" HorizontalAlignment="Left" Cursor="SizeWE" x:Name="PART_LeftResizer"/>
<Thumb Height="{StaticResource StraightResizerSize}" VerticalAlignment="Top" HorizontalAlignment="Stretch" Cursor="SizeNS" x:Name="PART_TopResizer"/>
<Thumb Width="{StaticResource StraightResizerSize}" VerticalAlignment="Stretch" HorizontalAlignment="Right" Cursor="SizeWE" x:Name="PART_RightResizer"/>
<Thumb Height="{StaticResource StraightResizerSize}" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Cursor="SizeNS" x:Name="PART_BottomResizer"/>
<ResizeGrip Width="{StaticResource SlantResizerSize}" Height="{StaticResource SlantResizerSize}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Visibility="{Binding RelativeSource={ x:Static RelativeSource.TemplatedParent}, Path=ShowResizeGrip, Converter={ StaticResource BoolToVisibilityConverter }}"/>
<Thumb Width="{StaticResource SlantResizerSize}" Height="{StaticResource SlantResizerSize}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Cursor="SizeNWSE" x:Name="PART_BottomRightResizer"/>
<Thumb Width="{StaticResource SlantResizerSize}" Height="{StaticResource SlantResizerSize}" HorizontalAlignment="Right" VerticalAlignment="Top" Cursor="SizeNESW" x:Name="PART_TopRightResizer"/>
<Thumb Width="{StaticResource SlantResizerSize}" Height="{StaticResource SlantResizerSize}" HorizontalAlignment="Left" VerticalAlignment="Top" Cursor="SizeNWSE" x:Name="PART_TopLeftResizer"/>
<Thumb Width="{StaticResource SlantResizerSize}" Height="{StaticResource SlantResizerSize}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Cursor="SizeNESW" x:Name="PART_BottomLeftResizer"/>
</Grid>
<Border x:Name="PART_ContentBorder" Grid.Row="1" Margin="7,0,7,7" ClipToBounds="True" Background="White">
<AdornerDecorator>
<ContentPresenter Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
</AdornerDecorator>
</Border>
</Grid>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="CanResize" Value="True"/>
<Condition Property="WindowState" Value="Normal"/>
</MultiTrigger.Conditions>
<Setter TargetName="PART_ResizerContainers" Property="Visibility" Value="Visible"/>
</MultiTrigger>
<Trigger Property="WindowState" Value="Maximized">
<Setter TargetName="PART_ContentBorder" Property="Margin" Value="0"/>
<Setter TargetName="PART_ContentBorder" Property="BorderThickness" Value="0,2,0,0"/>
<Setter TargetName="HeaderRow" Property="Height" Value="25"/>
</Trigger>
<Trigger Property="IsActive" Value="False">
<Setter Property="Background" Value="{StaticResource DeactiveBackground}"/>
<Setter TargetName="PART_MinimizeButton" Property="Background" Value="{StaticResource DeactiveBackground}"/>
<Setter TargetName="PART_RestoreButton" Property="Background" Value="{StaticResource DeactiveBackground}"/>
<Setter TargetName="PART_CloseButton" Property="Background" Value="{StaticResource DeactiveBackground}"/>
</Trigger>
<Trigger Property="IsActive" Value="True">
<Setter Property="Background" Value="{StaticResource ActiveBackground}"/>
<Setter TargetName="PART_MinimizeButton" Property="Background" Value="{StaticResource ActiveBackground}"/>
<Setter TargetName="PART_RestoreButton" Property="Background" Value="{StaticResource ActiveBackground}"/>
<Setter TargetName="PART_CloseButton" Property="Background" Value="#FFC35A50"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

HeaderedWindwo.cs

 public class HeaderedWindow : Window
{
#region 模板中的部分控件名称
private const string HeaderContainerName = "PART_HeaderContainer";
private const string MinimizeButtonName = "PART_MinimizeButton";
private const string RestoreButtonName = "PART_RestoreButton";
private const string CloseButtonName = "PART_CloseButton";
private const string TopResizerName = "PART_TopResizer";
private const string LeftResizerName = "PART_LeftResizer";
private const string RightResizerName = "PART_RightResizer";
private const string BottomResizerName = "PART_BottomResizer";
private const string BottomRightResizerName = "PART_BottomRightResizer";
private const string TopRightResizerName = "PART_TopRightResizer";
private const string TopLeftResizerName = "PART_TopLeftResizer";
private const string BottomLeftResizerName = "PART_BottomLeftResizer";
#endregion #region 依赖属性
public static readonly DependencyProperty ShowDefaultHeaderProperty =
DependencyProperty.Register("ShowDefaultHeader", typeof(bool), typeof(HeaderedWindow), new FrameworkPropertyMetadata(true)); public static readonly DependencyProperty ShowResizeGripProperty =
DependencyProperty.Register("ShowResizeGrip", typeof(bool), typeof(HeaderedWindow), new FrameworkPropertyMetadata(false)); public static readonly DependencyProperty CanResizeProperty =
DependencyProperty.Register("CanResize", typeof(bool), typeof(HeaderedWindow), new FrameworkPropertyMetadata(true)); public static readonly DependencyProperty HeaderProperty =
DependencyProperty.Register("Header", typeof(object), typeof(HeaderedWindow), new FrameworkPropertyMetadata(null, OnHeaderChanged)); public static readonly DependencyProperty HeaderTemplateProperty =
DependencyProperty.Register("HeaderTemplate", typeof(DataTemplate), typeof(HeaderedWindow), new FrameworkPropertyMetadata(null)); public static readonly DependencyProperty HeaderTempateSelectorProperty =
DependencyProperty.Register("HeaderTempateSelector", typeof(DataTemplateSelector), typeof(HeaderedWindow), new FrameworkPropertyMetadata(null)); public static readonly DependencyProperty IsFullScreenMaximizeProperty =
DependencyProperty.Register("IsFullScreenMaximize", typeof(bool), typeof(HeaderedWindow), new FrameworkPropertyMetadata(false)); private static void OnHeaderChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
{
HeaderedWindow win = sender as HeaderedWindow;
win.RemoveLogicalChild(e.OldValue);
win.AddLogicalChild(e.NewValue);
} public bool ShowDefaultHeader
{
get { return (bool)GetValue(ShowDefaultHeaderProperty); }
set { SetValue(ShowDefaultHeaderProperty, value); }
} public bool CanResize
{
get { return (bool)GetValue(CanResizeProperty); }
set { SetValue(CanResizeProperty, value); }
} public bool ShowResizeGrip
{
get { return (bool)GetValue(ShowResizeGripProperty); }
set { SetValue(ShowResizeGripProperty, value); }
} public object Header
{
get { return (object)GetValue(HeaderProperty); }
set { SetValue(HeaderProperty, value); }
} public DataTemplate HeaderTemplate
{
get { return (DataTemplate)GetValue(HeaderTemplateProperty); }
set { SetValue(HeaderTemplateProperty, value); }
} public DataTemplateSelector HeaderTempateSelector
{
get { return (DataTemplateSelector)GetValue(HeaderTempateSelectorProperty); }
set { SetValue(HeaderTempateSelectorProperty, value); }
} public bool IsFullScreenMaximize
{
get { return (bool)GetValue(IsFullScreenMaximizeProperty); }
set { SetValue(IsFullScreenMaximizeProperty, value); }
} #endregion static HeaderedWindow()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(HeaderedWindow), new FrameworkPropertyMetadata(typeof(HeaderedWindow)));
} #region 私有变量 private FrameworkElement headerContainer;
private Button minimizeButton;
private ToggleButton restoreButton;
private Button closeButton;
private Thumb topResizer;
private Thumb leftResizer;
private Thumb rightResizer;
private Thumb bottomResizer;
private Thumb bottomRightResizer;
private Thumb topRightResizer;
private Thumb topLeftResizer;
private Thumb bottomLeftResizer;
#endregion #region 重写函数 public override void OnApplyTemplate()
{
base.OnApplyTemplate();
headerContainer = GetTemplateChild<FrameworkElement>(HeaderContainerName);
headerContainer.MouseLeftButtonDown += HeaderContainerMouseLeftButtonDown;
closeButton = GetTemplateChild<Button>(CloseButtonName);
closeButton.Click += delegate { Close(); };
restoreButton = GetTemplateChild<ToggleButton>(RestoreButtonName);
restoreButton.Checked += delegate { ChangeWindowState(WindowState.Maximized); };
restoreButton.Unchecked += delegate { ChangeWindowState(WindowState.Normal); };
StateChanged += new EventHandler(HeaderedWindowStateChanged);
minimizeButton = GetTemplateChild<Button>(MinimizeButtonName);
minimizeButton.Click += delegate { ChangeWindowState(WindowState.Minimized); };
topResizer = GetTemplateChild<Thumb>(TopResizerName);
topResizer.DragDelta += new DragDeltaEventHandler(ResizeTop);
leftResizer = GetTemplateChild<Thumb>(LeftResizerName);
leftResizer.DragDelta += new DragDeltaEventHandler(ResizeLeft);
rightResizer = GetTemplateChild<Thumb>(RightResizerName);
rightResizer.DragDelta += new DragDeltaEventHandler(ResizeRight);
bottomResizer = GetTemplateChild<Thumb>(BottomResizerName);
bottomResizer.DragDelta += new DragDeltaEventHandler(ResizeBottom);
bottomRightResizer = GetTemplateChild<Thumb>(BottomRightResizerName);
bottomRightResizer.DragDelta += new DragDeltaEventHandler(ResizeBottomRight);
topRightResizer = GetTemplateChild<Thumb>(TopRightResizerName);
topRightResizer.DragDelta += new DragDeltaEventHandler(ResizeTopRight);
topLeftResizer = GetTemplateChild<Thumb>(TopLeftResizerName);
topLeftResizer.DragDelta += new DragDeltaEventHandler(ResizeTopLeft);
bottomLeftResizer = GetTemplateChild<Thumb>(BottomLeftResizerName);
bottomLeftResizer.DragDelta += new DragDeltaEventHandler(ResizeBottomLeft);
}
#endregion #region 辅助函数 private T GetTemplateChild<T>(string childName) where T : FrameworkElement
{
return (GetTemplateChild(childName) as T);
} /// <summary>
/// 鼠标左键单击拖动标题栏,双击窗体状态变化(最大化和还原)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void HeaderContainerMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (e.ClickCount == )
{
DragMove();
}
else
{
ChangeWindowState(WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized);
}
}
/// <summary>
/// 改变窗体状态
/// </summary>
/// <param name="state">Maximized,Normal,Minimized</param>
private void ChangeWindowState(WindowState state)
{
if (state == WindowState.Maximized)
{
if (!IsFullScreenMaximize && IsLocationOnPrimaryScreen())
{
MaxHeight = SystemParameters.WorkArea.Height;
MaxWidth = SystemParameters.WorkArea.Width;
}
else
{
MaxHeight = double.PositiveInfinity;
MaxWidth = double.PositiveInfinity;
}
}
WindowState = state;
} private void HeaderedWindowStateChanged(object sender, EventArgs e)
{
if (WindowState == WindowState.Minimized)
{
restoreButton.IsChecked = null;
}
else
{
restoreButton.IsChecked = WindowState == WindowState.Maximized;
}
}
/// <summary>
/// 判断控件是否位于主显示器中
/// </summary>
/// <returns></returns>
private bool IsLocationOnPrimaryScreen()
{
return Left < SystemParameters.PrimaryScreenWidth && Top < SystemParameters.PrimaryScreenHeight;
} #endregion #region 重置大小
private void ResizeBottomLeft(object sender, DragDeltaEventArgs e)
{
ResizeLeft(sender, e);
ResizeBottom(sender, e);
} private void ResizeTopLeft(object sender, DragDeltaEventArgs e)
{
ResizeTop(sender, e);
ResizeLeft(sender, e);
} private void ResizeTopRight(object sender, DragDeltaEventArgs e)
{
ResizeRight(sender, e);
ResizeTop(sender, e);
} private void ResizeBottomRight(object sender, DragDeltaEventArgs e)
{
ResizeBottom(sender, e);
ResizeRight(sender, e);
} private void ResizeBottom(object sender, DragDeltaEventArgs e)
{
if (ActualHeight <= MinHeight && e.VerticalChange < )
{
return;
}
if (double.IsNaN(Height))
{
Height = ActualHeight;
}
Height += e.VerticalChange;
} private void ResizeRight(object sender, DragDeltaEventArgs e)
{
if (ActualWidth <= MinWidth && e.HorizontalChange < )
{
return;
}
if (double.IsNaN(Width))
{
Width = ActualWidth;
}
Width += e.HorizontalChange;
} private void ResizeLeft(object sender, DragDeltaEventArgs e)
{
if (ActualWidth <= MinWidth && e.HorizontalChange > )
{
return;
} if (double.IsNaN(Width))
{
Width = ActualWidth;
} Width -= e.HorizontalChange;
Left += e.HorizontalChange;
} private void ResizeTop(object sender, DragDeltaEventArgs e)
{
if (ActualHeight <= MinHeight && e.VerticalChange > )
{
return;
}
if (double.IsNaN(Height))
{
Height = ActualHeight;
}
Height -= e.VerticalChange;
Top += e.VerticalChange;
}
#endregion
}

BoolToVisibilityConverter类

     public class BoolToVisibilityConverter : IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return (bool)value ? Visibility.Visible : Visibility.Hidden;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}

WPF自定义窗口(Windows Server 2012 Style)的更多相关文章

  1. 在Windows Server 2012中如何快速开关桌面上经典的“计算机、我的文档”等通用图标

    我们都知道,在Windows Server 2012系列的服务器版本中都已经引入了Modern的现代界面作为默认的用户交互界面,同时满足视觉一致化,新版的服务器管理程序也做成了扁平化.因此传统的计算机 ...

  2. 如何将 Windows Server 2012 r2 打造成 Windows 8.1?

    Server 系列相对于桌面系统Windows 8.1 .嵌入式系统Embedded 8.1来说,还是有所不同的,有其独特性,所以,标题写着“打造”充其量不过是不断接近的意思.还有很多地方存在进一步深 ...

  3. Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境搭建教程

    原文地址:http://www.osyunwei.com/archives/7378.html 搬运是为了自己找资料方便. 准备篇 一.环境说明: 操作系统:Windows Server 2012 R ...

  4. WPF自定义窗口基类

    WPF自定义窗口基类时,窗口基类只定义.cs文件,xaml文件不定义.继承自定义窗口的类xaml文件的根节点就不再是<Window>,而是自定义窗口类名(若自定义窗口与继承者不在同一个命名 ...

  5. Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境搭建教程

    准备篇 一.环境说明: 操作系统:Windows Server 2012 R2 PHP版本:php 5.5.8 MySQL版本:MySQL5.6.15 二.相关软件下载: 1.PHP下载地址: htt ...

  6. Windows server 2012 R2 部署WSUS补丁服务

    一.WSUS 安装要求 1.硬件要求: 对于多达 13000 个客户端的服务器,建议使用以下硬件:* 4 Core E5-2609 2.1GHz 的处理器* 8 GB 的 RAM 2.软件要求: 要使 ...

  7. wpf 自定义窗口,最大化时覆盖任务栏解决方案

    原文:wpf 自定义窗口,最大化时覆盖任务栏解决方案 相信很多人使用wpf时会选择自定义美观的窗口,因此会设置WindowStyle="None" 取消自带的标题栏.但这样使用 W ...

  8. Windows server 2012 添加中文语言包(英文转为中文)(离线)

    Windows server 2012 添加中文语言包(英文转为中文)(离线) 相关资料: 公司环境:亚马孙aws虚拟机 英文版Windows2012 中文SQL Server2012安装包,需要安装 ...

  9. Windows Server 2012 NIC Teaming介绍及注意事项

    Windows Server 2012 NIC Teaming介绍及注意事项 转载自:http://www.it165.net/os/html/201303/4799.html Windows Ser ...

随机推荐

  1. Spark RDD/Core 编程 API入门系列 之rdd实战(rdd基本操作实战及transformation和action流程图)(源码)(三)

    本博文的主要内容是: 1.rdd基本操作实战 2.transformation和action流程图 3.典型的transformation和action RDD有3种操作: 1.  Trandform ...

  2. Classical Inheritance in JavaScript

    JavaScript is a class-free, object-oriented language, and as such, it uses prototypal inheritance in ...

  3. JSON AND BSON

    JSON JavaScript Object Notation (JSON) is an open, human and machine-readable standard that facilita ...

  4. hdoj 1556 Color the ball【线段树区间更新】

    Color the ball Time Limit: 9000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)To ...

  5. [学习笔记]设计模式之Abstract Factory

    写在前面 为方便读者,本文已添加至索引: 设计模式 学习笔记索引 在上篇笔记Builder设计模式中,时の魔导士祭出了自己的WorldCreator.尽管它因此能创造出一个有山有树有房子的世界,但是白 ...

  6. PAT 1076. Forwards on Weibo (30)

    Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may ...

  7. Yii 设置 flash消息 创建一个渐隐形式的消息框

    /*适用情况:比如提交一个表单,提交完成之后在页面展示一条提示消息. 控制器里面这样写: 单条消息: */ \Yii::$app->getSession()->setFlash('erro ...

  8. Java类加载机制深度分析

    转自:http://my.oschina.net/xianggao/blog/70826 参考:http://www.ibm.com/developerworks/cn/java/j-lo-class ...

  9. NIO机制总结

    Selector selector = Selector.open(); 普通的IO流的读取,写入都是一个字节一个字节或一个字符一个字符的循环进行,在这个过程中,程序是阻塞的,inputStream虽 ...

  10. Java NIO使用及原理分析(三)

    在上一篇文章中介绍了缓冲区内部对于状态变化的跟踪机制,而对于NIO中缓冲区来说,还有很多的内容值的学习,如缓冲区的分片与数据共享,只读缓冲区等.在本文中我们来看一下缓冲区一些更细节的内容. 缓冲区的分 ...