controlchain.cs
来自「c#设计模式随书源码 c#设计模式随书源码」· CS 代码 · 共 22 行
CS
22 行
using System;
using System.Windows.Forms;
namespace HelpChain
{
/// <summary>
/// Summary description for ControlChain.
/// </summary>
public class ControlChain:Chain {
public ControlChain(Control c, string mesg):base(c, mesg) {
}
public override void sendToChain() {
//if it has the focus display the message
if (control.Focused ) {
MessageBox.Show (message);
}
else
//otherweise pass on down the chain
sendChain();
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?