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 ...
随机推荐
- 浅析 mondrian 模式文件 Schema
1.前言 前面几篇文章一经介绍过saiku.模式文件和MDX的关系.通俗点说模式文件(Schema)就是一个xml,里面定义了一个虚拟立方体,共MDX查询语言使用. 2.模式文件 Schema 最顶层 ...
- jquery---基本标签
你觉得 jquery 有哪些好处? jQuery 是轻量级的 javascript 框架 强大的选择器 出色的 DOM 操作的封装 可靠的事件处理机制 完善的 ajax 封装 出色的浏览器的兼容性 支 ...
- 基于jQuery HTML5人物介绍卡片特效
基于jQuery HTML5人物介绍卡片特效.这是一款基于jquery.material-cards插件实现的人物介绍卡片形式特效代码.效果图如下: 在线预览 源码下载 实现的代码. html代码 ...
- 理解 JS 回调函数中的 this
任何变量或对象都有其赖以生存的上下文.如果简单地将对象理解为一段代码,那么对象处在不同的上下文,这段代码也会执行出不同的结果. 例如,我们定义一个函数 getUrl 和一个对象 pseudoWindo ...
- 2014 网选 5011 Game(Nim游戏,数学题)
/* 题意:Nim游戏! 思路:通过异或,判断将n个数表示成二进制的形式之后,是否对应位的数字1 的个数是偶数! */ #include<iostream> using namespace ...
- LeetCode——LRU Cache
Description: Design and implement a data structure for Least Recently Used (LRU) cache. It should su ...
- [mysql]MySQL忘记密码
1.修改MySQL的登录设置: vi /etc/my.cnf 在[mysqld]的段中加上一句:skip-grant-tables 保存并且退出vi. 2.重新启动mysqld # /etc/init ...
- ELK+FileBeat+Log4Net搭建日志系统
ELK+FileBeat+Log4Net搭建日志系统 来源:https://www.zybuluo.com/muyanfeixiang/note/608470 标签(空格分隔): ELK Log4Ne ...
- Laravel 5 多个视图共享数据的方法
我们都知道模板一般会用到继承,导航栏就是一个很好的例子,但是导航栏的数据如何共享,比如有个导航的文件叫在view/navigation.blade.php 为了简单一点,文件里只有设置了一个变量 {{ ...
- Android 学习笔记之Volley(八)实现网络图片的数据加载
PS:最后一篇关于Volley框架的博客... 学习内容: 1.使用ImageRequest.java实现网络图片加载 2.使用ImageLoader.java实现网络图片加载 3.使用NetWork ...