⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chain.cs

📁 VC#里面的东西,大家可以看看
💻 CS
字号:
using System;
using System.Windows.Forms;
namespace HelpChain
{
	public abstract class Chain	{
		//describes how all chains work
		private bool hasLink;
		protected Control control;
		protected Chain chn;
		protected string message;
		
		public Chain(Control c, string mesg)	{
			hasLink = false;
			control = c;		//save the control
			message = mesg;
		}
		
		public abstract void sendToChain();
		//-----
		public void addToChain(Chain c) {
			//add new element to chain
			chn = c;
			hasLink = true;		//flag existence
		}
		//-----
		public Chain getChain() {
			return chn;	//get the chain link
		}
		//-----
		public bool hasChain() {
			return hasLink;		//true if linked to another
		}
		//-----
		protected void sendChain() {
			//send message on down the chain
			if(chn != null)
				chn.sendToChain ();
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -