Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / BaseDataListComponentEditor.cs / 1 / BaseDataListComponentEditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.WebControls { using System; using System.Design; using System.ComponentModel; using System.ComponentModel.Design; using System.Diagnostics; using System.Web.UI.Design.WebControls.ListControls; using System.Web.UI.WebControls; using System.Windows.Forms; using System.Windows.Forms.Design; ////// /// [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)] public abstract class BaseDataListComponentEditor : WindowsFormsComponentEditor { private int initialPage; ////// Provides the /// base component editor for Web Forms DataGrid and DataList controls. /// ////// /// public BaseDataListComponentEditor(int initialPage) { this.initialPage = initialPage; } ////// Initializes a new instance of ///. /// /// /// public override bool EditComponent(ITypeDescriptorContext context, object obj, IWin32Window parent) { bool result = false; bool inTemplateMode = false; Debug.Assert(obj is IComponent, "Expected obj to be an IComponent"); IComponent comp = (IComponent)obj; ISite compSite = comp.Site; if (compSite != null) { IDesignerHost designerHost = (IDesignerHost)compSite.GetService(typeof(IDesignerHost)); IDesigner compDesigner = designerHost.GetDesigner(comp); Debug.Assert(compDesigner is TemplatedControlDesigner, "Expected BaseDataList to have a TemplatedControlDesigner"); TemplatedControlDesigner tplDesigner = (TemplatedControlDesigner)compDesigner; inTemplateMode = tplDesigner.InTemplateModeInternal; } if (inTemplateMode == false) { Type[] pageControlTypes = GetComponentEditorPages(); if ((pageControlTypes != null) && (pageControlTypes.Length != 0)) { ComponentEditorForm form = new ComponentEditorForm(obj, pageControlTypes); // Set RightToLeft mode based on resource file string rtlText = SR.GetString(SR.RTL); if (!String.Equals(rtlText, "RTL_False", StringComparison.Ordinal)) { form.RightToLeft = RightToLeft.Yes; form.RightToLeftLayout = true; } if (form.ShowForm(parent, GetInitialComponentEditorPageIndex()) == DialogResult.OK) result = true; } } else { RTLAwareMessageBox.Show(null, SR.GetString(SR.BDL_TemplateModePropBuilder), SR.GetString(SR.BDL_PropertyBuilder), MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, 0); } return result; } ////// Edits a component. /// ////// /// protected override int GetInitialComponentEditorPageIndex() { return initialPage; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved./// Gets the index of the initial component editor page. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataSourceCacheDurationConverter.cs
- IndexedGlyphRun.cs
- _NegoState.cs
- SmiEventSink_DeferedProcessing.cs
- TimeSpanStorage.cs
- QueryOutputWriter.cs
- MetaModel.cs
- ConditionalBranch.cs
- DispatcherProcessingDisabled.cs
- ControlPropertyNameConverter.cs
- EntityContainer.cs
- DataGridViewComboBoxColumn.cs
- PtsHost.cs
- StrokeCollection.cs
- compensatingcollection.cs
- GenericTypeParameterBuilder.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DateTimeUtil.cs
- ElementUtil.cs
- CmsInterop.cs
- CodeExporter.cs
- ResourcePart.cs
- PropertyGeneratedEventArgs.cs
- ListControl.cs
- DataGridViewUtilities.cs
- XmlSchemaAnnotated.cs
- BasicDesignerLoader.cs
- XmlSerializationWriter.cs
- SystemTcpStatistics.cs
- dbenumerator.cs
- TemplateKey.cs
- CodeCommentStatement.cs
- Literal.cs
- OperatingSystem.cs
- PrtTicket_Public_Simple.cs
- MsmqInputChannel.cs
- HttpCacheVaryByContentEncodings.cs
- DataListCommandEventArgs.cs
- TrailingSpaceComparer.cs
- DataServiceQuery.cs
- WebUtil.cs
- CodeArrayCreateExpression.cs
- XmlUtil.cs
- WebSysDefaultValueAttribute.cs
- HelpEvent.cs
- SessionStateModule.cs
- DynamicMethod.cs
- BufferedGraphics.cs
- SymLanguageVendor.cs
- SafeFileMappingHandle.cs
- RenderingEventArgs.cs
- PointHitTestParameters.cs
- CounterSample.cs
- StorageAssociationTypeMapping.cs
- TagMapInfo.cs
- BitStream.cs
- ControlBuilderAttribute.cs
- MultiView.cs
- Keywords.cs
- TreeNode.cs
- MessageHeaderAttribute.cs
- CfgRule.cs
- NavigationPropertyEmitter.cs
- CountAggregationOperator.cs
- Random.cs
- AllMembershipCondition.cs
- X509SecurityToken.cs
- SafeTimerHandle.cs
- RepeatInfo.cs
- MembershipValidatePasswordEventArgs.cs
- TreeView.cs
- SafeFileMappingHandle.cs
- GlyphRunDrawing.cs
- ConnectionDemuxer.cs
- WebZone.cs
- OSFeature.cs
- LifetimeServices.cs
- LinqDataView.cs
- CultureInfoConverter.cs
- XhtmlBasicLabelAdapter.cs
- FrameworkRichTextComposition.cs
- ProxyWebPart.cs
- HashSet.cs
- WorkflowClientDeliverMessageWrapper.cs
- LinkClickEvent.cs
- AssemblyResolver.cs
- XmlSchemaSimpleTypeList.cs
- CommandBindingCollection.cs
- TCPClient.cs
- HttpProtocolReflector.cs
- DefaultHttpHandler.cs
- TextTreeRootTextBlock.cs
- ServiceModelActivationSectionGroup.cs
- DbBuffer.cs
- ProfileBuildProvider.cs
- XmlSignificantWhitespace.cs
- TripleDES.cs
- WSFederationHttpBindingCollectionElement.cs
- SecurityState.cs
- XmlEncApr2001.cs