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

📄 productlist.cs

📁 C#设计模式随书源码-Bridge模式实例程序
💻 CS
字号:
using System;
using System.Windows.Forms;
namespace BasicBridge
{
	/// <summary>
	/// Summary description for ProductList.
	/// </summary>
	//A VisList class for the ListBox
	public class ProductList : VisList 	{
		private ListBox list;
		//-----
		public ProductList(ListBox lst) 		{
			list = lst;
		}
		//-----
		public void addLine(Product p) {
			list.Items.Add (p.getName() );
		}
		//-----
		public void removeLine(int num) {
			if(num >=0 && num < list.Items.Count ){
				list.Items.Remove (num);
			}
		}
	}
}

⌨️ 快捷键说明

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