Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Input / InputLanguageEventArgs.cs / 1 / InputLanguageEventArgs.cs
using System; using System.Collections; using System.Windows.Threading; using System.Windows; using System.Globalization; namespace System.Windows.Input { ////// The InputLanguageEventArgs class represents a type of /// RoutedEventArgs that are relevant to events raised to indicate /// changes. /// public abstract class InputLanguageEventArgs : EventArgs { //------------------------------------------------------ // // Constructors // //----------------------------------------------------- ////// Constructs an instance of the InputLanguageEventArgs class. /// /// /// The new language id. /// /// /// The previous language id. /// protected InputLanguageEventArgs(CultureInfo newLanguageId, CultureInfo previousLanguageId) { _newLanguageId = newLanguageId; _previousLanguageId = previousLanguageId; } //----------------------------------------------------- // // Public Properties // //----------------------------------------------------- ////// New Language Id. /// public virtual CultureInfo NewLanguage { get { return _newLanguageId; } } ////// Previous Language Id. /// public virtual CultureInfo PreviousLanguage { get { return _previousLanguageId; } } //------------------------------------------------------ // // Private Fields // //----------------------------------------------------- #region Private Fields // the new input language. private CultureInfo _newLanguageId; // the previous input language. private CultureInfo _previousLanguageId; #endregion Private Fields } ////// The InputLanguageEventArgs class represents a type of /// RoutedEventArgs that are relevant to events raised to indicate /// changes. /// public class InputLanguageChangedEventArgs : InputLanguageEventArgs { //------------------------------------------------------ // // Constructors // //------------------------------------------------------ ////// Constructs an instance of the InputLanguageEventArgs class. /// /// /// The new language id. /// /// /// The new language id. /// public InputLanguageChangedEventArgs(CultureInfo newLanguageId, CultureInfo previousLanguageId) : base(newLanguageId, previousLanguageId) { } } ////// The InputLanguageEventArgs class represents a type of /// RoutedEventArgs that are relevant to events raised to indicate /// changes. /// ///public class InputLanguageChangingEventArgs : InputLanguageEventArgs { //----------------------------------------------------- // // Constructors // //------------------------------------------------------ /// /// Constructs an instance of the InputLanguageEventArgs class. /// /// /// The new language id. /// /// /// The previous language id. /// public InputLanguageChangingEventArgs(CultureInfo newLanguageId, CultureInfo previousLanguageId) : base(newLanguageId, previousLanguageId) { _rejected = false; } //----------------------------------------------------- // // Public Properties // //----------------------------------------------------- ////// This is a value to reject the input language change. /// public bool Rejected { get { return _rejected; } set { _rejected = value; } } //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields // bool to reject the input language change. private bool _rejected; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Collections; using System.Windows.Threading; using System.Windows; using System.Globalization; namespace System.Windows.Input { ////// The InputLanguageEventArgs class represents a type of /// RoutedEventArgs that are relevant to events raised to indicate /// changes. /// public abstract class InputLanguageEventArgs : EventArgs { //------------------------------------------------------ // // Constructors // //----------------------------------------------------- ////// Constructs an instance of the InputLanguageEventArgs class. /// /// /// The new language id. /// /// /// The previous language id. /// protected InputLanguageEventArgs(CultureInfo newLanguageId, CultureInfo previousLanguageId) { _newLanguageId = newLanguageId; _previousLanguageId = previousLanguageId; } //----------------------------------------------------- // // Public Properties // //----------------------------------------------------- ////// New Language Id. /// public virtual CultureInfo NewLanguage { get { return _newLanguageId; } } ////// Previous Language Id. /// public virtual CultureInfo PreviousLanguage { get { return _previousLanguageId; } } //------------------------------------------------------ // // Private Fields // //----------------------------------------------------- #region Private Fields // the new input language. private CultureInfo _newLanguageId; // the previous input language. private CultureInfo _previousLanguageId; #endregion Private Fields } ////// The InputLanguageEventArgs class represents a type of /// RoutedEventArgs that are relevant to events raised to indicate /// changes. /// public class InputLanguageChangedEventArgs : InputLanguageEventArgs { //------------------------------------------------------ // // Constructors // //------------------------------------------------------ ////// Constructs an instance of the InputLanguageEventArgs class. /// /// /// The new language id. /// /// /// The new language id. /// public InputLanguageChangedEventArgs(CultureInfo newLanguageId, CultureInfo previousLanguageId) : base(newLanguageId, previousLanguageId) { } } ////// The InputLanguageEventArgs class represents a type of /// RoutedEventArgs that are relevant to events raised to indicate /// changes. /// ///public class InputLanguageChangingEventArgs : InputLanguageEventArgs { //----------------------------------------------------- // // Constructors // //------------------------------------------------------ /// /// Constructs an instance of the InputLanguageEventArgs class. /// /// /// The new language id. /// /// /// The previous language id. /// public InputLanguageChangingEventArgs(CultureInfo newLanguageId, CultureInfo previousLanguageId) : base(newLanguageId, previousLanguageId) { _rejected = false; } //----------------------------------------------------- // // Public Properties // //----------------------------------------------------- ////// This is a value to reject the input language change. /// public bool Rejected { get { return _rejected; } set { _rejected = value; } } //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields // bool to reject the input language change. private bool _rejected; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DispatcherHookEventArgs.cs
- DocumentApplicationJournalEntryEventArgs.cs
- RectangleConverter.cs
- CallbackValidator.cs
- SqlRowUpdatingEvent.cs
- RuleSetDialog.cs
- CompilationRelaxations.cs
- TextRunCache.cs
- InvalidateEvent.cs
- Exceptions.cs
- WindowsRichEdit.cs
- TextView.cs
- DeferredElementTreeState.cs
- SelectionUIHandler.cs
- PerformanceCounterPermissionEntry.cs
- GeometryCollection.cs
- MessageVersionConverter.cs
- FixedSOMPageConstructor.cs
- RenderData.cs
- DataPagerCommandEventArgs.cs
- EntityDataSource.cs
- FixUp.cs
- BamlRecords.cs
- StorageMappingItemCollection.cs
- HtmlCalendarAdapter.cs
- RuntimeConfig.cs
- _NetRes.cs
- TextPenaltyModule.cs
- columnmapkeybuilder.cs
- TableAutomationPeer.cs
- AuditLog.cs
- InheritanceRules.cs
- DelegatingMessage.cs
- ThreadPool.cs
- TrackingMemoryStream.cs
- AuthenticationSection.cs
- DispatchOperationRuntime.cs
- WindowsEditBoxRange.cs
- DataError.cs
- ZipIOExtraField.cs
- BitmapEffect.cs
- UniqueID.cs
- XmlSerializationGeneratedCode.cs
- DataColumnChangeEvent.cs
- DurationConverter.cs
- ContextInformation.cs
- SchemaObjectWriter.cs
- XmlSerializationReader.cs
- ResourceReferenceExpressionConverter.cs
- SoapMessage.cs
- GridView.cs
- SafeWaitHandle.cs
- StorageTypeMapping.cs
- _ConnectStream.cs
- PasswordTextContainer.cs
- HostingEnvironmentWrapper.cs
- FormClosingEvent.cs
- WebBrowser.cs
- Vector3DAnimationBase.cs
- StructuredType.cs
- httpserverutility.cs
- ThreadStartException.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- PrinterResolution.cs
- ReferencedType.cs
- PageBreakRecord.cs
- RelationshipWrapper.cs
- CachedFontFamily.cs
- Int32Storage.cs
- ModuleBuilder.cs
- OrderedEnumerableRowCollection.cs
- ObjectStateManagerMetadata.cs
- ProjectionNode.cs
- RectAnimationClockResource.cs
- PngBitmapDecoder.cs
- TextDataBindingHandler.cs
- DataSourceXmlElementAttribute.cs
- HttpWebRequest.cs
- CachedTypeface.cs
- Calendar.cs
- DbConnectionOptions.cs
- UnaryNode.cs
- ContextMenu.cs
- ChannelCacheSettings.cs
- ArglessEventHandlerProxy.cs
- PropertyItem.cs
- SqlConnectionPoolGroupProviderInfo.cs
- StateMachineHelpers.cs
- AssemblyName.cs
- ObjectViewQueryResultData.cs
- DockingAttribute.cs
- StateChangeEvent.cs
- Transform.cs
- DataRecordObjectView.cs
- Group.cs
- SqlFunctionAttribute.cs
- XmlAggregates.cs
- XmlDocumentFieldSchema.cs
- Root.cs
- SessionEndingEventArgs.cs