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
- controlskin.cs
- WindowsAuthenticationModule.cs
- CapiNative.cs
- FixedLineResult.cs
- userdatakeys.cs
- Input.cs
- MetadataConversionError.cs
- DbTransaction.cs
- FileDialogCustomPlacesCollection.cs
- RuntimeEnvironment.cs
- RSAOAEPKeyExchangeDeformatter.cs
- SplitterDesigner.cs
- InheritedPropertyChangedEventArgs.cs
- IriParsingElement.cs
- FixedSOMContainer.cs
- EmptyQuery.cs
- Soap12FormatExtensions.cs
- XLinq.cs
- HtmlInputFile.cs
- AssemblyBuilderData.cs
- PointAnimationUsingPath.cs
- WebPartZoneBase.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- TypeNameConverter.cs
- XsdBuildProvider.cs
- CodeCatchClauseCollection.cs
- baseshape.cs
- infer.cs
- TimeSpanMinutesConverter.cs
- RequestQueue.cs
- PersianCalendar.cs
- WeakReadOnlyCollection.cs
- XmlMembersMapping.cs
- RichTextBoxConstants.cs
- StructuredProperty.cs
- DataProviderNameConverter.cs
- SvcFileManager.cs
- Point3DCollectionConverter.cs
- ParagraphVisual.cs
- grammarelement.cs
- DataRecordInternal.cs
- AvTrace.cs
- DesignerVerbCollection.cs
- CodeIdentifiers.cs
- ToolboxCategory.cs
- _UncName.cs
- SerialReceived.cs
- SelectedGridItemChangedEvent.cs
- BindValidationContext.cs
- InfoCardBaseException.cs
- ControlValuePropertyAttribute.cs
- iisPickupDirectory.cs
- HyperLink.cs
- ErrorRuntimeConfig.cs
- LiteralTextParser.cs
- ImageClickEventArgs.cs
- ZipFileInfoCollection.cs
- ConditionalBranch.cs
- XmlCompatibilityReader.cs
- AutomationElementIdentifiers.cs
- XmlSchemaParticle.cs
- ByteRangeDownloader.cs
- Memoizer.cs
- Composition.cs
- KerberosReceiverSecurityToken.cs
- HebrewCalendar.cs
- AbsoluteQuery.cs
- WindowPattern.cs
- ExpressionEditorSheet.cs
- SoapSchemaImporter.cs
- DynamicUpdateCommand.cs
- WebServiceAttribute.cs
- Attributes.cs
- ComponentChangingEvent.cs
- DynamicQueryableWrapper.cs
- PropertyInformation.cs
- Hyperlink.cs
- NopReturnReader.cs
- StateBag.cs
- DecimalFormatter.cs
- PixelShader.cs
- GenericArgumentsUpdater.cs
- XmlAttributeCollection.cs
- NameTable.cs
- AssemblyInfo.cs
- SqlStatistics.cs
- FileUtil.cs
- ConfigXmlAttribute.cs
- BrowserCapabilitiesCompiler.cs
- DataService.cs
- RectConverter.cs
- UrlMappingsModule.cs
- TimeoutStream.cs
- SqlCommandAsyncResult.cs
- CodeTypeMemberCollection.cs
- ImageCollectionCodeDomSerializer.cs
- StandardBindingImporter.cs
- ButtonStandardAdapter.cs
- UpDownEvent.cs
- TextServicesContext.cs