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

📄 imageviewcontent.cs

📁 SharpDevelop2.0.0 c#开发免费工具
💻 CS
字号:
/*
 * Created by SharpDevelop.
 * User: Daniel Grunwald
 * Date: 19.10.2005
 * Time: 21:43
 */

using System;
using System.IO;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;

namespace ImageViewer
{
	public class ImageViewContent : AbstractViewContent
	{
		PictureBox box = new PictureBox();
		public override Control Control {
			get {
				return box;
			}
		}
		public override string TabPageText {
			get {
				return "Image Viewer";
			}
		}
		public override void Load(string fileName) {
			this.IsDirty = false;
			this.FileName = fileName;
			this.TitleName = Path.GetFileName(fileName);
			box.SizeMode = PictureBoxSizeMode.Zoom;
			box.Load(fileName);
		}
		
		public override void Save(string fileName) {
			this.IsDirty = false;
			this.FileName = fileName;
			this.TitleName = Path.GetFileName(fileName);
			box.Image.Save(fileName);
		}
		
		public override bool IsReadOnly {
			get {
				return (File.GetAttributes(this.FileName)
				        & FileAttributes.ReadOnly) != 0;
			}
		}
	}
}

⌨️ 快捷键说明

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