Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / TrayIconDesigner.cs / 1 / TrayIconDesigner.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="System.Windows.Forms.Design.NotifyIconDesigner..ctor()")]
namespace System.Windows.Forms.Design {
using Microsoft.Win32;
using System;
using System.Design;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Windows.Forms;
///
///
/// This is the designer for OpenFileDialog components.
///
internal class NotifyIconDesigner : ComponentDesigner {
private DesignerActionListCollection _actionLists;
///
///
public override void InitializeNewComponent(IDictionary defaultValues) {
base.InitializeNewComponent(defaultValues);
NotifyIcon icon = (NotifyIcon)Component;
icon.Visible = true;
}
public override DesignerActionListCollection ActionLists {
get {
if (_actionLists == null) {
_actionLists = new DesignerActionListCollection();
_actionLists.Add(new NotifyIconActionList(this));
}
return _actionLists;
}
}
}
internal class NotifyIconActionList : DesignerActionList {
private NotifyIconDesigner _designer;
public NotifyIconActionList(NotifyIconDesigner designer) : base(designer.Component) {
_designer = designer;
}
public void ChooseIcon() {
EditorServiceContext.EditValue(_designer, Component, "Icon");
}
public override DesignerActionItemCollection GetSortedActionItems() {
DesignerActionItemCollection items = new DesignerActionItemCollection();
items.Add(new DesignerActionMethodItem(this, "ChooseIcon", SR.GetString(SR.ChooseIconDisplayName), true));
return items;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HandleDictionary.cs
- StringConcat.cs
- NestPullup.cs
- TextRangeEditLists.cs
- PropertyEntry.cs
- ScrollContentPresenter.cs
- NullToBooleanConverter.cs
- ContainerCodeDomSerializer.cs
- Condition.cs
- ClientApiGenerator.cs
- AlgoModule.cs
- MenuItem.cs
- SBCSCodePageEncoding.cs
- TextEditorDragDrop.cs
- XmlNamespaceDeclarationsAttribute.cs
- ElasticEase.cs
- RecognizerBase.cs
- ConfigXmlElement.cs
- Common.cs
- Size3DValueSerializer.cs
- CroppedBitmap.cs
- SafeWaitHandle.cs
- KeySpline.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- XmlCollation.cs
- RenderingBiasValidation.cs
- TableLayoutPanelCellPosition.cs
- SqlTypesSchemaImporter.cs
- ValidationEventArgs.cs
- ProvidersHelper.cs
- PathFigureCollectionConverter.cs
- xmlfixedPageInfo.cs
- LinqDataView.cs
- WorkflowOperationContext.cs
- MissingManifestResourceException.cs
- StrongNameMembershipCondition.cs
- HtmlControlPersistable.cs
- BatchWriter.cs
- ConnectionPoolManager.cs
- FamilyCollection.cs
- HandleExceptionArgs.cs
- ContentAlignmentEditor.cs
- SecurityResources.cs
- WindowsTooltip.cs
- Stackframe.cs
- AddInBase.cs
- GPStream.cs
- NullableConverter.cs
- StylusCaptureWithinProperty.cs
- ActivityExecutionContext.cs
- TypeElement.cs
- System.Data.OracleClient_BID.cs
- CompositeCollection.cs
- EntityDataSourceReferenceGroup.cs
- FieldToken.cs
- DesignOnlyAttribute.cs
- ClientScriptItemCollection.cs
- AccessControlList.cs
- XmlSerializerNamespaces.cs
- SmiMetaDataProperty.cs
- PreviewPrintController.cs
- MgmtConfigurationRecord.cs
- XmlSchemaSimpleTypeList.cs
- HashMembershipCondition.cs
- ListSourceHelper.cs
- HttpModuleCollection.cs
- mil_sdk_version.cs
- XmlSchemaSimpleType.cs
- PropertyConverter.cs
- MimeTypeMapper.cs
- SpecularMaterial.cs
- CommandEventArgs.cs
- HtmlEmptyTagControlBuilder.cs
- AsyncCompletedEventArgs.cs
- ReadOnlyPropertyMetadata.cs
- ISCIIEncoding.cs
- Image.cs
- ExpressionBuilder.cs
- StringFreezingAttribute.cs
- CharacterHit.cs
- TagPrefixInfo.cs
- ISO2022Encoding.cs
- TdsParserStaticMethods.cs
- ConstructorBuilder.cs
- DesignerVerb.cs
- RegisteredExpandoAttribute.cs
- MailAddress.cs
- EditorPartChrome.cs
- DataListCommandEventArgs.cs
- MobileRedirect.cs
- CommandBindingCollection.cs
- DisposableCollectionWrapper.cs
- ThreadStateException.cs
- UnlockCardRequest.cs
- ConfigurationManager.cs
- HtmlEncodedRawTextWriter.cs
- PathFigureCollection.cs
- DynamicResourceExtension.cs
- SystemIPv4InterfaceProperties.cs
- ZipFileInfo.cs