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
- XmlUrlResolver.cs
- HttpCookie.cs
- ObjectListItem.cs
- RepeatBehavior.cs
- storagemappingitemcollection.viewdictionary.cs
- ControlCommandSet.cs
- _FtpControlStream.cs
- TextRangeBase.cs
- ListCollectionView.cs
- WebServiceTypeData.cs
- PolygonHotSpot.cs
- BrowserCapabilitiesFactoryBase.cs
- ColumnWidthChangingEvent.cs
- ColorPalette.cs
- XdrBuilder.cs
- IfAction.cs
- DirectoryLocalQuery.cs
- HtmlInputImage.cs
- QueryNode.cs
- WpfPayload.cs
- TemplateControlParser.cs
- TogglePattern.cs
- PackWebResponse.cs
- EdmComplexPropertyAttribute.cs
- StringFreezingAttribute.cs
- FixedSOMFixedBlock.cs
- ReflectionTypeLoadException.cs
- DtrList.cs
- CompensationHandlingFilter.cs
- SecUtil.cs
- followingquery.cs
- MultipleCopiesCollection.cs
- XmlSchemaComplexContent.cs
- XmlSchemaInfo.cs
- FileDialog_Vista_Interop.cs
- Encoding.cs
- MailFileEditor.cs
- Mappings.cs
- ValueChangedEventManager.cs
- ReadOnlyTernaryTree.cs
- SelectionRangeConverter.cs
- CmsUtils.cs
- DataSourceControlBuilder.cs
- AnnotationStore.cs
- TextElementAutomationPeer.cs
- ValidationHelpers.cs
- ObservableCollection.cs
- DaylightTime.cs
- MenuItemStyle.cs
- SymbolResolver.cs
- XsdDateTime.cs
- StopStoryboard.cs
- CompositeFontParser.cs
- LookupNode.cs
- HtmlLink.cs
- ColumnMapProcessor.cs
- COM2ExtendedUITypeEditor.cs
- MsmqBindingFilter.cs
- ParameterCollectionEditor.cs
- Button.cs
- SendSecurityHeaderElement.cs
- hwndwrapper.cs
- BinaryObjectWriter.cs
- Int64KeyFrameCollection.cs
- MappingMetadataHelper.cs
- ItemCheckedEvent.cs
- TextRunCacheImp.cs
- WebServicesSection.cs
- DataMemberAttribute.cs
- WebRequestModuleElement.cs
- Baml2006ReaderFrame.cs
- PTUtility.cs
- LookupBindingPropertiesAttribute.cs
- XmlSignatureProperties.cs
- ResXResourceReader.cs
- ToolStripDropDownClosingEventArgs.cs
- MimeObjectFactory.cs
- HttpEncoder.cs
- SoapIncludeAttribute.cs
- ScriptHandlerFactory.cs
- Point3DConverter.cs
- IdentityModelStringsVersion1.cs
- Visual3DCollection.cs
- FaultCode.cs
- DiagnosticTraceRecords.cs
- ConnectionsZone.cs
- Rotation3D.cs
- XmlSerializerOperationGenerator.cs
- MULTI_QI.cs
- DiscoveryClient.cs
- CrossContextChannel.cs
- CodeTypeMember.cs
- SafeFileMapViewHandle.cs
- TextEditorParagraphs.cs
- PlainXmlDeserializer.cs
- KernelTypeValidation.cs
- CssStyleCollection.cs
- LabelAutomationPeer.cs
- XPathDescendantIterator.cs
- _ReceiveMessageOverlappedAsyncResult.cs