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
- recordstatefactory.cs
- securitycriticaldataClass.cs
- CommandArguments.cs
- XmlSchemaAttribute.cs
- HandledEventArgs.cs
- HebrewCalendar.cs
- WebBrowserEvent.cs
- WinEventQueueItem.cs
- MachineKey.cs
- MsmqOutputMessage.cs
- SynchronizationLockException.cs
- PnrpPermission.cs
- UniqueConstraint.cs
- XmlWrappingWriter.cs
- nulltextcontainer.cs
- SignatureHelper.cs
- StaticDataManager.cs
- ValidationEventArgs.cs
- DrawTreeNodeEventArgs.cs
- NonParentingControl.cs
- TraceHandlerErrorFormatter.cs
- LogicalTreeHelper.cs
- FormatSettings.cs
- DocumentGridContextMenu.cs
- PrintPageEvent.cs
- PolicyLevel.cs
- BatchParser.cs
- WebPartConnectionCollection.cs
- IfAction.cs
- FormViewDeleteEventArgs.cs
- BamlResourceDeserializer.cs
- EventSourceCreationData.cs
- ListChangedEventArgs.cs
- IndicCharClassifier.cs
- ListMarkerSourceInfo.cs
- DataControlField.cs
- AuthenticatingEventArgs.cs
- HtmlInputHidden.cs
- EventMappingSettings.cs
- SplitterCancelEvent.cs
- SettingsSection.cs
- BitmapPalette.cs
- HelpProvider.cs
- UInt16.cs
- InternalTypeHelper.cs
- OleDbReferenceCollection.cs
- Splitter.cs
- XmlWriterTraceListener.cs
- EnumDataContract.cs
- BitmapEffect.cs
- ConfigXmlSignificantWhitespace.cs
- EndpointPerformanceCounters.cs
- DecimalAnimation.cs
- FileSystemEventArgs.cs
- ZipIOLocalFileDataDescriptor.cs
- RequestResizeEvent.cs
- XmlUtil.cs
- MultiPageTextView.cs
- SimpleHandlerBuildProvider.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- TagNameToTypeMapper.cs
- ScriptResourceAttribute.cs
- UnsafeNativeMethods.cs
- DbConnectionInternal.cs
- ByteKeyFrameCollection.cs
- XmlSignificantWhitespace.cs
- HTTPNotFoundHandler.cs
- TickBar.cs
- SmtpCommands.cs
- ColumnClickEvent.cs
- ThumbAutomationPeer.cs
- xmlglyphRunInfo.cs
- LinkGrep.cs
- DateTimeOffset.cs
- CalendarAutomationPeer.cs
- documentsequencetextcontainer.cs
- PeerCollaboration.cs
- SessionEndingCancelEventArgs.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- AttributeSetAction.cs
- DropTarget.cs
- ControlPropertyNameConverter.cs
- CounterSampleCalculator.cs
- DataBoundControlAdapter.cs
- RootBrowserWindowAutomationPeer.cs
- RightsManagementEncryptionTransform.cs
- PrincipalPermission.cs
- Vars.cs
- EncryptedData.cs
- ToolZone.cs
- ClaimSet.cs
- OdbcInfoMessageEvent.cs
- StoreItemCollection.Loader.cs
- SqlTopReducer.cs
- WindowsFormsHelpers.cs
- InternalTypeHelper.cs
- Pick.cs
- DataGridViewCell.cs
- RestHandler.cs
- ColorConvertedBitmapExtension.cs