Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.WorkflowServices / System / Workflow / Activities / Design / ServiceContractViewControl.cs / 1305376 / ServiceContractViewControl.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace System.Workflow.Activities.Design
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.ServiceModel;
internal partial class ServiceContractViewControl : ListItemViewControl
{
public ServiceContractViewControl()
{
InitializeComponent();
}
public override object Item
{
set
{
if (value == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value");
}
base.Item = value;
ServiceContractListItem listItem = value as ServiceContractListItem;
if (!string.IsNullOrEmpty(listItem.Name))
{
this.contractNameLabel.Text = listItem.Name;
if (listItem.IsCustomContract)
{
this.contractIconPictureBox.Image = ImageResources.Contract;
}
else
{
this.contractIconPictureBox.Image = ImageResources.ImportedContract;
}
}
}
}
public override void UpdateView()
{
bool focused = (this.DrawItemState & DrawItemState.Focus) == DrawItemState.Focus;
bool selected = (this.DrawItemState & DrawItemState.Selected) == DrawItemState.Selected;
this.Height = this.contractNameLabel.Height;
if (focused && selected)
{
this.backgroundPanel.BaseColor = System.Drawing.SystemColors.Window;
this.backgroundPanel.LightingColor = Color.FromArgb(213, 246, 255);
this.backgroundPanel.Glossy = true;
this.backgroundPanel.Radius = 1;
this.backgroundPanel.BorderColor = Color.FromArgb(155, 230, 255);
}
else if (selected)
{
this.backgroundPanel.BaseColor = System.Drawing.SystemColors.Window;
this.backgroundPanel.LightingColor = Color.Gainsboro;
this.backgroundPanel.Glossy = true;
this.backgroundPanel.Radius = 1;
this.backgroundPanel.BorderColor = Color.Gainsboro;
}
else
{
this.backgroundPanel.BaseColor = Color.Transparent;
this.backgroundPanel.LightingColor = Color.Transparent;
this.backgroundPanel.Glossy = false;
this.backgroundPanel.BorderColor = Color.Transparent;
}
base.UpdateView();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SemanticResultKey.cs
- DataControlField.cs
- DbConnectionPoolIdentity.cs
- CodeDelegateInvokeExpression.cs
- StrongName.cs
- TraceUtility.cs
- OutOfMemoryException.cs
- DictationGrammar.cs
- _SecureChannel.cs
- QueryRewriter.cs
- BlockCollection.cs
- LinqDataView.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- XamlPoint3DCollectionSerializer.cs
- FileIOPermission.cs
- RemoteWebConfigurationHostStream.cs
- QuadraticBezierSegment.cs
- SafeNativeMethods.cs
- CodeTryCatchFinallyStatement.cs
- LiteralControl.cs
- XmlQualifiedName.cs
- DataGridViewRow.cs
- DocumentGridContextMenu.cs
- DrawingContextDrawingContextWalker.cs
- DefaultAuthorizationContext.cs
- ImmComposition.cs
- TableProvider.cs
- DodSequenceMerge.cs
- JournalEntryListConverter.cs
- ConnectionInterfaceCollection.cs
- ProcessProtocolHandler.cs
- AttributeSetAction.cs
- BrowserTree.cs
- CompilationUtil.cs
- StorageMappingItemLoader.cs
- CollectionType.cs
- TcpSocketManager.cs
- TableColumn.cs
- WebPartMinimizeVerb.cs
- Events.cs
- TextSpan.cs
- ContentFilePart.cs
- DefaultTraceListener.cs
- FontUnit.cs
- wpf-etw.cs
- KerberosSecurityTokenAuthenticator.cs
- FontStyleConverter.cs
- PageCatalogPart.cs
- TreeViewDesigner.cs
- TypeNameConverter.cs
- ConfigurationManagerInternalFactory.cs
- BrowserCapabilitiesCompiler.cs
- TraceContext.cs
- FrameAutomationPeer.cs
- ReferentialConstraintRoleElement.cs
- CssClassPropertyAttribute.cs
- TransactionManager.cs
- ProfileEventArgs.cs
- ParallelTimeline.cs
- SerialPort.cs
- XmlSchemaAnnotation.cs
- PageParserFilter.cs
- ConvertEvent.cs
- QilInvoke.cs
- ObjectMaterializedEventArgs.cs
- TransformerConfigurationWizardBase.cs
- ListItemCollection.cs
- ProviderSettings.cs
- XNameConverter.cs
- FormatterServices.cs
- WebPartsPersonalizationAuthorization.cs
- AtomicFile.cs
- DataGridDetailsPresenterAutomationPeer.cs
- GroupedContextMenuStrip.cs
- DataKey.cs
- ListViewCancelEventArgs.cs
- Drawing.cs
- FileSystemWatcher.cs
- TreeNodeCollection.cs
- Wildcard.cs
- SelectQueryOperator.cs
- PackageRelationship.cs
- ElementUtil.cs
- SocketAddress.cs
- TabControl.cs
- ButtonBaseAutomationPeer.cs
- UIElementParagraph.cs
- MethodCallConverter.cs
- OleDbInfoMessageEvent.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- BevelBitmapEffect.cs
- PeerConnector.cs
- InputScopeManager.cs
- DigestTraceRecordHelper.cs
- ScrollChangedEventArgs.cs
- CapabilitiesRule.cs
- PageVisual.cs
- TransformationRules.cs
- StrokeCollectionConverter.cs
- HtmlGenericControl.cs