Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / WinForms / Managed / System / WinForms / RTLAwareMessageBox.cs / 1 / 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
- updatecommandorderer.cs
- DeviceSpecificDialogCachedState.cs
- Knowncolors.cs
- DataObjectMethodAttribute.cs
- ToolStripItemRenderEventArgs.cs
- ResourcesGenerator.cs
- SecurityElement.cs
- InfiniteTimeSpanConverter.cs
- FamilyMapCollection.cs
- ClientTargetCollection.cs
- ChildChangedEventArgs.cs
- GridViewCommandEventArgs.cs
- SplitterCancelEvent.cs
- WeakReference.cs
- TextSelectionProcessor.cs
- ObjectViewQueryResultData.cs
- SelectedDatesCollection.cs
- EditorZoneBase.cs
- VBCodeProvider.cs
- PerformanceCounterPermissionEntryCollection.cs
- NumberSubstitution.cs
- StateDesigner.LayoutSelectionGlyph.cs
- Dispatcher.cs
- DiscreteKeyFrames.cs
- InstalledVoice.cs
- RegexParser.cs
- WebPartConnectionsCancelVerb.cs
- SqlDataSourceSelectingEventArgs.cs
- AlphaSortedEnumConverter.cs
- WebScriptEnablingBehavior.cs
- DispatchOperation.cs
- TrustManagerPromptUI.cs
- WsdlBuildProvider.cs
- Keyboard.cs
- DataGridHeaderBorder.cs
- IDQuery.cs
- TextPatternIdentifiers.cs
- XMLUtil.cs
- Graphics.cs
- ZoneIdentityPermission.cs
- NegatedConstant.cs
- WebPartsSection.cs
- XmlSerializerNamespaces.cs
- FloaterBaseParaClient.cs
- AnnouncementDispatcherAsyncResult.cs
- AttributeData.cs
- OracleString.cs
- PageBuildProvider.cs
- Storyboard.cs
- AttachmentService.cs
- FixedSOMTableCell.cs
- ModelService.cs
- MessageAction.cs
- TitleStyle.cs
- activationcontext.cs
- LookupBindingPropertiesAttribute.cs
- BinaryFormatterWriter.cs
- ScrollData.cs
- TypeListConverter.cs
- odbcmetadatafactory.cs
- GenericsNotImplementedException.cs
- SiteMembershipCondition.cs
- PageThemeBuildProvider.cs
- WebPartManager.cs
- DataGridBoolColumn.cs
- InlineObject.cs
- SortableBindingList.cs
- HTMLTextWriter.cs
- TemplateBindingExpression.cs
- DataMisalignedException.cs
- GetIndexBinder.cs
- PropertyGridView.cs
- Metafile.cs
- LicenseException.cs
- InputChannelBinder.cs
- AnnotationElement.cs
- ControlBindingsConverter.cs
- CertificateManager.cs
- DataSvcMapFile.cs
- Help.cs
- XmlReaderSettings.cs
- ByteAnimationBase.cs
- SqlConnectionStringBuilder.cs
- ElementMarkupObject.cs
- SecurityIdentifierElement.cs
- XmlParserContext.cs
- Operator.cs
- TransactedBatchingElement.cs
- SrgsDocument.cs
- SingleTagSectionHandler.cs
- FindResponse.cs
- TextEditor.cs
- GridViewRow.cs
- BitStream.cs
- arc.cs
- HtmlControlPersistable.cs
- PackagePartCollection.cs
- CircleEase.cs
- Expander.cs
- ILGenerator.cs