📄 bitmappattern.cs
字号:
using System;
namespace PatternMaker
{
/// <summary>
/// Summary description for BitmapPattern.
/// </summary>
public class BitmapPattern : Pattern
{
public BitmapPattern()
{
//
// TODO: Add constructor logic here
//
}
private string m_bitmapFile ="";
public string BitmapFile
{
get {return m_bitmapFile;}
set {m_bitmapFile = value;}
}
public override void Draw(object sender,
System.Windows.Forms.PaintEventArgs e)
{
e.Graphics.DrawImage(new
System.Drawing.Bitmap(m_bitmapFile),0,0);
}
public override PatternEditor GetEditor()
{
return new BitmapPatternEditor(this);
}
public override Pattern Clone()
{
BitmapPattern newPattern = new BitmapPattern();
newPattern.BitmapFile = this.BitmapFile;
return newPattern;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -