先上图

新建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. 基于TCP协议的服务器(单线程)

    import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import  ...

  2. 【问题】Win7 系统下 Firefox hostadmin插件无法修改Host

    今天遇到一个奇葩问题:win 7系统,firefox hostAdmin插件无法修改Host了,提示“ write hosts file failed check permissions”,肯定是哪里 ...

  3. 单点登录SSO的实现原理

    单点登录SSO(Single Sign On)说得简单点就是在一个多系统共存的环境下,用户在一处登录后,就不用在其他系统中登录,也就是用户的一次登录能得到其他所有系统的信任.单点登录在大型网站里使用得 ...

  4. 397. Integer Replacement

    先正统做法. public class Solution { public int integerReplacement(int n) { if(n == 1) return 0; int res = ...

  5. 模仿GsonConverter 写的StringConverter 解析String字符串

    使用自己写的StringConverter 来封装的 Converter 来解析String private static final RestAdapter CAMERA_CLIENT_NETWOR ...

  6. 李炎恢bootstarp_项目实战__瓢城企业(注释+源码)

    源代码下载地址:http://pan.baidu.com/s/1gfI9Pj9 /********************************* pc界面设备页面***************** ...

  7. 关于Ajax&初见Ajax

    Ajax实现的效果 究竟Ajax能实现什么功能呢?今天下午学习了一下Ajax,现在跟大家分享一下我的学习心得.Ajax是什么?工作机制又是什么?可能不大准确,只是我个人看了视频学习后的一点点看法. A ...

  8. Makefile 入门与基本语法 分类: C/C++ ubuntu 2015-05-18 11:16 466人阅读 评论(0) 收藏

    在我看来,学会写简单的Makefile,阅读较复杂的makefile,是每一个Linux程序员都必须拥有的基本素质.Makefile可以自动识别哪些源文件被更改过,需要重新编译,那些不需要.从而节省大 ...

  9. Java中PreparedStatement和Statement的用法区别(转)

    1. PreparedStatement接口继承Statement, PreparedStatement 实例包含已编译的 SQL 语句,所以其执行速度要快于 Statement 对象.   2.作为 ...

  10. 手动安装 mysqldb 与[ pip easy_install]

    mysqldb下载: http://sourceforge.net/projects/mysql-python/ https://sourceforge.net/projects/mysql-pyth ...