//=============================================================================== // Goal Book. // Copyright © 2009 Mark Brownsword. //=============================================================================== #region Using Statements using System; using System.Windows; using System.Windows.Controls; using GoalBook.Infrastructure.Events; using GoalBook.Infrastructure.Interfaces; using System.ComponentModel; #endregion namespace GoalBook.Shell.Views { /// <summary> /// Interaction logic for InternetDialogView.xaml /// </summary> public partial class InternetDialogView : UserControl, IErrorInfoDialogView { #region Constants and Enums #endregion #region Inner Classes and Structures #endregion #region Delegates and Events private static ErrorInfoChangedEventHandler _errorInfoChangedEventHandler; /// <summary> /// Event indicating that the ErrorInfo property has changed. /// </summary> public event ErrorInfoChangedEventHandler ErrorInfoChanged { add { _errorInfoChangedEventHandler = (ErrorInfoChangedEventHandler)Delegate.Combine(_errorInfoChangedEventHandler, value); } remove { _errorInfoChangedEventHandler = (ErrorInfoChangedEventHandler)Delegate.Remove(_errorInfoChangedEventHandler, value); } } private void OnErrorInfoChanged(ErrorInfoChangedEventArgs args) { if (_errorInfoChangedEventHandler != null) { _errorInfoChangedEventHandler(args); } } #endregion #region Instance and Shared Fields #endregion #region Constructors /// <summary> /// Constructor. /// </summary> public InternetDialogView() { InitializeComponent(); } #endregion #region Properties #endregion #region Private and Protected Methods /// <summary> /// Handle UserControl_Loaded event. /// </summary> /// <param name="sender">Sender</param> /// <param name="e">EventArgs</param> private void UserControl_Loaded(object sender, RoutedEventArgs e) { this.Focus(); //this.textBoxEmail.Focus(); } #endregion #region Public and internal Methods #endregion #region Event Handlers /// <summary> /// Handle CheckBoxEnable_Checked event. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CheckBoxEnable_Checked(object sender, RoutedEventArgs e) { if (checkBoxEnable.IsChecked.Value) { textBoxHost.Focus(); } } #endregion #region Base Class Overrides #endregion #region IErrorInfoDialogView Members /// <summary> /// Raise ErrorInfoChanged. /// </summary> public void RaiseErrorInfoChanged(IDataErrorInfo info) { OnErrorInfoChanged(new ErrorInfoChangedEventArgs(info)); } #endregion } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)