C# Winform 窗体美化
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
using XKW_E.Tool;
using Starts2000.WindowsClassName.Core;
namespace Beautify
{
public partial class MyForm : Form
{
#region 基本信息
[Category("ControlBox")]
[Description("设置标题栏图标的菜单")]
[DisplayName("CaptionMenu")]
public ContextMenuStrip menu { get; set; }
public Bitmap TitleImage;
public Bitmap CloseButtonImage;
public Bitmap CloseButtonPressDownImage;
public Bitmap CloseButtonHoverImage;
public Bitmap MaximumButtonImage;
public Bitmap MaximumButtonHoverImage;
public Bitmap MaximumButtonPressDownImage;
public Bitmap MaximumNormalButtonImage;
public Bitmap MaximumNormalButtonHoverImage;
public Bitmap MaximumNormalButtonPressDownImage;
public Bitmap MinimumButtonImage;
public Bitmap MinimumButtonHoverImage;
public Bitmap MinimumButtonPressDownImage;
public Bitmap HelpButtonImage;
public Bitmap HelpButtonHoverImage;
public Bitmap HelpButtonPressDownImage;
struct NonClientSizeInfo
{
public Size CaptionButtonSize;
public Size BorderSize;
public int CaptionHeight;
public Rectangle CaptionRect;
public Rectangle Rect;
public Rectangle ClientRect;
public int Width;
public int Height;
}; #endregion #region 主要
public MyForm() : base()
{
this.ControlBox = false;
TitleImage = Properties.Resources.Main_Title; CloseButtonImage = Properties.Resources.Close_Normal;
CloseButtonHoverImage = Properties.Resources.Close_On;
CloseButtonPressDownImage = Properties.Resources.Close_Down; MaximumButtonImage = Properties.Resources.Max_Normal;
MaximumButtonHoverImage = Properties.Resources.Max_On;
MaximumButtonPressDownImage = Properties.Resources.Max_Down; MaximumNormalButtonImage = Properties.Resources.Restore_Normal;
MaximumNormalButtonHoverImage = Properties.Resources.Restore_On;
MaximumNormalButtonPressDownImage = Properties.Resources.Restore_Down; MinimumButtonImage = Properties.Resources.Min_Normal;
MinimumButtonHoverImage = Properties.Resources.Min_On;
MinimumButtonPressDownImage = Properties.Resources.Min_Down;
}
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case WindowsMessage.WM_NCPAINT: //绘制
PaintBorder(m);
return;
case WindowsMessage.WM_NCACTIVATE: //标题栏激活
if (m.WParam == (IntPtr)WindowsMessage.WM_FALSE)
{
m.Result = (IntPtr)WindowsMessage.WM_TRUE;
}
return;
case WindowsMessage.WM_PAINT:
if (this.WindowState == FormWindowState.Normal)
{
PaintBorder(m);
}
break;
case WindowsMessage.WM_SIZE:
PaintBorder(m);
break;
case WindowsMessage.WM_ACTIVATE: //窗体激活
PaintBorder(m);
break;
case WindowsMessage.WM_NCCALCSIZE: //边框大小改变
PaintBorder(m);
break;
case WindowsMessage.WM_EXITSIZEMOVE: //结束大小改变
PaintBorder(m);
break;
case WindowsMessage.WM_SETCURSOR: //光标设置
if (SetCursor(m)) return;
break;
case WindowsMessage.WM_NCRBUTTONDOWN: //标题栏鼠标右键按下
IconClick(m);
break;
case WindowsMessage.WM_NCLBUTTONUP://标题栏左键释放
UpButton(m);
break;
case WindowsMessage.WM_NCMOUSEMOVE://标题栏鼠标移动
MoveButton(m);
break;
case WindowsMessage.WM_NCLBUTTONDOWN://标题栏左键按下
if (DownButton(m)) return;
break;
}
base.WndProc(ref m);
}
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
return cp;
}
}
public static IntPtr SetClassLong(HandleRef hWnd, int nIndex, IntPtr dwNewLong)
{
if (IntPtr.Size > )
return Win32API.SetClassLongPtr64(hWnd, nIndex, dwNewLong);
else
return new IntPtr(Win32API.SetClassLongPtr32(hWnd, nIndex, unchecked((uint)dwNewLong.ToInt32())));
}
#endregion #region 处理
private NonClientSizeInfo GetNonClientInfo(IntPtr hwnd)
{
NonClientSizeInfo info = new NonClientSizeInfo();
info.CaptionButtonSize = SystemInformation.CaptionButtonSize;
info.CaptionHeight = SystemInformation.CaptionHeight; switch (this.FormBorderStyle)
{
case FormBorderStyle.Fixed3D:
info.BorderSize = SystemInformation.FixedFrameBorderSize;
break;
case FormBorderStyle.FixedDialog:
info.BorderSize = SystemInformation.FixedFrameBorderSize;
break;
case FormBorderStyle.FixedSingle:
info.BorderSize = SystemInformation.FixedFrameBorderSize;
break;
case FormBorderStyle.FixedToolWindow:
info.BorderSize = SystemInformation.FixedFrameBorderSize;
info.CaptionButtonSize = SystemInformation.ToolWindowCaptionButtonSize;
info.CaptionHeight = SystemInformation.ToolWindowCaptionHeight;
break;
case FormBorderStyle.Sizable:
info.BorderSize = SystemInformation.FrameBorderSize;
break;
case FormBorderStyle.SizableToolWindow:
info.CaptionButtonSize = SystemInformation.ToolWindowCaptionButtonSize;
info.BorderSize = SystemInformation.FrameBorderSize;
info.CaptionHeight = SystemInformation.ToolWindowCaptionHeight;
break;
default:
info.BorderSize = SystemInformation.BorderSize;
break;
}
RECT areatRect = new RECT();
Win32API.GetWindowRect(hwnd, ref areatRect); int width = areatRect.right - areatRect.left;
int height = areatRect.bottom - areatRect.top; info.Width = width;
info.Height = height; Point xy = new Point(areatRect.left, areatRect.top);
xy.Offset(-areatRect.left, -areatRect.top); info.CaptionRect = new Rectangle(xy.X, xy.Y + info.BorderSize.Height, width, info.CaptionHeight);
info.Rect = new Rectangle(xy.X, xy.Y, width, height);
info.ClientRect = new Rectangle(xy.X + info.BorderSize.Width,
xy.Y + info.CaptionHeight + info.BorderSize.Height,
width - info.BorderSize.Width * ,
height - info.CaptionHeight - info.BorderSize.Height * );
return info;
}
#endregion #region 绘制
bool painting = true; private void PaintBorder(Message m)
{
try
{
PAINTSTRUCT paint = new PAINTSTRUCT();
paint.rcPaint = new Rectangle(, , this.Width, this.Height);
if (painting)
{ Win32API.BeginPaint(m.HWnd, ref paint);
painting = false;
NonClientSizeInfo info = GetNonClientInfo(m.HWnd);
BufferedGraphicsContext context = BufferedGraphicsManager.Current;
IntPtr hDC = Win32API.GetWindowDC(m.HWnd);
DrawLeft(hDC, context);
DrawRight(hDC, context);
DrawBottom(hDC, context);
DrawTitle(hDC, context, info);
Win32API.EndPaint(m.HWnd, ref paint);
painting = true;
Win32API.ReleaseDC(Handle, hDC);
}
}
catch (Exception)
{ }
} #region 边框
Rectangle title;
Rectangle btnRect;
Rectangle maxRect;
Rectangle minRect;
Rectangle helpRect;
Rectangle iconRect;
RectangleF rectText;
private void DrawTitleInfo(Graphics g, NonClientSizeInfo info)
{
int titleX;
int iconW = ;
int iconH = ; if (info.CaptionHeight < )
{
iconW = ;
iconH = ;
}
else
{
iconW = ;
iconH = ;
}
Size captionTitleSize = TextRenderer.MeasureText(this.Text, SystemFonts.CaptionFont);
Size iconSize = new Size(iconW, iconH); if (this.WindowState == FormWindowState.Maximized)
{
if (this.ShowIcon &&
this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.FixedToolWindow &&
this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.SizableToolWindow)
{
iconRect = new Rectangle(new Point(info.BorderSize.Width + , info.BorderSize.Height / ), iconSize);
g.DrawIcon(this.Icon, iconRect);
titleX = info.BorderSize.Width + iconSize.Width + info.BorderSize.Width;
}
else
{
titleX = info.BorderSize.Width;
}
rectText = new RectangleF(titleX + ,
(info.BorderSize.Height + info.CaptionHeight - captionTitleSize.Height) / + + info.BorderSize.Height / ,
info.CaptionRect.Width - info.BorderSize.Width * - SystemInformation.MinimumWindowSize.Width,
info.CaptionRect.Height);
}
else
{
if (this.ShowIcon &&
this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.FixedToolWindow &&
this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.SizableToolWindow)
{
iconRect = new Rectangle(new Point(info.BorderSize.Width + , info.BorderSize.Height / ), iconSize);
g.DrawIcon(this.Icon, iconRect);
titleX = info.BorderSize.Width + iconSize.Width + info.BorderSize.Width;
}
else
{
titleX = info.BorderSize.Width;
}
rectText = new RectangleF(titleX + ,
(info.BorderSize.Height + info.CaptionHeight - captionTitleSize.Height) / + ,
info.CaptionRect.Width - info.BorderSize.Width * - SystemInformation.MinimumWindowSize.Width,
info.CaptionRect.Height);
} Rectangle titleText = new Rectangle(iconRect.Right, iconRect.Height, captionTitleSize.Width > ? captionTitleSize.Width : , captionTitleSize.Height > ? captionTitleSize.Height : );
LinearGradientBrush brush = new LinearGradientBrush(titleText, Color.White, Color.Gold, LinearGradientMode.Vertical);
SolidBrush brushBorder = new SolidBrush(Color.Gray);
g.DrawString(this.Text, new Font(SystemFonts.CaptionFont, FontStyle.Bold), brushBorder, rectText, StringFormat.GenericTypographic);
rectText.Offset(, );
g.DrawString(this.Text, new Font(SystemFonts.CaptionFont, FontStyle.Bold), brush, rectText, StringFormat.GenericTypographic); }
private void DrawControlBox(Graphics g, NonClientSizeInfo info, bool closeBtn, bool maxBtn, bool minBtn, bool helpBtn)
{
Size iconSize = SystemInformation.IconSize; int closeBtnPosX = info.CaptionRect.Width - info.BorderSize.Width - CloseButtonImage.Width;
int maxBtnPosX = closeBtnPosX - MaximumButtonImage.Width;
int minBtnPosX = maxBtnPosX - MinimumButtonImage.Width;
// int helpBtnPosX = minBtnPosX - HelpButtonImage.Width;
int btnPosY = ;
if (this.WindowState == FormWindowState.Maximized)
{
btnPosY = info.BorderSize.Height;
}
btnRect = new Rectangle(new Point(closeBtnPosX, btnPosY), CloseButtonImage.Size);
maxRect = new Rectangle(new Point(maxBtnPosX, btnPosY), MaximumButtonImage.Size);
minRect = new Rectangle(new Point(minBtnPosX, btnPosY), MinimumButtonImage.Size);
// helpRect = new Rectangle(new Point(helpBtnPosX, btnPosY), HelpButtonImage.Size);
g.DrawImage(CloseButtonImage, btnRect); if (this.MaximizeBox || this.MinimizeBox)
{
if (this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.FixedToolWindow &&
this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.SizableToolWindow)
{
if (this.WindowState == FormWindowState.Maximized)
{
g.DrawImage(MaximumNormalButtonImage, maxRect);
}
else
{
g.DrawImage(MaximumButtonImage, maxRect);
}
g.DrawImage(MinimumButtonImage, minRect);
}
}
//if (this.HelpButton)
//{
// if (this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.FixedToolWindow &&
// this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.SizableToolWindow)
// {
// g.DrawImage(HelpButtonImage, helpRect);
// }
//}
}
private void DrawTitle(IntPtr hDC, BufferedGraphicsContext context, NonClientSizeInfo info)
{
int leftAndRightWidth = (this.Width - this.ClientRectangle.Width) / ;
int height = this.Height - this.ClientRectangle.Height - leftAndRightWidth > ? this.Height - this.ClientRectangle.Height - leftAndRightWidth : ;
int width = this.Width > ? this.Width : ;
title = new Rectangle(, , width, height);
BufferedGraphics bg = context.Allocate(hDC, title);
Graphics g = bg.Graphics;
g.CompositingQuality = CompositingQuality.HighSpeed;
g.DrawImage(TitleImage, title);
DrawTitleInfo(g, info);
DrawControlBox(g, info, this.ControlBox, this.MaximizeBox, this.MinimizeBox, this.HelpButton);
bg.Render();
bg.Dispose();
}
private void DrawLeft(IntPtr hDC, BufferedGraphicsContext context)
{
int leftAndRightWidth = (this.Width - this.ClientRectangle.Width) / ;
int height = this.Height;
int Width = (this.Width - this.ClientRectangle.Width) / ;
int y = this.Height - this.ClientRectangle.Height - leftAndRightWidth;
Rectangle left = new Rectangle(, y, Width, height);
BufferedGraphics bg = context.Allocate(hDC, left);
Graphics g = bg.Graphics;
g.CompositingQuality = CompositingQuality.HighSpeed;
g.DrawImage(Properties.Resources.Main_Left, left);
bg.Render();
bg.Dispose();
}
private void DrawRight(IntPtr hDC, BufferedGraphicsContext context)
{
int leftAndRightWidth = (this.Width - this.ClientRectangle.Width) / ;
int height = this.Height;
int Width = (this.Width - this.ClientRectangle.Width) / ;
int x = this.ClientRectangle.Width + (this.Width - this.ClientRectangle.Width) / ;
int y = this.Height - this.ClientRectangle.Height - leftAndRightWidth;
Rectangle right = new Rectangle(x, y, Width, height);
BufferedGraphics bg = context.Allocate(hDC, right);
Graphics g = bg.Graphics;
g.CompositingQuality = CompositingQuality.HighSpeed;
g.DrawImage(Properties.Resources.Main_Right, right);
bg.Render();
bg.Dispose();
}
private void DrawBottom(IntPtr hDC, BufferedGraphicsContext context)
{
int leftAndRightWidth = (this.Width - this.ClientRectangle.Width) / ;
int width = this.Width - ;
int height = leftAndRightWidth;
int x = ;
int y = this.Height - leftAndRightWidth;
Rectangle buttom = new Rectangle(x, y, width, height);
BufferedGraphics bg = context.Allocate(hDC, buttom);
Graphics g = bg.Graphics;
g.CompositingQuality = CompositingQuality.HighSpeed;
g.FillRectangle(new SolidBrush(Color.FromArgb(, , )), buttom);
//g.DrawImage(Properties.Resources.Main_Bottom, buttom);
bg.Render();
bg.Dispose();
}
#endregion #region 按钮
Point pClick;
private void IconClick(Message m)
{
pClick = new Point((int)m.LParam);
pClick.Offset(-this.Left, -this.Top);
int locationX = pClick.X + this.Location.X;
int locationY = pClick.Y + this.Location.Y;
if (iconRect.Contains(pClick))
{
if (menu != null)
{
menu.Show(locationX, locationY);
} }
}
private void MoveButton(Message m)
{
pClick = new Point((int)m.LParam);
pClick.Offset(-this.Left, -this.Top);
if (title.Contains(pClick))
{
IntPtr dc = Win32API.GetWindowDC(m.HWnd);
Graphics g = Graphics.FromHdc(dc); #region 关闭按钮
if (btnRect.Contains(pClick))
{
g.DrawImage(CloseButtonHoverImage, btnRect);
}
else
{
g.DrawImage(CloseButtonImage, btnRect);
}
#endregion #region 最大化最小化
if (this.MaximizeBox || this.MinimizeBox)
{
if (this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.FixedToolWindow &&
this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.SizableToolWindow)
{
if (this.WindowState == FormWindowState.Maximized)
{
if (this.MaximizeBox)
{
if (maxRect.Contains(pClick))
{
g.DrawImage(MaximumNormalButtonHoverImage, maxRect);
}
else
{
g.DrawImage(MaximumNormalButtonImage, maxRect);
}
}
else
{
g.DrawImage(MaximumNormalButtonImage, maxRect);
}
}
else
{
if (this.MaximizeBox)
{
if (maxRect.Contains(pClick))
{
g.DrawImage(MaximumButtonHoverImage, maxRect);
}
else
{
g.DrawImage(MaximumButtonImage, maxRect);
}
}
else
{
g.DrawImage(MaximumButtonImage, maxRect);
}
} if (this.MinimizeBox)
{
if (minRect.Contains(pClick))
{
g.DrawImage(MinimumButtonHoverImage, minRect);
}
else
{
g.DrawImage(MinimumButtonImage, minRect);
}
}
else
{
g.DrawImage(MinimumButtonImage, minRect);
}
}
}
#endregion #region 帮助
//if (this.HelpButton)
//{
// if (this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.FixedToolWindow &&
// this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.SizableToolWindow)
// {
// if (helpRect.Contains(pClick))
// {
// g.DrawImage(HelpButtonHoverImage, helpRect);
// }
// else
// {
// g.DrawImage(HelpButtonImage, helpRect);
// }
// }
//}
#endregion;
g.Dispose();
Win32API.ReleaseDC(Handle, dc);
}
}
private void UpButton(Message m)
{
pClick = new Point((int)m.LParam);
pClick.Offset(-this.Left, -this.Top); if (btnRect.Contains(pClick))
{
this.Close();
}
if (this.MaximizeBox)
if (maxRect.Contains(pClick))
{
if (this.WindowState == FormWindowState.Maximized)
{
this.WindowState = FormWindowState.Normal;
}
else
{
this.WindowState = FormWindowState.Maximized;
}
}
if (this.MinimizeBox)
if (minRect.Contains(pClick))
{
if (this.WindowState == FormWindowState.Minimized)
{
this.WindowState = FormWindowState.Normal;
}
else
{
this.WindowState = FormWindowState.Minimized;
}
}
if (this.HelpButton)
if (helpRect.Contains(pClick))
{
if (this.WindowState == FormWindowState.Minimized)
{
this.WindowState = FormWindowState.Normal;
}
else
{
this.WindowState = FormWindowState.Minimized;
}
}
}
private bool DownButton(Message m)
{
bool ret = false; //是否触发点击
pClick = new Point((int)m.LParam);
pClick.Offset(-this.Left, -this.Top);
if (title.Contains(pClick))
{
IntPtr dc = Win32API.GetWindowDC(m.HWnd);
Graphics g = Graphics.FromHdc(dc);
#region 关闭按钮
if (btnRect.Contains(pClick))
{
g.DrawImage(CloseButtonPressDownImage, btnRect);
ret = true;
}
else
{
g.DrawImage(CloseButtonImage, btnRect);
}
#endregion #region 最大化最小化
if (this.MaximizeBox || this.MinimizeBox)
{
if (this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.SizableToolWindow &&
this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.FixedToolWindow)
{
if (this.WindowState == FormWindowState.Maximized)
{
if (maxRect.Contains(pClick) && this.MaximizeBox)
{
g.DrawImage(MaximumNormalButtonPressDownImage, maxRect);
ret = true;
}
else
{
g.DrawImage(MaximumNormalButtonImage, maxRect);
}
}
else
{
if (maxRect.Contains(pClick) && this.MaximizeBox)
{
g.DrawImage(MaximumButtonPressDownImage, maxRect);
ret = true;
}
else
{
g.DrawImage(MaximumButtonImage, maxRect);
}
}
if (minRect.Contains(pClick) && this.MinimizeBox)
{
g.DrawImage(MinimumButtonPressDownImage, minRect);
ret = true;
}
else
{
g.DrawImage(MinimumButtonImage, minRect);
}
}
}
#endregion #region 帮助
if (this.HelpButton)
{
if (this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.FixedToolWindow &&
this.FormBorderStyle != System.Windows.Forms.FormBorderStyle.SizableToolWindow)
{
if (helpRect.Contains(pClick))
{
g.DrawImage(HelpButtonPressDownImage, helpRect);
ret = true;
}
else
{
g.DrawImage(HelpButtonImage, helpRect);
}
}
}
#endregion;
g.Dispose();
Win32API.ReleaseDC(m.HWnd, dc);
}
return ret;
}
#endregion #region 边缘设置 private bool SetCursor(Message m)
{
bool flag = false;
if (btnRect.Contains(pClick))
{
Win32API.SetCursor(Cursors.Default.Handle);
flag = true;
}
if (this.MaximizeBox)
if (maxRect.Contains(pClick))
{
Win32API.SetCursor(Cursors.Default.Handle);
flag = true;
}
if (this.MinimizeBox)
if (minRect.Contains(pClick))
{
Win32API.SetCursor(Cursors.Default.Handle);
flag = true;
}
if (this.HelpButton)
if (helpRect.Contains(pClick))
{
Win32API.SetCursor(Cursors.Default.Handle);
flag = true;
}
if (menu != null)
{
if (iconRect.Contains(pClick))
{
Win32API.SetCursor(Cursors.Default.Handle);
flag = true;
}
}
return flag;
}
#endregion #endregion
private void InitializeComponent()
{
this.SuspendLayout();
//
// MyForm
//
this.ClientSize = new System.Drawing.Size(, );
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
this.Name = "MyForm";
this.ResumeLayout(false); }
}
}
C# Winform 窗体美化的更多相关文章
- C#的WinForm窗体美化
为了帮助用户追求美观,.NET 4.0 专门为对此有需求的人提供了IrisSkin4.dll皮肤引用集,里面封装了许多对窗体重新描绘的方法,再搭配上WinForm特有的 .ssk 文件,就可以实现窗体 ...
- WinForm 窗体属性 窗体美化
WinForm是·Net开发平台中对Windows Form的一种称谓. Windows窗体的一些重要特点如下: 功能强大:Windows窗体可用于设计窗体和可视控件,以创建丰富的基于Windows的 ...
- C# WinForm界面美化--使用IrisSkin实现换肤功能
WinForm界面使用IrisSkin,可以说做到了一键美化,当然美化的效果仁者见仁智者见智,可以挑选自己喜欢的. 1.IrisSkin下载地址:https://www.cr173.com/soft/ ...
- winform 窗体圆角设计
网上看到的很多winform窗体圆角设计代码都比较累赘,这里分享一个少量代码就可以实现的圆角.主要运用了System.Drawing.Drawing2D. 效果图 代码如下. private void ...
- winform窗体置顶
winform窗体置顶 金刚 winform 置顶 今天做了一个winform小工具.需要设置置顶功能. 网上找了下,发现百度真的很垃圾... 还是必应靠谱些. 找到一个可以链接. https://s ...
- winform窗体控件(全)
回顾跟补充下除了昨天那常用6个其他的winform窗体控件作用 1:Button:按钮 (1)AutoSize:如果是True的情况下,内容将会撑开:False的话会另起一行 (2)Enabled: ...
- C#将exe运行程序嵌入到自己的winform窗体中
以下例子是将Word打开,然后将它嵌入到winform窗体中,效果如下图:C将exe运行程序嵌入到自己的winform窗体中 - kingmax_res - iSport注意:该方法只适用于com的e ...
- Winform 窗体单例
有窗体Form1和窗体Form2,单击Form1上按钮,只弹出一个Form2. Form2里自定义一个方法,里面判断是否弹出Form2,没有时弹出Form2. public static Form2 ...
- WinForm窗体嵌入
一.在winform窗体上添加两个控件 1.容器>Panel 2.添加 SideBar.dll (下载链接:http://pan.baidu.com/s/1o6qhf9w) (1)将SideBa ...
随机推荐
- MYSQL 的一些文件及说明
1.MySQL库目录下db.opt文件的作用 http://my.oschina.net/u/1462678/blog/232719 2.复制MySQL数据库A到另外一个MySQL数据库B(仅仅针对i ...
- angularjs, nodejs, express, gulp, karma, jasmine 前端方案整合
今年转向做前端开发,主要是做angularjs开发,期间接触了nodejs平台,从此一发不可收拾. npm丰富的插件库,express 开发框架, grunt, gulp构建工具,karma测试管理工 ...
- Android Studio 简单功能介绍
Android Studio 建立系统工具包你用来生成,测试,运行您的应用程序和软件包.构建系统是独立于Android的工作室,所以你可以调用它的Android的工作室或从命令行.在你写你的应用程序 ...
- POJ 1308 Is It A Tree?
Is It A Tree? Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 18778 Accepted: 6395 De ...
- 控制反转(Ioc)和依赖注入(DI)
控制反转IOC, 全称 “Inversion of Control”.依赖注入DI, 全称 “Dependency Injection”. 面向的问题:软件开发中,为了降低模块间.类间的耦合度,提倡基 ...
- php 碎片笔记
1.修改 php.ini 加载路径 添加环境变量 ,新建系统变量 PHPRC ,配置如下: 检验: 通过phpinfo(),查看系统配置 Loaded Configuration File ,识别系统 ...
- [转]OOPC:Object-Oriented Programming in C
转载自:http://www.cnblogs.com/stli/archive/2010/10/16/1853190.html OOPC是指OOP(Object-Oriented Programmin ...
- C++输入输出
i. C++如何输入一行,按回车键结束 #include <sstream>1 getline(cin, line); istringstream input(line); ii. C++ ...
- Python--matplotlib绘图可视化知识点整理
from:https://segmentfault.com/a/1190000005104723 本文作为学习过程中对matplotlib一些常用知识点的整理,方便查找. 强烈推荐ipython无论你 ...
- MyBatis知多少(20)MyBatis读取操作
上篇展示了如何使用MyBatis执行创建操作表.本章将告诉你如何使用MyBatis来读取表. 我们已经在MySQL下有EMPLOYEE表: CREATE TABLE EMPLOYEE ( id INT ...