forked from EdisonTalk/DesignPattern.Samples.CSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindow.cs
41 lines (38 loc) · 862 Bytes
/
Window.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EDC.DesignPatterm.Decorator
{
/// <summary>
/// 窗体类:具体构件类
/// </summary>
public class Window : Component
{
public override void Display()
{
Console.WriteLine("显示窗体!");
}
}
/// <summary>
/// 文本框类:具体构件类
/// </summary>
public class TextBox : Component
{
public override void Display()
{
Console.WriteLine("显示文本框!");
}
}
/// <summary>
/// 列表框类:具体构件类
/// </summary>
public class ListBox : Component
{
public override void Display()
{
Console.WriteLine("显示列表框!");
}
}
}