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
- StyleXamlParser.cs
- UpDownBaseDesigner.cs
- UnsafeNativeMethodsCLR.cs
- EntryWrittenEventArgs.cs
- IssuedTokenServiceCredential.cs
- ExtractedStateEntry.cs
- BehaviorEditorPart.cs
- RegexCaptureCollection.cs
- LinqDataSource.cs
- BinaryFormatterWriter.cs
- ToolStripLabel.cs
- BaseTemplatedMobileComponentEditor.cs
- TextWriterEngine.cs
- VersionValidator.cs
- StateChangeEvent.cs
- AnchoredBlock.cs
- VirtualDirectoryMapping.cs
- ReferencedCollectionType.cs
- SQLGuidStorage.cs
- StaticContext.cs
- AstNode.cs
- DocumentOrderQuery.cs
- DocumentApplicationJournalEntry.cs
- WebPartEditorApplyVerb.cs
- ExtendedPropertiesHandler.cs
- ISAPIRuntime.cs
- PerformanceCounterCategory.cs
- KnownIds.cs
- CacheAxisQuery.cs
- OneToOneMappingSerializer.cs
- ButtonPopupAdapter.cs
- PartBasedPackageProperties.cs
- WebInvokeAttribute.cs
- SchemaTableOptionalColumn.cs
- FieldDescriptor.cs
- MatrixCamera.cs
- DetailsViewPagerRow.cs
- MobileCategoryAttribute.cs
- RouteData.cs
- HostingEnvironmentSection.cs
- ArrayWithOffset.cs
- ChildrenQuery.cs
- SoapTypeAttribute.cs
- Thread.cs
- AuthorizationRule.cs
- CollectionConverter.cs
- SQLDecimalStorage.cs
- AttributeCollection.cs
- WizardStepBase.cs
- URLMembershipCondition.cs
- WindowsRichEdit.cs
- Base64Decoder.cs
- SystemException.cs
- Process.cs
- ListItemCollection.cs
- ParseNumbers.cs
- WsdlWriter.cs
- SecurityTokenTypes.cs
- IDispatchConstantAttribute.cs
- Utils.cs
- ProxyWebPart.cs
- PersonalizableAttribute.cs
- PointCollection.cs
- ValueHandle.cs
- AlgoModule.cs
- NumberFormatter.cs
- ErrorHandlerModule.cs
- SoapReflectionImporter.cs
- HttpProfileGroupBase.cs
- TreeViewBindingsEditor.cs
- StyleTypedPropertyAttribute.cs
- EntityConnection.cs
- Control.cs
- SrgsText.cs
- DynamicPropertyHolder.cs
- VirtualDirectoryMapping.cs
- WebFaultClientMessageInspector.cs
- DBBindings.cs
- Transform3D.cs
- TemplateNameScope.cs
- StackOverflowException.cs
- ComContractElementCollection.cs
- RtfControls.cs
- QuaternionRotation3D.cs
- RouteItem.cs
- DeclarativeCatalogPart.cs
- WebPartUserCapability.cs
- SwitchElementsCollection.cs
- BasicExpandProvider.cs
- CategoryNameCollection.cs
- _emptywebproxy.cs
- TypeNameConverter.cs
- DecimalAnimation.cs
- ItemCollection.cs
- InputReport.cs
- URL.cs
- UMPAttributes.cs
- XamlHostingSectionGroup.cs
- RuntimeUtils.cs
- CodeCommentStatement.cs