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
- selecteditemcollection.cs
- RequestNavigateEventArgs.cs
- DataRelation.cs
- UntrustedRecipientException.cs
- JsonReaderDelegator.cs
- DataGridColumnCollectionEditor.cs
- ListInitExpression.cs
- HttpRuntimeSection.cs
- DiscoveryMessageSequence.cs
- SqlDataRecord.cs
- CompressedStack.cs
- CellCreator.cs
- MimeTypePropertyAttribute.cs
- ProviderConnectionPoint.cs
- WebPartZoneCollection.cs
- ListBoxChrome.cs
- OleDbPropertySetGuid.cs
- ProcessInfo.cs
- SelectionEditor.cs
- QilScopedVisitor.cs
- ToolStripPanelRow.cs
- ProfilePropertySettingsCollection.cs
- CodeArrayCreateExpression.cs
- PositiveTimeSpanValidator.cs
- PersonalizablePropertyEntry.cs
- PingReply.cs
- Expression.cs
- NoClickablePointException.cs
- GetParentChain.cs
- SecurityTokenProviderContainer.cs
- EditorZone.cs
- ManualResetEvent.cs
- XmlTextWriter.cs
- ExclusiveTcpListener.cs
- DrawingAttributes.cs
- WebPartConnectVerb.cs
- DbConnectionPool.cs
- CultureData.cs
- Debug.cs
- LogicalTreeHelper.cs
- StringDictionary.cs
- Fonts.cs
- FixedSOMImage.cs
- DataSysAttribute.cs
- SizeKeyFrameCollection.cs
- ObjectDataSourceEventArgs.cs
- SqlException.cs
- WebPageTraceListener.cs
- DataSet.cs
- IPHostEntry.cs
- BadImageFormatException.cs
- CacheAxisQuery.cs
- Inflater.cs
- UserPersonalizationStateInfo.cs
- MappableObjectManager.cs
- BamlLocalizableResource.cs
- XmlLoader.cs
- RewritingProcessor.cs
- DataGridHeaderBorder.cs
- SelectionPatternIdentifiers.cs
- InheritanceContextHelper.cs
- AdCreatedEventArgs.cs
- HtmlFormParameterWriter.cs
- CellParagraph.cs
- AdPostCacheSubstitution.cs
- CqlBlock.cs
- Transactions.cs
- PropertyEmitterBase.cs
- SignatureToken.cs
- SslStream.cs
- HtmlControlDesigner.cs
- StrokeNode.cs
- CookielessHelper.cs
- DesignerAdRotatorAdapter.cs
- TextBoxAutoCompleteSourceConverter.cs
- PhysicalFontFamily.cs
- ExtenderControl.cs
- XamlToRtfWriter.cs
- DesignBindingConverter.cs
- MouseEvent.cs
- TemplatePropertyEntry.cs
- LinqDataSourceHelper.cs
- RtfToXamlReader.cs
- ContainerSelectorGlyph.cs
- ExpanderAutomationPeer.cs
- Metafile.cs
- CommandLineParser.cs
- XmlSchemaParticle.cs
- CryptoApi.cs
- ReferentialConstraint.cs
- OrderedDictionary.cs
- RulePatternOps.cs
- XmlSchemaGroupRef.cs
- Int64Storage.cs
- PrePostDescendentsWalker.cs
- CngKey.cs
- CompositeCollectionView.cs
- DrawToolTipEventArgs.cs
- GlyphTypeface.cs
- OperationContext.cs