Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / MIT / System / Web / UI / MobileControls / Design / StyleSheetComponentEditor.cs / 1305376 / StyleSheetComponentEditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.MobileControls { using System; using System.ComponentModel; using System.Diagnostics; using System.Web.UI.MobileControls; using System.Web.UI.Design.MobileControls; using System.Web.UI.Design.MobileControls.Adapters; using System.Windows.Forms; ////// ////// Provides a component editor for a StyleSheet ////// control. /// [ System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode) ] [Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] internal class StyleSheetComponentEditor : ComponentEditor { public override bool EditComponent(ITypeDescriptorContext context, Object component) { Debug.Assert(component is StyleSheet); StyleSheet styleSheet = (StyleSheet)component; StyleSheetDesigner designer = (StyleSheetDesigner)DesignerAdapterUtil.ControlDesigner(styleSheet); //String currentStyle = designer.TemplateStyle; if (designer.InTemplateMode) { MessageBox.Show(SR.GetString(SR.BaseTemplatedMobileComponentEditor_TemplateModeErrorMessage), SR.GetString(SR.BaseTemplatedMobileComponentEditor_TemplateModeErrorTitle), MessageBoxButtons.OK, MessageBoxIcon.Information); return false; } StylesEditorDialog dialog; try { dialog = new StylesEditorDialog( styleSheet, designer, null /*currentStyle*/ ); } catch//(ArgumentException e) { // Debug.Fail(e.ToString()); // Block user from entering StylesEditorDialog until they fix // duplicate style declarations. return false; } return (dialog.ShowDialog() == DialogResult.OK); } } } // 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
- ListSourceHelper.cs
- TrackingConditionCollection.cs
- NameValuePair.cs
- SHA384Managed.cs
- VirtualizingPanel.cs
- SupportsEventValidationAttribute.cs
- PreservationFileWriter.cs
- TableItemProviderWrapper.cs
- SafeCoTaskMem.cs
- CodeStatementCollection.cs
- XPathNavigatorKeyComparer.cs
- PropertyTab.cs
- LabelEditEvent.cs
- WSHttpBinding.cs
- EmptyEnumerator.cs
- WorkflowTransactionOptions.cs
- ContractMapping.cs
- JapaneseLunisolarCalendar.cs
- DisposableCollectionWrapper.cs
- SqlCacheDependency.cs
- SqlConnectionPoolGroupProviderInfo.cs
- _SSPIWrapper.cs
- XmlImplementation.cs
- NestedContainer.cs
- VirtualizingStackPanel.cs
- CheckBoxField.cs
- GetPageNumberCompletedEventArgs.cs
- StreamAsIStream.cs
- ReferencedCollectionType.cs
- HostingPreferredMapPath.cs
- ObjectDataSourceChooseMethodsPanel.cs
- WebPartEditVerb.cs
- XPathDocumentIterator.cs
- ToolStripLocationCancelEventArgs.cs
- IPipelineRuntime.cs
- DetailsViewDeleteEventArgs.cs
- MouseBinding.cs
- WindowsGraphics2.cs
- ISAPIRuntime.cs
- ToolBar.cs
- FormsAuthenticationModule.cs
- PeerName.cs
- SoapAttributeOverrides.cs
- DateTimePicker.cs
- AsyncContentLoadedEventArgs.cs
- Compilation.cs
- DbProviderFactoriesConfigurationHandler.cs
- SettingsAttributes.cs
- ComboBoxItem.cs
- StrokeNodeOperations2.cs
- LineInfo.cs
- ListMarkerLine.cs
- QueryStringParameter.cs
- ImageField.cs
- FormClosingEvent.cs
- TemplateKey.cs
- RelationshipEndCollection.cs
- XmlConverter.cs
- Enum.cs
- ListControl.cs
- WindowsScroll.cs
- FontWeight.cs
- RemoteWebConfigurationHostServer.cs
- DocumentSequence.cs
- DataListCommandEventArgs.cs
- PathGradientBrush.cs
- FormView.cs
- DefaultBinder.cs
- EditableTreeList.cs
- StringComparer.cs
- SHA1.cs
- ToolBarButtonClickEvent.cs
- ComEventsInfo.cs
- TcpTransportBindingElement.cs
- DataControlFieldCell.cs
- Image.cs
- RotateTransform.cs
- DoubleAnimationBase.cs
- FrameDimension.cs
- HtmlTableRow.cs
- CallbackHandler.cs
- DbUpdateCommandTree.cs
- ControlBuilder.cs
- XmlSchemaChoice.cs
- SqlFactory.cs
- WorkflowLayouts.cs
- DataGridViewMethods.cs
- SortQuery.cs
- SamlSubjectStatement.cs
- EncryptedPackageFilter.cs
- PathHelper.cs
- PageRequestManager.cs
- BrowserCapabilitiesCompiler.cs
- ContentElementAutomationPeer.cs
- ToolStripRenderEventArgs.cs
- DataContext.cs
- XmlSchemaAny.cs
- UnknownWrapper.cs
- DataGridBoolColumn.cs
- Line.cs