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
- DesignerDataSchemaClass.cs
- PersonalizationStateInfo.cs
- DelegatingConfigHost.cs
- NullableFloatSumAggregationOperator.cs
- ParameterModifier.cs
- PropertyMapper.cs
- UIElement.cs
- CallTemplateAction.cs
- ReadWriteObjectLock.cs
- CharacterMetricsDictionary.cs
- BindableAttribute.cs
- MemberDomainMap.cs
- URLMembershipCondition.cs
- Helper.cs
- GlyphShapingProperties.cs
- TreeViewBindingsEditorForm.cs
- DependencyPropertyChangedEventArgs.cs
- Selection.cs
- OrderedDictionary.cs
- AssociationSetMetadata.cs
- VisualTarget.cs
- ProviderIncompatibleException.cs
- JulianCalendar.cs
- WebAdminConfigurationHelper.cs
- Rotation3D.cs
- RootBrowserWindowProxy.cs
- TextBlockAutomationPeer.cs
- ContentHostHelper.cs
- ApplicationHost.cs
- LicFileLicenseProvider.cs
- mediaeventargs.cs
- StrokeNodeEnumerator.cs
- HitTestDrawingContextWalker.cs
- PointKeyFrameCollection.cs
- SessionState.cs
- EntityContainerEntitySet.cs
- StrongName.cs
- AnnotationResourceChangedEventArgs.cs
- ErrorTableItemStyle.cs
- _CookieModule.cs
- DockProviderWrapper.cs
- NamespaceCollection.cs
- SponsorHelper.cs
- XPathScanner.cs
- GetPageCompletedEventArgs.cs
- NameSpaceEvent.cs
- DependencyPropertyHelper.cs
- DocumentPage.cs
- XmlILConstructAnalyzer.cs
- XmlElementList.cs
- AddressHeader.cs
- DeflateInput.cs
- SpanIndex.cs
- EncryptedPackage.cs
- ListItemCollection.cs
- SchemaNotation.cs
- SafeLibraryHandle.cs
- COM2ExtendedTypeConverter.cs
- RawMouseInputReport.cs
- PageSettings.cs
- HiddenFieldDesigner.cs
- SqlVisitor.cs
- DeferredReference.cs
- UInt32.cs
- ProfileParameter.cs
- SqlClientWrapperSmiStreamChars.cs
- Span.cs
- FtpWebResponse.cs
- ControlHelper.cs
- WsdlEndpointConversionContext.cs
- BinaryMethodMessage.cs
- ProjectionQueryOptionExpression.cs
- SaveFileDialog.cs
- FormViewDeletedEventArgs.cs
- XPathException.cs
- DataException.cs
- XmlQueryRuntime.cs
- DPAPIProtectedConfigurationProvider.cs
- ApplicationFileParser.cs
- Regex.cs
- TemplateControlParser.cs
- QuotedPrintableStream.cs
- EntityKey.cs
- DateTimeOffset.cs
- safex509handles.cs
- ToolStripContentPanelDesigner.cs
- TypeSystem.cs
- CultureInfoConverter.cs
- SecureStringHasher.cs
- XmlResolver.cs
- HeaderPanel.cs
- StructuredTypeInfo.cs
- Line.cs
- ServiceNameElement.cs
- IgnoreDataMemberAttribute.cs
- TableCellAutomationPeer.cs
- TaskHelper.cs
- Evaluator.cs
- OutputCacheSection.cs
- MergeExecutor.cs