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

📄 customiviewcontent.cs

📁 全功能c#编译器
💻 CS
字号:
using System;
using System.Drawing;
using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Gui;

namespace MyPlugin {
	
	public class MyCustomViewContent : AbstractViewContent
	{
		Panel panel     = new Panel();
		Label testLabel = new Label();
		
		public override Control Control {
			get {
				return panel;
			}
		}
		
		// must be overriden, but *may* be useless for
		// 'custom'  views
		public override bool IsReadOnly {
			get {
				return false;
			}
		}
		
		public override void Save(string fileName)
		{
		}
		
		public override void Load(string fileName)
		{
		}
		
		// the redraw should get new add-in tree information
		// and update the view, the language or layout manager
		// may have changed.
		public override void RedrawContent()
		{
		}
		
		// The Dispose must be overriden, there is no default implementation
		// (because in this case I wouldn't override dipose, I would forget it ...)
		public override void Dispose()
		{
			testLabel.Dispose();
			panel.Dispose();
		}
		
		
		
		public MyCustomViewContent()
		{
			testLabel.Text     = "Hello World!";
			testLabel.Location = new Point(8, 8);
			panel.Controls.Add(testLabel);
			
			TitleName = "can't give good names";
		}
		
	}

}

⌨️ 快捷键说明

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