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

📄 assemblyscoutoptionpanel.cs

📁 全功能c#编译器
💻 CS
字号:
// <file>
//     <copyright see="prj:///doc/copyright.txt"/>
//     <license see="prj:///doc/license.txt"/>
//     <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
//     <version value="$version"/>
// </file>

using System;
using System.IO;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;

using ICSharpCode.SharpDevelop.Internal.ExternalTool;
using ICSharpCode.Core.AddIns.Codons;
using ICSharpCode.Core.Properties;
using ICSharpCode.SharpDevelop.Gui.Components;
using ICSharpCode.Core.Services;
using ICSharpCode.Core.AddIns;
using ICSharpCode.SharpDevelop.Gui.Dialogs;

namespace ICSharpCode.SharpDevelop.AddIns.AssemblyScout
{
	public class AssemblyScoutOptionPanel : AbstractOptionPanel
	{
		Control[] combos = new Control[] {};
		
		public override void LoadPanelContents()
		{
			SetupFromXml(Path.Combine(PropertyService.DataDirectory, 
			                          @"resources\panels\AssemblyScoutOptions.xfrm"));
			
			combos = new Control[] {ControlDictionary["privateTypesBox"],
											  ControlDictionary["internalTypesBox"],
											  ControlDictionary["privateMembersBox"],
											  ControlDictionary["internalMembersBox"]};
			
			foreach(ComboBox combo in combos) {
				combo.Items.Add(StringParserService.Parse("${res:Dialog.Options.IDEOptions.AssemblyScout.Show}"));
				combo.Items.Add(StringParserService.Parse("${res:Dialog.Options.IDEOptions.AssemblyScout.GreyOut}"));
				combo.Items.Add(StringParserService.Parse("${res:Dialog.Options.IDEOptions.AssemblyScout.Hide}"));
				
				combo.SelectedIndex = PropertyService.GetProperty("AddIns.AssemblyScout." + combo.Name, 1);
			}
			
			((CheckBox)ControlDictionary["showReturnTypesBox"]).Checked     
				= PropertyService.GetProperty("AddIns.AssemblyScout.ShowReturnTypes", true);
			((CheckBox)ControlDictionary["showResourcePreviewBox"]).Checked 
				= PropertyService.GetProperty("AddIns.AssemblyScout.ShowResPreview", true);
			((CheckBox)ControlDictionary["showSpecialMethodsBox"]).Checked 
				= PropertyService.GetProperty("AddIns.AssemblyScout.ShowSpecialMethods", true);
		}
		
		public override bool StorePanelContents()
		{
			PropertyService.SetProperty("AddIns.AssemblyScout.ShowReturnTypes", ((CheckBox)ControlDictionary["showReturnTypesBox"]).Checked);
			PropertyService.SetProperty("AddIns.AssemblyScout.ShowResPreview",  ((CheckBox)ControlDictionary["showResourcePreviewBox"]).Checked);
			PropertyService.SetProperty("AddIns.AssemblyScout.ShowSpecialMethods", ((CheckBox)ControlDictionary["showSpecialMethodsBox"]).Checked);
			
			foreach(ComboBox combo in combos) {
				PropertyService.SetProperty("AddIns.AssemblyScout." + combo.Name, combo.SelectedIndex);
			}
			
			return true;
		}
	}
}

⌨️ 快捷键说明

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