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
- SelectedGridItemChangedEvent.cs
- Preprocessor.cs
- MultipleCopiesCollection.cs
- OdbcParameterCollection.cs
- _FtpDataStream.cs
- PropertyValueUIItem.cs
- SessionEndedEventArgs.cs
- XmlLanguage.cs
- AlgoModule.cs
- TdsParameterSetter.cs
- WorkflowDurableInstance.cs
- MetadataArtifactLoader.cs
- CallId.cs
- Serializer.cs
- OdbcParameterCollection.cs
- cookie.cs
- WindowsMenu.cs
- DatePickerAutomationPeer.cs
- FtpWebRequest.cs
- CodeGroup.cs
- EnvironmentPermission.cs
- SimpleBitVector32.cs
- HotCommands.cs
- TextChange.cs
- Size3D.cs
- ChildTable.cs
- QilFactory.cs
- StorageMappingItemCollection.cs
- BoundField.cs
- GridViewDeletedEventArgs.cs
- XmlNavigatorStack.cs
- MultiTrigger.cs
- PageCache.cs
- ObjectDataSourceView.cs
- HyperlinkAutomationPeer.cs
- WS2007FederationHttpBinding.cs
- LocalizableAttribute.cs
- SecuritySessionServerSettings.cs
- RedistVersionInfo.cs
- TrackBarRenderer.cs
- DataObjectAttribute.cs
- EdmMember.cs
- SafeViewOfFileHandle.cs
- ActivityInstanceMap.cs
- WinInetCache.cs
- ConfigUtil.cs
- RawContentTypeMapper.cs
- RootDesignerSerializerAttribute.cs
- FlowDecisionDesigner.xaml.cs
- ParseChildrenAsPropertiesAttribute.cs
- DataControlField.cs
- RoutedEventArgs.cs
- ResourceAttributes.cs
- WebServiceClientProxyGenerator.cs
- HebrewNumber.cs
- DbParameterCollection.cs
- XmlElementList.cs
- SqlCachedBuffer.cs
- PropertyCollection.cs
- DropSource.cs
- InvalidEnumArgumentException.cs
- PointF.cs
- TableCell.cs
- Clock.cs
- PointCollectionConverter.cs
- SelectionProviderWrapper.cs
- ConfigurationException.cs
- DatePickerDateValidationErrorEventArgs.cs
- HiddenField.cs
- SplineKeyFrames.cs
- OdbcConnection.cs
- DrawingVisual.cs
- OleCmdHelper.cs
- IdentityReference.cs
- TdsParserSessionPool.cs
- WebContext.cs
- DataTablePropertyDescriptor.cs
- GridViewRowPresenter.cs
- EventEntry.cs
- CharKeyFrameCollection.cs
- filewebresponse.cs
- ApplicationSecurityInfo.cs
- AdvancedBindingPropertyDescriptor.cs
- SecurityUtils.cs
- SingleBodyParameterMessageFormatter.cs
- LogicalTreeHelper.cs
- ConfigurationValues.cs
- RouteParser.cs
- SplineKeyFrames.cs
- DataSourceCollectionBase.cs
- ProcessManager.cs
- ScrollEvent.cs
- StrongNamePublicKeyBlob.cs
- SchemaEntity.cs
- Vector3DIndependentAnimationStorage.cs
- ToolStripDesignerAvailabilityAttribute.cs
- XmlCharCheckingReader.cs
- PointAnimationBase.cs
- UniformGrid.cs
- COMException.cs