예제 #1
0
        /// <summary>
        /// Manage tabs with internet requirements
        /// </summary>
        private void ProcessTabs()
        {
            bool internet = NotificationDefaults.CheckInternet();

            if (tabMetro.SelectedTab == tbNotifications)
            {
                NotificationDefaults.SetTabPreferences(out notify, tbNotifications, tabMetro);
                lblProductName.Text          = notify.ProductName;
                lblProductDesc.Text          = notify.ProductDescription;
                lnkProductLink.Text          = notify.URLText;
                lnkProductLink.Tag           = notify.URLTagClick;
                pbProductImage.SizeMode      = PictureBoxSizeMode.StretchImage;
                pbProductImage.ImageLocation = notify.ImageLocation;
            }
            else if (tabMetro.SelectedTab == tbHelp)
            {
                if (internet == true)
                {
                    webHelp.Navigate(NotificationDefaults.SupportURL);
                }
                else
                {
                    MetroMessageBox.Show(this, NotificationDefaults.NoInternetNotification, "EMM Internet Unavailable", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
예제 #2
0
        public frmEMM()
        {
            InitializeComponent();

            bw.WorkerReportsProgress      = true;
            bw.WorkerSupportsCancellation = true;

            bw.DoWork             += new DoWorkEventHandler(bw_DoWork);
            bw.ProgressChanged    += new ProgressChangedEventHandler(bw_ProgressChanged);
            bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted);

            dgvCMCampaign.AutoGenerateColumns = false;
            dgvUSUsers.AutoGenerateColumns    = false;

            NotificationDefaults.CheckInternet();
            notify = new Notification();
            //Load default page
            NotificationDefaults.SetTabPreferences(out notify, tbHomeUsersGroups, tabMetro);
            //checkHTMLorPlain();
        }