private void ThisFormShown(object sender, EventArgs e) { //prompt user to verify email if (!GlobalSpace.IsEmailVarified && _isNewSession) { EmailVerificationForm form = new EmailVerificationForm(); form.FormClosingEventHandler += EmailVerificationFormClosed; form.Location = new Point(this.Location.X + 153, this.Location.Y + 120); form.Show(); } else if (GlobalSpace.MonthlyInfoList.Count < 1) { //if there's no data to show string message = "Currently you do not have any saved information to appear on this page. " + "Add your today's earning and expense and see the magic happen. Ready?"; DialogResult userResponse = MessageBox.Show(message, "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (userResponse == DialogResult.Yes) { AddNewDataButton.PerformClick(); } } }
private void VerifyEmailButtonClicked(object sender, EventArgs e) { if (!GlobalSpace.IsEmailVarified) { EmailVerificationForm form = new EmailVerificationForm(); form.FormClosingEventHandler += EmailVerificationFormClosed; form.Location = new Point(this.Location.X + 153, this.Location.Y + 120); form.Show(); } }