Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / Util / RTLAwareMessageBox.cs / 1 / 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
- ProfilePropertyNameValidator.cs
- UIAgentAsyncEndRequest.cs
- XMLSchema.cs
- XmlSerializerAssemblyAttribute.cs
- SupportingTokenSecurityTokenResolver.cs
- SplineKeyFrames.cs
- ResourceBinder.cs
- NextPreviousPagerField.cs
- AttributeProviderAttribute.cs
- QilSortKey.cs
- Keywords.cs
- WarningException.cs
- ReliabilityContractAttribute.cs
- ADRoleFactory.cs
- ObjectDataSourceEventArgs.cs
- StorageComplexTypeMapping.cs
- ConsoleKeyInfo.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- QilXmlWriter.cs
- METAHEADER.cs
- SafeNativeMethods.cs
- NumberFunctions.cs
- DataViewSetting.cs
- MD5Cng.cs
- BrowserInteropHelper.cs
- SkipStoryboardToFill.cs
- InternalMappingException.cs
- Helpers.cs
- RewritingValidator.cs
- PeerDuplexChannelListener.cs
- SaveFileDialog.cs
- Geometry.cs
- ToolStripButton.cs
- FlowDocumentPaginator.cs
- CompilerError.cs
- TraversalRequest.cs
- TextRangeAdaptor.cs
- CacheRequest.cs
- Comparer.cs
- AnnotationResourceCollection.cs
- IgnorePropertiesAttribute.cs
- TextReader.cs
- StrokeSerializer.cs
- TraceFilter.cs
- HwndSubclass.cs
- DocumentViewerHelper.cs
- ReachObjectContext.cs
- BinaryExpression.cs
- LineVisual.cs
- MultiSelectRootGridEntry.cs
- AuthenticationConfig.cs
- SecurityAppliedMessage.cs
- TargetInvocationException.cs
- XmlSchemaImport.cs
- Variable.cs
- COM2Properties.cs
- WorkflowRuntimeServiceElement.cs
- InfoCardClaimCollection.cs
- CodeSnippetStatement.cs
- Geometry3D.cs
- ArrayElementGridEntry.cs
- MenuBase.cs
- ParallelActivityDesigner.cs
- DateTimeOffset.cs
- ImageList.cs
- TreeSet.cs
- SolidBrush.cs
- EntityContainerAssociationSet.cs
- PropertyEmitter.cs
- Mappings.cs
- XmlToDatasetMap.cs
- ParserContext.cs
- DateBoldEvent.cs
- ThreadExceptionEvent.cs
- BreakRecordTable.cs
- SimpleApplicationHost.cs
- PLINQETWProvider.cs
- XmlnsCache.cs
- CodeGotoStatement.cs
- AspNetCompatibilityRequirementsAttribute.cs
- InvalidProgramException.cs
- DataGridViewSelectedColumnCollection.cs
- OuterGlowBitmapEffect.cs
- ObjectListCommandCollection.cs
- EdmProviderManifest.cs
- CommandEventArgs.cs
- FolderBrowserDialog.cs
- LoginUtil.cs
- SR.cs
- DoubleAnimationUsingKeyFrames.cs
- BooleanKeyFrameCollection.cs
- DocumentViewerHelper.cs
- InputScope.cs
- ExclusiveHandle.cs
- GlobalProxySelection.cs
- SharedUtils.cs
- SystemWebCachingSectionGroup.cs
- Util.cs
- RowsCopiedEventArgs.cs
- GenerateHelper.cs