Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / InputLanguageEventArgs.cs / 1305600 / 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
- NumericPagerField.cs
- AttachInfo.cs
- QilIterator.cs
- KeySplineConverter.cs
- ApplicationException.cs
- CommandManager.cs
- XmlChildEnumerator.cs
- ProgressBarRenderer.cs
- Grant.cs
- DecimalAnimationUsingKeyFrames.cs
- ArithmeticException.cs
- XmlUtil.cs
- XmlDocumentType.cs
- Asn1IntegerConverter.cs
- ProviderConnectionPoint.cs
- BatchWriter.cs
- FieldNameLookup.cs
- ListViewItemMouseHoverEvent.cs
- ControlDesignerState.cs
- ImageMapEventArgs.cs
- ColumnHeader.cs
- WeakReferenceEnumerator.cs
- CompressionTransform.cs
- WebPartZoneCollection.cs
- MgmtResManager.cs
- OracleCommandBuilder.cs
- PackUriHelper.cs
- AssemblyInfo.cs
- KeyInstance.cs
- UTF32Encoding.cs
- ValidateNames.cs
- TextTreeDeleteContentUndoUnit.cs
- ProfileParameter.cs
- SerTrace.cs
- CompModSwitches.cs
- PropertyGridEditorPart.cs
- PassportAuthenticationEventArgs.cs
- WsdlWriter.cs
- ComponentEditorPage.cs
- ObjectViewFactory.cs
- SystemIPInterfaceProperties.cs
- PipelineModuleStepContainer.cs
- UpdateCompiler.cs
- TextSelectionHelper.cs
- ObjectDataProvider.cs
- DynamicActionMessageFilter.cs
- Label.cs
- TextFormatterImp.cs
- RootProfilePropertySettingsCollection.cs
- PrePostDescendentsWalker.cs
- HtmlControlPersistable.cs
- ConfigurationManagerHelper.cs
- WebExceptionStatus.cs
- UserControl.cs
- StorageEntitySetMapping.cs
- Hash.cs
- ColumnHeader.cs
- XmlQueryCardinality.cs
- CanonicalFormWriter.cs
- DrawListViewSubItemEventArgs.cs
- GetIsBrowserClientRequest.cs
- UInt32Converter.cs
- OciHandle.cs
- FrameDimension.cs
- FaultDesigner.cs
- HealthMonitoringSectionHelper.cs
- DotAtomReader.cs
- HostingEnvironmentSection.cs
- WizardForm.cs
- SqlAliaser.cs
- CompilerLocalReference.cs
- OpenTypeLayoutCache.cs
- RawStylusInputCustomDataList.cs
- Literal.cs
- FixedSOMPage.cs
- PackagingUtilities.cs
- SimpleTypesSurrogate.cs
- XmlMembersMapping.cs
- StringPropertyBuilder.cs
- SynchronousChannel.cs
- NavigationPropertyEmitter.cs
- RemotingAttributes.cs
- WebDisplayNameAttribute.cs
- UndirectedGraph.cs
- ChildrenQuery.cs
- DataGridViewRowHeaderCell.cs
- DataObjectEventArgs.cs
- UiaCoreTypesApi.cs
- FixedPageProcessor.cs
- ColumnHeaderConverter.cs
- ZipIOBlockManager.cs
- ThreadStateException.cs
- SecurityKeyEntropyMode.cs
- AmbientProperties.cs
- Property.cs
- ScriptRegistrationManager.cs
- AppSettingsExpressionEditor.cs
- Vector3DCollectionConverter.cs
- XmlReader.cs
- NumericExpr.cs