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
- WebProxyScriptElement.cs
- WebPartVerbsEventArgs.cs
- NetNamedPipeSecurityElement.cs
- FullTextLine.cs
- ToolStripEditorManager.cs
- ErrorStyle.cs
- LinkedResource.cs
- OutputScope.cs
- GenericNameHandler.cs
- Compiler.cs
- HtmlImage.cs
- _SpnDictionary.cs
- BamlTreeNode.cs
- ReferentialConstraint.cs
- HyperLinkStyle.cs
- Recipient.cs
- NeedSkipTokenVisitor.cs
- InvalidAsynchronousStateException.cs
- CompositeActivityTypeDescriptorProvider.cs
- ComplusEndpointConfigContainer.cs
- StrongTypingException.cs
- Models.cs
- ListenerConstants.cs
- ClaimSet.cs
- WebEventTraceProvider.cs
- BufferedGraphicsManager.cs
- HttpCachePolicyElement.cs
- ShaperBuffers.cs
- BooleanToVisibilityConverter.cs
- COM2PropertyPageUITypeConverter.cs
- Matrix3DStack.cs
- HttpProcessUtility.cs
- TemplatedMailWebEventProvider.cs
- JsonGlobals.cs
- Label.cs
- SelectingProviderEventArgs.cs
- XmlAtomErrorReader.cs
- SignedPkcs7.cs
- DescendantOverDescendantQuery.cs
- StrongNameKeyPair.cs
- ConfigurationProperty.cs
- UIElementCollection.cs
- HttpConfigurationContext.cs
- ProvidersHelper.cs
- AsyncPostBackErrorEventArgs.cs
- TextViewSelectionProcessor.cs
- ChannelDispatcherBase.cs
- DeleteMemberBinder.cs
- CompilerGlobalScopeAttribute.cs
- AnnotationMap.cs
- PermissionToken.cs
- _NetworkingPerfCounters.cs
- DataTableTypeConverter.cs
- ManagementEventWatcher.cs
- DetailsViewRow.cs
- ParameterInfo.cs
- HttpCookie.cs
- DataGridToolTip.cs
- TreeBuilder.cs
- GregorianCalendar.cs
- PenContexts.cs
- HashCodeCombiner.cs
- XmlLoader.cs
- HttpConfigurationContext.cs
- BamlRecordReader.cs
- XmlSchemaComplexContentExtension.cs
- Char.cs
- CallInfo.cs
- UriWriter.cs
- BackStopAuthenticationModule.cs
- BitmapEffectGroup.cs
- DialogWindow.cs
- AlternateViewCollection.cs
- DrawingServices.cs
- FormViewRow.cs
- NameNode.cs
- ReferenceConverter.cs
- Header.cs
- SerializationHelper.cs
- ClipboardData.cs
- LinkTarget.cs
- DiscoveryMessageSequence11.cs
- DbDataAdapter.cs
- ParentUndoUnit.cs
- TableLayout.cs
- ExpandableObjectConverter.cs
- HttpProfileGroupBase.cs
- WinEventWrap.cs
- PixelShader.cs
- UnsafeNativeMethods.cs
- DefaultHttpHandler.cs
- TransactionTable.cs
- SiteMapDataSourceView.cs
- Oid.cs
- KeyEventArgs.cs
- SemanticTag.cs
- ModifyActivitiesPropertyDescriptor.cs
- EntityDesignerBuildProvider.cs
- FontFamily.cs
- DependencyProperty.cs