Esempio n. 1
0
        private void tabStrip1_TabStripItemClosing(TabStripItemClosingEventArgs e)
        {
            if (SelectedItemIndex < 0)
            {
                return;
            }

            //Остановка потоков и таймеров
            if (tabStrip1.Items[SelectedItemIndex].Title == "Кейворды")
            {
                KeywordsControl newControl = tabStrip1.Items[SelectedItemIndex].Controls[0] as KeywordsControl;
                if (newControl != null)
                {
                    newControl.StopAll();
                }
            }
            else if (tabStrip1.Items[SelectedItemIndex].Title == "Ссылки")
            {
                LinksControl newControl = tabStrip1.Items[SelectedItemIndex].Controls[0] as LinksControl;
                if (newControl != null)
                {
                    newControl.StopAll();
                }
            }
            else if (tabStrip1.Items[SelectedItemIndex].Title == "Бэклинки")
            {
                BackLinksControl newControl = tabStrip1.Items[SelectedItemIndex].Controls[0] as BackLinksControl;
                if (newControl != null)
                {
                    newControl.StopAll();
                }
            }
            else if (tabStrip1.Items[SelectedItemIndex].Title == "Текст")
            {
                TextControl newControl = tabStrip1.Items[SelectedItemIndex].Controls[0] as TextControl;
                if (newControl != null)
                {
                    newControl.StopAll();
                }
            }
            else if (tabStrip1.Items[SelectedItemIndex].Title == "Сниппеты")
            {
                SnippetsControl newControl = tabStrip1.Items[SelectedItemIndex].Controls[0] as SnippetsControl;
                if (newControl != null)
                {
                    newControl.StopAll();
                }
            }
        }
 protected void btnLogin_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         Security.logIn(txtUsername.Text, txtPassword.Text);
         Boolean isLogggedIn = Security.isLoggedIn();
         if (isLogggedIn)
         {
             checkLogin();
             LinksControl control = new LinksControl();
             control.reloadLinks();
             Response.Redirect(Request.Path);
         }
         else
         {
             lblLoginMessage.Text = "Wrong Username or Password. Please Try Again.";
         }
     }
 }
Esempio n. 3
0
 protected void btnLogin_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         Security.logIn(txtUsername.Text, txtPassword.Text);
         Boolean isLogggedIn = Security.isLoggedIn();
         if (isLogggedIn)
         {
             checkLogin();
             LinksControl control = new LinksControl();
             control.reloadLinks();
             Response.Redirect(Request.Path);
         }
         else
         {
             lblLoginMessage.Text = "Wrong Username or Password. Please Try Again.";
         }
     }
 }