Пример #1
0
 private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         ProLogicLayer pll = new ProLogicLayer();
         pll.CloseHelpViewer();
     }
     catch (Exception)
     {
         MessageBox.Show("Failed to Close properly.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #2
0
 private void viewHelpToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         ProLogicLayer pll = new ProLogicLayer();
         pll.HelpViewer(appSrartPath);
     }
     catch (Exception)
     {
         MessageBox.Show("Failed to View Help.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #3
0
 private void lnklblOnline_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         ProLogicLayer pll = new ProLogicLayer();
         pll.WebLinkOfficial();
     }
     catch (Exception)
     {
         MessageBox.Show("Failed to Open.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #4
0
 private void updateToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         ProLogicLayer pll = new ProLogicLayer();
         pll.WebLinkApp();
         AppStatus("Open Update.");
     }
     catch (Exception)
     {
         MessageBox.Show("Failed to Open.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #5
0
        protected void CheckEmailValidity()
        {
            try
            {
                ProLogicLayer pll = new ProLogicLayer();

                if (!string.IsNullOrEmpty(txtbxToEmail.Text.Trim().ToString()))
                {
                    if (!pll.IsValidEmail(txtbxToEmail.Text.Trim().ToString()))
                    {
                        Status = false;
                        statusFlag++;
                        txtbxToEmail.Focus();
                        AppStatus("Check email address. Example: \"[email protected]\".");
                    }
                }
                else if (!string.IsNullOrEmpty(txtbxCCEmail.Text.Trim().ToString()))
                {
                    if (!pll.IsValidEmail(txtbxCCEmail.Text.Trim().ToString()))
                    {
                        Status = false;
                        statusFlag++;
                        txtbxCCEmail.Focus();
                        AppStatus("Check email address. Example: \"[email protected]\".");
                    }
                }
                else if (!string.IsNullOrEmpty(txtbxBCCEmail.Text.Trim().ToString()))
                {
                    if (!pll.IsValidEmail(txtbxBCCEmail.Text.Trim().ToString()))
                    {
                        Status = false;
                        statusFlag++;
                        txtbxBCCEmail.Focus();
                        AppStatus("Check email address. Example: \"[email protected]\".");
                    }
                }
                else if (!string.IsNullOrEmpty(txtbxReplyToEmail.Text.Trim().ToString()))
                {
                    if (!pll.IsValidEmail(txtbxReplyToEmail.Text.Trim().ToString()))
                    {
                        Status = false;
                        statusFlag++;
                        txtbxReplyToEmail.Focus();
                        AppStatus("Check email address. Example: \"[email protected]\".");
                    }
                }


                if (statusFlag == 0)
                {
                    if (pll.IsValidEmail(txtbxFromEmail.Text.Trim().ToString()))
                    {
                        Status = false;
                        txtbxFromEmail.Focus();
                        AppStatus("Check email address. Example: \"example\" @ \"Select Server\".");
                    }
                    else
                    {
                        Status = true;
                    }
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Failed to check validity.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }