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
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- StringValueConverter.cs
- EntityDataSourceSelectedEventArgs.cs
- SqlInternalConnectionTds.cs
- Resources.Designer.cs
- XamlTreeBuilder.cs
- BufferBuilder.cs
- SecurityException.cs
- TagPrefixCollection.cs
- SamlAuthorizationDecisionStatement.cs
- PropertiesTab.cs
- Application.cs
- CallSiteHelpers.cs
- TriggerAction.cs
- AppDomainResourcePerfCounters.cs
- JsonMessageEncoderFactory.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- _Events.cs
- DocumentOrderComparer.cs
- SqlInfoMessageEvent.cs
- DelegateBodyWriter.cs
- Selector.cs
- KnownAssemblyEntry.cs
- ContextStack.cs
- LazyTextWriterCreator.cs
- ValidationSummary.cs
- XmlSerializerNamespaces.cs
- StartUpEventArgs.cs
- DataSourceControl.cs
- ConfigPathUtility.cs
- SessionPageStateSection.cs
- XamlRtfConverter.cs
- MetadataItemCollectionFactory.cs
- ColumnMap.cs
- InputLanguageProfileNotifySink.cs
- ErrorProvider.cs
- ModelTreeManager.cs
- InfoCardProofToken.cs
- SimpleType.cs
- DataControlFieldCell.cs
- CheckBox.cs
- SafeThemeHandle.cs
- DataGridViewComboBoxEditingControl.cs
- PatternMatcher.cs
- SerializerProvider.cs
- ConfigXmlDocument.cs
- ObjectQueryExecutionPlan.cs
- ConfigurationManager.cs
- SafeMILHandle.cs
- FunctionImportElement.cs
- BamlBinaryReader.cs
- GlyphElement.cs
- DataSourceSelectArguments.cs
- EmptyStringExpandableObjectConverter.cs
- RelationshipConverter.cs
- CustomCredentialPolicy.cs
- TimerElapsedEvenArgs.cs
- QuotedStringWriteStateInfo.cs
- Container.cs
- Rule.cs
- PolygonHotSpot.cs
- State.cs
- SafeBitVector32.cs
- HwndSourceParameters.cs
- FusionWrap.cs
- CommandPlan.cs
- ObjectDataSourceMethodEventArgs.cs
- KeyedHashAlgorithm.cs
- PropertyEmitterBase.cs
- ActivityMetadata.cs
- UrlPath.cs
- SerializationAttributes.cs
- RowUpdatedEventArgs.cs
- ISAPIRuntime.cs
- ActiveXSite.cs
- StandardOleMarshalObject.cs
- SmtpDigestAuthenticationModule.cs
- ConfigurationManagerHelper.cs
- Transform3DCollection.cs
- DispatcherSynchronizationContext.cs
- DefaultBinder.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- DigitalSignature.cs
- PlacementWorkspace.cs
- ButtonBaseAdapter.cs
- VersionPair.cs
- CounterSampleCalculator.cs
- Unit.cs
- TypeReference.cs
- TreeNodeBindingCollection.cs
- _DigestClient.cs
- MultitargetUtil.cs
- Crc32.cs
- TextTabProperties.cs
- Int16AnimationBase.cs
- SiteMapDataSourceView.cs
- Misc.cs
- DataObjectCopyingEventArgs.cs
- Thread.cs
- InvokeGenerator.cs