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
- DataGridCommandEventArgs.cs
- ProviderUtil.cs
- XmlSchemaSimpleTypeRestriction.cs
- Util.cs
- ByteStream.cs
- ClientEventManager.cs
- CompletedAsyncResult.cs
- BitmapEffectGroup.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- ErrorHandler.cs
- TextBox.cs
- TableCellCollection.cs
- SchemaInfo.cs
- ChildTable.cs
- DefaultEvaluationContext.cs
- WinEventHandler.cs
- ToolStripGrip.cs
- EntityDataSourceDataSelection.cs
- MobileControlDesigner.cs
- RemoteArgument.cs
- WSDualHttpBindingCollectionElement.cs
- HttpCachePolicyElement.cs
- GetPageNumberCompletedEventArgs.cs
- ParentQuery.cs
- SiteOfOriginPart.cs
- RowTypePropertyElement.cs
- TemplateParser.cs
- IncrementalHitTester.cs
- ServiceModelConfigurationSectionGroup.cs
- XmlNavigatorStack.cs
- OdbcDataReader.cs
- SortDescriptionCollection.cs
- ActivityDesigner.cs
- TextBlock.cs
- FakeModelPropertyImpl.cs
- DataGridHelper.cs
- uribuilder.cs
- ButtonBaseAutomationPeer.cs
- ImmutableObjectAttribute.cs
- PersonalizationDictionary.cs
- RestrictedTransactionalPackage.cs
- ListDictionaryInternal.cs
- ReferenceSchema.cs
- GcHandle.cs
- RootDesignerSerializerAttribute.cs
- SettingsAttributeDictionary.cs
- PackageRelationshipSelector.cs
- XmlReaderSettings.cs
- Latin1Encoding.cs
- Classification.cs
- MarshalByRefObject.cs
- FtpRequestCacheValidator.cs
- EventMappingSettingsCollection.cs
- CollectionViewGroupRoot.cs
- HttpRuntimeSection.cs
- BinaryExpression.cs
- TextChangedEventArgs.cs
- HeaderedItemsControl.cs
- ComponentDispatcherThread.cs
- SaveWorkflowAsyncResult.cs
- AppearanceEditorPart.cs
- ChannelSinkStacks.cs
- HttpCachePolicyWrapper.cs
- PropertyInfo.cs
- XPathNavigator.cs
- ButtonRenderer.cs
- SqlDataRecord.cs
- TimeoutException.cs
- HttpPostClientProtocol.cs
- ObjectDataSourceWizardForm.cs
- OracleColumn.cs
- WebServiceMethodData.cs
- TypeSystem.cs
- EventHandlerList.cs
- RemotingException.cs
- PersistChildrenAttribute.cs
- EmptyEnumerator.cs
- ResourceReferenceKeyNotFoundException.cs
- XmlConvert.cs
- UserControlParser.cs
- Profiler.cs
- Msmq3PoisonHandler.cs
- XmlValidatingReaderImpl.cs
- ResourceIDHelper.cs
- CodeMemberEvent.cs
- HttpCookieCollection.cs
- ImageMetadata.cs
- HMACRIPEMD160.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- RbTree.cs
- CalculatedColumn.cs
- GridView.cs
- TTSVoice.cs
- List.cs
- IPGlobalProperties.cs
- BuildDependencySet.cs
- ManagedIStream.cs
- CustomErrorCollection.cs
- SqlRemoveConstantOrderBy.cs
- SchemaImporter.cs