Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / RTLAwareMessageBox.cs / 1305376 / RTLAwareMessageBox.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Windows.Forms { using System; using System.Windows.Forms; ////// /// internal sealed 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 SR.GetString(SR.RTL) != "RTL_False"; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Windows.Forms { using System; using System.Windows.Forms; ////// /// internal sealed 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 SR.GetString(SR.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
- SqlNodeAnnotations.cs
- LogArchiveSnapshot.cs
- ZipFileInfo.cs
- mil_commands.cs
- EntityUtil.cs
- GlyphShapingProperties.cs
- LinkedList.cs
- FormViewInsertedEventArgs.cs
- XmlSchemaGroup.cs
- SafeWaitHandle.cs
- MgmtConfigurationRecord.cs
- SimpleBitVector32.cs
- ProfessionalColors.cs
- ToolStripItemCollection.cs
- PointValueSerializer.cs
- SignatureHelper.cs
- FacetDescription.cs
- JsonFaultDetail.cs
- LambdaCompiler.Lambda.cs
- ListSortDescriptionCollection.cs
- SplitterPanel.cs
- ReflectionTypeLoadException.cs
- UITypeEditor.cs
- Int16Animation.cs
- PrimitiveSchema.cs
- XPathNodeInfoAtom.cs
- XmlNamedNodeMap.cs
- CodeTypeConstructor.cs
- DefaultHttpHandler.cs
- ServiceBehaviorElement.cs
- MenuRendererClassic.cs
- BreakSafeBase.cs
- FileUtil.cs
- DrawingBrush.cs
- Point3DIndependentAnimationStorage.cs
- Quaternion.cs
- ExtenderControl.cs
- regiisutil.cs
- DebuggerAttributes.cs
- Inline.cs
- TimelineCollection.cs
- HtmlEmptyTagControlBuilder.cs
- HostingEnvironmentSection.cs
- XmlKeywords.cs
- SerialPort.cs
- _SslSessionsCache.cs
- SvcMapFileSerializer.cs
- MenuItemStyleCollection.cs
- BidOverLoads.cs
- PanelStyle.cs
- NotConverter.cs
- BuildManagerHost.cs
- Registry.cs
- IndentedWriter.cs
- OdbcDataReader.cs
- VectorValueSerializer.cs
- EntityExpressionVisitor.cs
- TargetException.cs
- CalendarDateRangeChangingEventArgs.cs
- FixedSOMTextRun.cs
- CompoundFileDeflateTransform.cs
- PrtCap_Base.cs
- EventDescriptor.cs
- sqlser.cs
- PingReply.cs
- Double.cs
- RestHandler.cs
- FontStyle.cs
- CodeTypeConstructor.cs
- Focus.cs
- ScrollBar.cs
- MetafileHeaderWmf.cs
- WebPartsPersonalizationAuthorization.cs
- OleDbSchemaGuid.cs
- KnownIds.cs
- Error.cs
- TextWriterEngine.cs
- COSERVERINFO.cs
- WebPartZoneCollection.cs
- WebPartConnectionsDisconnectVerb.cs
- storepermission.cs
- localization.cs
- NameObjectCollectionBase.cs
- PageThemeParser.cs
- CommentAction.cs
- DeferredReference.cs
- Geometry3D.cs
- DependencySource.cs
- Math.cs
- SettingsBindableAttribute.cs
- AbstractSvcMapFileLoader.cs
- BasePattern.cs
- MessageBox.cs
- CrossSiteScriptingValidation.cs
- SynchronizedCollection.cs
- DataExpression.cs
- ObjectQueryState.cs
- CompleteWizardStep.cs
- SHA512Managed.cs
- EntityKeyElement.cs