private void lblExit_Click(object sender, EventArgs e) { ///this.CreateHandle this.Close(); this.Dispose(); MaterialMessageFormManager.RepositionActivePopups(); }
private void RemindMeMaterialMessageForm_FormClosing(object sender, FormClosingEventArgs e) { MaterialSkin.MaterialSkinManager.Instance.RemoveFormToManage(this); closed = true; MaterialMessageFormManager.RepositionActivePopups(); }
private void tmrFadeout_Tick(object sender, EventArgs e) { if (this.Bounds.Contains(MousePosition)) //Cursor in the message? reset opacity to 1 and restart timeout timer { this.Opacity = 1; secondsPassed = 0; if (!disableFadeout) { tmrTimeout.Start(); } } else //Cursor out of the message? safely reduce opacity "slowly" { this.Opacity -= 0.02; if (this.Opacity <= 0) { tmrFadeout.Stop(); tmrFadein.Dispose(); tmrFadeout.Dispose(); tmrTimeout.Dispose(); if (!isDialog) { this.Close(); this.Dispose(); BLIO.Log("Message form (" + lblText.Text + ") disposed."); MaterialMessageFormManager.RepositionActivePopups(); } else { BLIO.Log("Message form (" + lblText.Text + ") NOT disposed. Form created dialog."); } } } }