Esempio n. 1
0
        private void fmMain_Load(object sender, EventArgs e)
        {
            Https = null;
            tvLinks.Nodes.Clear();
            bClose = false;

            db = new clsDBTools(Application.ExecutablePath);
#if DEBUG
            db.Clear();
#endif

            if (db.RunTimeError)
            {
                MessageBox.Show("Open DB fail!");
                Application.Exit();
                return;
            }
            //load drama
            UpdateDrama();
        }
Esempio n. 2
0
        private void btnCheck_Click(object sender, EventArgs e)
        {
            if (txtURL.Text.Length <= 0)
                return;

            this.Cursor = Cursors.WaitCursor;

            curDrama = null;

            if (Https == null)
            {
                Https = new lstHttp();
            }
            
            var http = Https.Get(txtURL.Text);
            http.UserName = txtID.Text;
            http.Password = txtPWD.Text;
            http.Parser(txtURL.Text);
            tvLinks.Tag = http.Title;
            this.Text = (string)tvLinks.Tag;
            if ((null != http.Links) && (http.Links.Count > 0))
            {
                tvLinks.Nodes.Clear();
                tvLinks.CheckBoxes = true;
                foreach (DBEpisode epi in http.Links)
                {
                    AddToTreeView(epi, false);                                        
                }                
            }
            tvLinks.SelectionMode = TreeViewSelectionMode.SingleSelect;
            Application.DoEvents();
            this.Cursor = Cursors.Default;
        }