Example #1
0
        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();
                }
            }
        }
Example #2
0
        private void YearComboBoxIndexChanged(object sender, EventArgs e)
        {
            if (YearComboBox.SelectedItem.ToString() == "All years")
            {
                _selectedYear = 0;
            }
            else
            {
                _selectedYear = Convert.ToInt32(YearComboBox.SelectedItem.ToString());
            }

            PlotMonthlyInfo();

            if (!_isFirstCall && 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. Are you ready?";

                DialogResult userResponse = MessageBox.Show(message, "Message",
                                                            MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                if (userResponse == DialogResult.Yes)
                {
                    AddNewDataButton.PerformClick();
                }
            }
            else if (!_isFirstCall && HomeDataGridView.Rows.Count < 1)
            {
                string message = "Currently you do not have any saved information for " + _selectedYear + ".";

                DialogResult userResponse = MessageBox.Show(message, "Message",
                                                            MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Example #3
0
        private void EmailVerificationFormClosed(object sender, EventArgs e)
        {
            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. Are you ready?";

                DialogResult userResponse = MessageBox.Show(message, "Message",
                                                            MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                if (userResponse == DialogResult.Yes)
                {
                    AddNewDataButton.PerformClick();
                }
            }
        }