Esempio n. 1
0
        /// <summary>
        /// Called when the state has changing.
        /// </summary>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected virtual void OnCurrentStateChanging(CurrentStateChangingEventArgs e)
        {
            EventHandler <CurrentStateChangingEventArgs> handler = this.CurrentStateChanging;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Handles the OnSelectedIndexChanged event of the stateDropDownList control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void StateDropDownListOnSelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (!this.ReadOnly)
            {
                CurrentStateChangingEventArgs eventArgs = new CurrentStateChangingEventArgs(this.CurrentState, this.GetStateFromCode(this.StateDropDownList.SelectedValue));

                this.OnCurrentStateChanging(eventArgs);
                if (!eventArgs.Cancel)
                {
                    this.OverwriteCurrentState(eventArgs.NewState);
                    this.OnCurrentStateChanged(new CurrentStateChangedEventArgs(eventArgs.NewState));
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Handles the OnSelectedIndexChanged event of the stateDropDownList control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void StateDropDownListOnSelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (!this.ReadOnly)
              {
            CurrentStateChangingEventArgs eventArgs = new CurrentStateChangingEventArgs(this.CurrentState, this.GetStateFromCode(this.StateDropDownList.SelectedValue));

            this.OnCurrentStateChanging(eventArgs);
            if (!eventArgs.Cancel)
            {
              this.OverwriteCurrentState(eventArgs.NewState);
              this.OnCurrentStateChanged(new CurrentStateChangedEventArgs(eventArgs.NewState));
            }
              }
        }
Esempio n. 4
0
        /// <summary>
        /// Called when the state has changing.
        /// </summary>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected virtual void OnCurrentStateChanging(CurrentStateChangingEventArgs e)
        {
            EventHandler<CurrentStateChangingEventArgs> handler = this.CurrentStateChanging;

              if (handler != null)
              {
            handler(this, e);
              }
        }