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
- AutomationEventArgs.cs
- CodeObject.cs
- LinkConverter.cs
- TextPattern.cs
- StylusPointProperties.cs
- altserialization.cs
- AssociationTypeEmitter.cs
- DataRowChangeEvent.cs
- DataPagerField.cs
- IncrementalHitTester.cs
- WorkflowDesigner.cs
- SafeThreadHandle.cs
- GlobalEventManager.cs
- TextPointerBase.cs
- SchemaManager.cs
- StorageConditionPropertyMapping.cs
- SchemaTypeEmitter.cs
- PeerToPeerException.cs
- ArgumentException.cs
- SetState.cs
- AsyncCodeActivity.cs
- TabItemAutomationPeer.cs
- FileCodeGroup.cs
- _CommandStream.cs
- _DomainName.cs
- ValueSerializer.cs
- NativeCppClassAttribute.cs
- AssemblyAttributes.cs
- KeyBinding.cs
- CombinedGeometry.cs
- RotateTransform3D.cs
- ResourceDictionary.cs
- VerticalAlignConverter.cs
- NullRuntimeConfig.cs
- ErrorFormatterPage.cs
- DoubleLinkListEnumerator.cs
- DataSet.cs
- SafeEventLogWriteHandle.cs
- SmtpDigestAuthenticationModule.cs
- BooleanAnimationUsingKeyFrames.cs
- TextSelection.cs
- OverrideMode.cs
- WebPartDisplayMode.cs
- DecimalSumAggregationOperator.cs
- DataRecordInfo.cs
- FrugalMap.cs
- ApplicationServicesHostFactory.cs
- XslException.cs
- ListViewSortEventArgs.cs
- ParseHttpDate.cs
- FloaterBaseParaClient.cs
- Utils.cs
- LocatorManager.cs
- ConnectionPoint.cs
- UnmanagedMemoryStream.cs
- FileDetails.cs
- InfoCard.cs
- FrameworkElement.cs
- XmlNodeReader.cs
- ListCardsInFileRequest.cs
- SecurityKeyUsage.cs
- Cell.cs
- PhysicalOps.cs
- HttpModulesSection.cs
- XPathChildIterator.cs
- Ipv6Element.cs
- PolicyLevel.cs
- ItemCheckEvent.cs
- VBCodeProvider.cs
- CaseCqlBlock.cs
- XPathPatternParser.cs
- VerificationException.cs
- ScrollProviderWrapper.cs
- WorkflowInstanceExtensionManager.cs
- PasswordTextContainer.cs
- CodeTypeReference.cs
- ButtonBase.cs
- VirtualDirectoryMapping.cs
- PropertyRecord.cs
- PrtCap_Base.cs
- ExpressionWriter.cs
- Form.cs
- ViewManager.cs
- BackgroundFormatInfo.cs
- Guid.cs
- DefaultTextStore.cs
- EtwTrace.cs
- SimpleRecyclingCache.cs
- CatalogZone.cs
- DbConnectionOptions.cs
- ButtonFieldBase.cs
- Pens.cs
- XPathAncestorQuery.cs
- TreeViewBindingsEditorForm.cs
- HtmlEncodedRawTextWriter.cs
- UniqueIdentifierService.cs
- XmlSchemaComplexContentExtension.cs
- ListView.cs
- ParameterRetriever.cs
- OdbcEnvironmentHandle.cs