generaloptions.cs

来自「c#源代码」· CS 代码 · 共 41 行

CS
41
字号
// <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.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

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


namespace ICSharpCode.SharpDevelop.FormDesigner.Gui.OptionPanels
{
	public class GeneralOptionsPanel : AbstractOptionPanel
	{
		public override void LoadPanelContents()
		{
			SetupFromXml(Path.Combine(PropertyService.DataDirectory, 
			                          @"resources\panels\WindowsFormsGeneralOptions.xfrm"));
			((CheckBox)ControlDictionary["sortAlphabeticalCheckBox"]).Checked = PropertyService.GetProperty("FormsDesigner.DesignerOptions.PropertyGridSortAlphabetical", false);
			((CheckBox)ControlDictionary["initializeComponentsReadOnlyCheckBox"]).Checked = PropertyService.GetProperty("FormsDesigner.DesignerOptions.InitializeComponentsReadOnly", false);
		}
		
		public override bool StorePanelContents()
		{
			PropertyService.SetProperty("FormsDesigner.DesignerOptions.PropertyGridSortAlphabetical", ((CheckBox)ControlDictionary["sortAlphabeticalCheckBox"]).Checked);
			PropertyService.SetProperty("FormsDesigner.DesignerOptions.InitializeComponentsReadOnly", ((CheckBox)ControlDictionary["initializeComponentsReadOnlyCheckBox"]).Checked);
			return true;
		}
	}
}

⌨️ 快捷键说明

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