fillmemento.cs

来自「c#设计模式随书源码 c#设计模式随书源码」· CS 代码 · 共 23 行

CS
23
字号
using System;

namespace State
{
	/// <summary>
	/// Summary description for FillMemento.
	/// </summary>
	public class FillMemento : Memento 	{
		private int index;
		private Mediator med;
		//-----
		public FillMemento(int dindex, Mediator md) {
			index = dindex;	
			med = md;
		}
		//-----
		public void restore() {
			Drawing d = med.getDrawing(index);
			d.setFill(false);
		}
	}
}

⌨️ 快捷键说明

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