Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- ImportContext.cs
- ReflectionTypeLoadException.cs
- RenderDataDrawingContext.cs
- HtmlToClrEventProxy.cs
- ScalarConstant.cs
- GenericAuthenticationEventArgs.cs
- HttpCacheVaryByContentEncodings.cs
- CLRBindingWorker.cs
- Semaphore.cs
- RegisteredScript.cs
- CodeExpressionStatement.cs
- EventToken.cs
- WebResourceAttribute.cs
- LogExtentCollection.cs
- DesignerDataColumn.cs
- SqlUserDefinedTypeAttribute.cs
- DataGridRelationshipRow.cs
- IisTraceWebEventProvider.cs
- SafeNativeMethods.cs
- ResolveCompletedEventArgs.cs
- TraceContext.cs
- recordstate.cs
- ContractsBCL.cs
- DbDataSourceEnumerator.cs
- ComponentResourceManager.cs
- SafeHandle.cs
- Shape.cs
- ActivationArguments.cs
- StatusBarPanel.cs
- GenericTypeParameterBuilder.cs
- ResourceContainer.cs
- SpeechSeg.cs
- TaiwanCalendar.cs
- Size.cs
- xsdvalidator.cs
- EntityDataSourceReferenceGroup.cs
- AttachedPropertyMethodSelector.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- FormParameter.cs
- XmlSchemaObjectCollection.cs
- SymbolDocumentGenerator.cs
- Stack.cs
- InternalSafeNativeMethods.cs
- SymmetricAlgorithm.cs
- _LoggingObject.cs
- GreenMethods.cs
- XPathAncestorQuery.cs
- ParagraphResult.cs
- WindowsImpersonationContext.cs
- SiteMapHierarchicalDataSourceView.cs
- PlainXmlSerializer.cs
- Compiler.cs
- SqlTypeConverter.cs
- Int32Animation.cs
- SendingRequestEventArgs.cs
- BuildProviderAppliesToAttribute.cs
- ClientConfigPaths.cs
- DefaultPropertyAttribute.cs
- StateChangeEvent.cs
- ServiceNameElement.cs
- EdmItemCollection.cs
- DefaultAsyncDataDispatcher.cs
- RepeatBehavior.cs
- ServiceModelConfigurationSectionGroup.cs
- ParseNumbers.cs
- HttpCacheVary.cs
- SyndicationItemFormatter.cs
- xamlnodes.cs
- XmlAutoDetectWriter.cs
- CompressStream.cs
- TemplateControlParser.cs
- PagerStyle.cs
- Semaphore.cs
- TemplateControlParser.cs
- XmlResolver.cs
- CatalogZoneDesigner.cs
- XmlNamespaceDeclarationsAttribute.cs
- SkinBuilder.cs
- CompoundFileStreamReference.cs
- TemplateBindingExpressionConverter.cs
- BitmapEffectState.cs
- WebRequestModuleElementCollection.cs
- WindowsScrollBar.cs
- EqualityComparer.cs
- StructuredTypeInfo.cs
- WindowsScrollBarBits.cs
- HttpCapabilitiesEvaluator.cs
- XmlUtf8RawTextWriter.cs
- TextSelectionHelper.cs
- ValueExpressions.cs
- RequestStatusBarUpdateEventArgs.cs
- Block.cs
- SparseMemoryStream.cs
- SrgsSubset.cs
- Timeline.cs
- ElementProxy.cs
- ComponentCollection.cs
- sqlstateclientmanager.cs
- ConvertEvent.cs
- HuffCodec.cs