Code:
/ FX-1434 / FX-1434 / 1.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
- TableMethodGenerator.cs
- EdmValidator.cs
- EraserBehavior.cs
- BitmapFrameEncode.cs
- PackageFilter.cs
- UpnEndpointIdentityExtension.cs
- CategoryGridEntry.cs
- CustomTypeDescriptor.cs
- HttpProxyCredentialType.cs
- M3DUtil.cs
- DBAsyncResult.cs
- MTConfigUtil.cs
- SchemaTypeEmitter.cs
- SByteConverter.cs
- typedescriptorpermissionattribute.cs
- DataGridViewMethods.cs
- CompositionAdorner.cs
- InertiaExpansionBehavior.cs
- DefaultCommandExtensionCallback.cs
- OdbcRowUpdatingEvent.cs
- wmiprovider.cs
- MsmqInputSessionChannel.cs
- ObjectTag.cs
- TemplateBuilder.cs
- PerformanceCounterCategory.cs
- PropertyFilter.cs
- UnsafeNativeMethods.cs
- ColumnWidthChangingEvent.cs
- PerformanceCounters.cs
- OleCmdHelper.cs
- RecordManager.cs
- XmlSchemaGroupRef.cs
- ImageFormat.cs
- CachedTypeface.cs
- MetadataArtifactLoaderFile.cs
- CqlBlock.cs
- CodeAttributeDeclaration.cs
- ActivationServices.cs
- SharedPersonalizationStateInfo.cs
- Intellisense.cs
- HMACMD5.cs
- HttpFileCollection.cs
- DropShadowEffect.cs
- ForwardPositionQuery.cs
- UserPrincipalNameElement.cs
- httpserverutility.cs
- TransformValueSerializer.cs
- ToolStripPanel.cs
- LayoutExceptionEventArgs.cs
- TcpChannelHelper.cs
- ChainOfResponsibility.cs
- TextClipboardData.cs
- Identifier.cs
- GeometryHitTestParameters.cs
- XamlPointCollectionSerializer.cs
- SafeFileMappingHandle.cs
- EntityDataSourceWrapper.cs
- CryptoStream.cs
- SecurityDocument.cs
- SafeEventLogWriteHandle.cs
- WebPartUtil.cs
- HGlobalSafeHandle.cs
- CacheMemory.cs
- HeaderCollection.cs
- BitmapScalingModeValidation.cs
- JsonFormatReaderGenerator.cs
- TextDecorationUnitValidation.cs
- ConditionalAttribute.cs
- ForwardPositionQuery.cs
- XPathPatternBuilder.cs
- Buffer.cs
- ProvidePropertyAttribute.cs
- CompositeFontFamily.cs
- RuleSettings.cs
- EmitterCache.cs
- ViewService.cs
- Timeline.cs
- BaseUriWithWildcard.cs
- XmlSchemaNotation.cs
- Translator.cs
- SelectionPatternIdentifiers.cs
- HandlerMappingMemo.cs
- HtmlSelect.cs
- ToolZoneDesigner.cs
- PrimitiveCodeDomSerializer.cs
- HWStack.cs
- WindowsFormsHelpers.cs
- SelectionList.cs
- RTLAwareMessageBox.cs
- ApplicationException.cs
- KerberosTicketHashIdentifierClause.cs
- PopupEventArgs.cs
- BitmapEffectState.cs
- FileDialog.cs
- HttpListener.cs
- PathTooLongException.cs
- ExtentCqlBlock.cs
- SpellCheck.cs
- ToolStripItemEventArgs.cs
- XmlDocumentFragment.cs