Esempio n. 1
0
        public void Deactivate()
        {
            isActive = false;

            //call the OnStateDeactivated event to allow the user to add more logic to the deactivate function
            Deactivating?.Invoke(this, EventArgs.Empty);
        }
Esempio n. 2
0
        /// <summary>Save changes when the dialog page loses focus</summary>
        protected override void OnDeactivate(CancelEventArgs e)
        {
            Deactivating?.Invoke(this, e);
            if (e.Cancel)
            {
                return;
            }

            SaveSettingsToStorage();
            base.OnDeactivate(e);
        }
Esempio n. 3
0
 protected virtual void OnDeactivating(EventArgs e)
 {
     Deactivating?.Invoke(this, e);
 }
Esempio n. 4
0
 private void OnDeactivating(bool wasClosed)
 {
     Deactivating?.Invoke(this, new DeactivationEventArgs(wasClosed));
 }