Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / Util / RTLAwareMessageBox.cs / 1305376 / RTLAwareMessageBox.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- using System; using System.Windows.Forms; using System.Design; namespace System.Web.UI.Design.WebControls { ////// internal static class RTLAwareMessageBox { ////// The Show method displays a message box that can contain text, buttons, and symbols that /// inform and instruct the user. This MessageBox will be RTL, if the resources /// for this dll have been localized to a RTL language. /// ////// public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options) { if (RTLAwareMessageBox.IsRTLResources) { options |= (MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading); } return MessageBox.Show(owner, text, caption, buttons, icon, defaultButton, options); } ////// Displays a message box with specified text, caption, and style. /// Makes the dialog RTL if the resources for this dll have been localized to a RTL language. /// ////// Tells whether the current resources for this dll have been /// localized for a RTL language. /// public static bool IsRTLResources { get { return Strings.RTL != "RTL_False"; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- using System; using System.Windows.Forms; using System.Design; namespace System.Web.UI.Design.WebControls { ////// internal static class RTLAwareMessageBox { ////// The Show method displays a message box that can contain text, buttons, and symbols that /// inform and instruct the user. This MessageBox will be RTL, if the resources /// for this dll have been localized to a RTL language. /// ////// public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options) { if (RTLAwareMessageBox.IsRTLResources) { options |= (MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading); } return MessageBox.Show(owner, text, caption, buttons, icon, defaultButton, options); } ////// Displays a message box with specified text, caption, and style. /// Makes the dialog RTL if the resources for this dll have been localized to a RTL language. /// ////// Tells whether the current resources for this dll have been /// localized for a RTL language. /// public static bool IsRTLResources { get { return Strings.RTL != "RTL_False"; } } } } // 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
- SplineKeyFrames.cs
- ParenthesizePropertyNameAttribute.cs
- StringComparer.cs
- EncryptedKey.cs
- DbModificationClause.cs
- datacache.cs
- CodeEntryPointMethod.cs
- ExpressionLexer.cs
- CompiledQueryCacheKey.cs
- BigIntegerStorage.cs
- FunctionNode.cs
- BaseAppDomainProtocolHandler.cs
- NetworkInformationPermission.cs
- TimerElapsedEvenArgs.cs
- SqlParameterCollection.cs
- AuthStoreRoleProvider.cs
- SoapInteropTypes.cs
- ThreadExceptionEvent.cs
- BufferCache.cs
- BaseTemplatedMobileComponentEditor.cs
- NumericUpDownAcceleration.cs
- PreviousTrackingServiceAttribute.cs
- NestedContainer.cs
- iisPickupDirectory.cs
- AnnotationStore.cs
- DependencyPropertyDescriptor.cs
- ReaderOutput.cs
- HeaderPanel.cs
- ActionMismatchAddressingException.cs
- Annotation.cs
- AdapterDictionary.cs
- CallbackCorrelationInitializer.cs
- CodeDomExtensionMethods.cs
- ReaderWriterLockWrapper.cs
- DefaultEventAttribute.cs
- TerminatorSinks.cs
- TraceUtils.cs
- JsonReaderWriterFactory.cs
- CompiledQueryCacheKey.cs
- ActivityCodeDomSerializer.cs
- ControlParameter.cs
- DataView.cs
- SchemaNotation.cs
- MetadataCacheItem.cs
- ItemCheckedEvent.cs
- SafeFileMappingHandle.cs
- SQLRoleProvider.cs
- ConfigXmlAttribute.cs
- HtmlFormWrapper.cs
- DataGridTextBoxColumn.cs
- ClientUtils.cs
- XmlEncodedRawTextWriter.cs
- ToolStrip.cs
- EntityDesignerDataSourceView.cs
- XamlVector3DCollectionSerializer.cs
- ListViewDesigner.cs
- coordinator.cs
- SerializationSectionGroup.cs
- DelegatingHeader.cs
- XslCompiledTransform.cs
- SiteIdentityPermission.cs
- cookiecontainer.cs
- TypeResolver.cs
- ListControlBoundActionList.cs
- DispatcherHooks.cs
- CollectionContainer.cs
- TemplatedMailWebEventProvider.cs
- DispatcherExceptionEventArgs.cs
- ByteAnimationBase.cs
- WebPartAddingEventArgs.cs
- EncoderParameter.cs
- KeyInterop.cs
- ToolStripContainer.cs
- Comparer.cs
- listitem.cs
- PtsPage.cs
- ResizeGrip.cs
- TableLayoutSettingsTypeConverter.cs
- ControlBuilder.cs
- FormClosingEvent.cs
- SignatureToken.cs
- IIS7UserPrincipal.cs
- Margins.cs
- TrackingProfileManager.cs
- Marshal.cs
- BinaryCommonClasses.cs
- InputProviderSite.cs
- ConditionalAttribute.cs
- StringFormat.cs
- SetIterators.cs
- ResourceContainer.cs
- QuestionEventArgs.cs
- Error.cs
- LiteralText.cs
- TextDecorationCollection.cs
- MDIClient.cs
- DBDataPermissionAttribute.cs
- UniqueConstraint.cs
- ping.cs
- ResXResourceSet.cs