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
- ListViewCancelEventArgs.cs
- ProcessThread.cs
- ToolboxComponentsCreatingEventArgs.cs
- GridViewDeleteEventArgs.cs
- PrefixQName.cs
- linebase.cs
- externdll.cs
- LocalizedNameDescriptionPair.cs
- ProtocolsConfigurationEntry.cs
- EntityDescriptor.cs
- Effect.cs
- ElementInit.cs
- ToolStripMenuItemDesigner.cs
- HttpCapabilitiesBase.cs
- SoapSchemaMember.cs
- _FixedSizeReader.cs
- HtmlInputButton.cs
- ModifierKeysConverter.cs
- TableLayoutRowStyleCollection.cs
- TextWriterTraceListener.cs
- DataGridLengthConverter.cs
- Helpers.cs
- DebugHandleTracker.cs
- ContainerActivationHelper.cs
- StringConcat.cs
- TextSegment.cs
- RegisteredDisposeScript.cs
- CursorEditor.cs
- InstallerTypeAttribute.cs
- FormViewUpdateEventArgs.cs
- XslVisitor.cs
- SchemaImporterExtension.cs
- WindowsTooltip.cs
- MemberInfoSerializationHolder.cs
- MessageHeaderDescriptionCollection.cs
- ZoneIdentityPermission.cs
- ResourceFallbackManager.cs
- SqlConnection.cs
- CommonDialog.cs
- FrameworkContextData.cs
- HiddenField.cs
- SQLCharsStorage.cs
- ListBase.cs
- TextBoxAutoCompleteSourceConverter.cs
- CountdownEvent.cs
- CellRelation.cs
- AssemblyResolver.cs
- LeftCellWrapper.cs
- VarRefManager.cs
- EDesignUtil.cs
- UrlMappingsModule.cs
- CounterCreationDataCollection.cs
- Calendar.cs
- ShutDownListener.cs
- GenericXmlSecurityTokenAuthenticator.cs
- CaretElement.cs
- AddToCollection.cs
- XdrBuilder.cs
- StackSpiller.Temps.cs
- ItemCheckedEvent.cs
- DataGridTextBox.cs
- SynchronizationScope.cs
- ComplexPropertyEntry.cs
- PropertyEntry.cs
- SerializerWriterEventHandlers.cs
- StrokeSerializer.cs
- ConversionContext.cs
- TextureBrush.cs
- RegexTree.cs
- CatalogZoneBase.cs
- PathFigureCollectionValueSerializer.cs
- OleDbException.cs
- ReachUIElementCollectionSerializer.cs
- ListBindingConverter.cs
- DataTableTypeConverter.cs
- MetaModel.cs
- FontSourceCollection.cs
- DesignTimeSiteMapProvider.cs
- ServicePointManagerElement.cs
- SqlBinder.cs
- BitmapEffectOutputConnector.cs
- ChannelBase.cs
- SchemaNotation.cs
- TextBox.cs
- RIPEMD160.cs
- BamlMapTable.cs
- DataListItemCollection.cs
- XPathItem.cs
- FixedTextSelectionProcessor.cs
- DesignerSerializationOptionsAttribute.cs
- VisualProxy.cs
- ProcessHostServerConfig.cs
- WebEvents.cs
- PixelFormats.cs
- MouseGestureConverter.cs
- FormView.cs
- ObjectViewQueryResultData.cs
- DoubleCollection.cs
- ValidatingReaderNodeData.cs
- ResourceCodeDomSerializer.cs