private void pageControl1_onPre(object sender, PageEventArgs e)
        {
            if (backgroundWorker1.IsBusy) return;
            panelLoading.Visible = true;
            panelLoading.BringToFront();
            panelLoading.Location = new Point((this.Width / 2 - this.panelLoading.Width / 2), this.Height / 2 - this.panelLoading.Height - 20);

            String key = txtKey.Text.Trim();

            Page<ArchiveBean> p = new Page<ArchiveBean>();
            p.PageIdx = e.pageidx;
            p.PageSize = Bean.Constant.PAGESIZE;
            p.Key = key;
            p.showNoPosition = ckbNoPosition.Checked;

            backgroundWorker1.RunWorkerAsync(p);

        }
Beispiel #2
0
        private void pageControl1_onPre(object sender, PageEventArgs e)
        {
            if (backgroundWorker1.IsBusy) return;
            panelLoading.Visible = true;
            panelLoading.Location = new Point((this.Width / 2 - this.panelLoading.Width / 2), this.Height / 2 - this.panelLoading.Height - 20);
            
            String key = txtKey.Text.Trim();
          
            Page<FloorBean> p = new Page<FloorBean>();
            p.PageIdx = e.pageidx;
            p.PageSize = pagesize;
            p.Key = key;
         
            backgroundWorker1.RunWorkerAsync(p);

        }
Beispiel #3
0
        private void pageControl1_onPre(object sender, PageEventArgs e)
        {
            if (backgroundWorker1.IsBusy) return;

            panelLoading.Visible = true;
            panelLoading.Location = new Point((this.Width / 2 - this.panelLoading.Width / 2), this.Height / 2 - this.panelLoading.Height - 20);

            //int pageidx = 0;
            //if (btnPre.Tag == null)
            //{
            //    pageidx = 0;
            //}
            //else
            //{
            //    int.TryParse(btnPre.Tag.ToString(), out pageidx);
            //}

            String key = txtKey.Text.Trim();

            Page<ArchiveBean> p = new Page<ArchiveBean>();
            p.PageIdx = e.pageidx;//pageidx;
            p.PageSize = pagesize;
            p.Key = key;
            
            backgroundWorker1.RunWorkerAsync(p);
        }
Beispiel #4
0
        private void btnPre_Click(object sender, EventArgs e)
        {
            if (onPre != null)
            {
                int pageidx = 0;
                if (btnPre.Tag == null)
                {
                    pageidx = 0;
                }
                else
                {
                    int.TryParse(btnPre.Tag.ToString(), out pageidx);
                }

               
                PageEventArgs pe = new PageEventArgs();
                pe.pageidx = pageidx;
                
                onPre(sender, pe);
            }
        }
Beispiel #5
0
        private void txtPage_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (onGo != null)
                {
                    int pageidx = 0;
                    if (txtPage.Text == null)
                    {
                        txtPage.Text = "1";
                        pageidx = 1;
                    }
                    else
                    {
                        int.TryParse(txtPage.Text.ToString(), out pageidx);
                    }
                    pageidx--;
                    if (pageidx < 0) pageidx = 0;

                    
                    PageEventArgs pe = new PageEventArgs();
                    pe.pageidx = pageidx;
                    onGo(sender, pe);
                }
            }
        }
Beispiel #6
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            if (onNext != null)
            {
             
                int pageidx = 0;
                if (btnNext.Tag == null)
                {
                    pageidx = 0;
                }
                else
                {
                    int.TryParse(btnNext.Tag.ToString(), out pageidx);
                }

                //String key = txtKey.Text.Trim();
                PageEventArgs pe = new PageEventArgs();
                pe.pageidx = pageidx;

           
                onNext(sender, pe);
            }
        }
Beispiel #7
0
        private void btnPage_Click(object sender, EventArgs e)
        {
            if (onGo != null)
            {
                int pageidx = 0;
                if (txtPage.Text == null)
                {
                    txtPage.Text = "1";
                    pageidx = 1;
                }
                else
                {
                    int.TryParse(txtPage.Text.ToString(), out pageidx);
                }
                pageidx--;
                if (pageidx < 0) pageidx = 0;

                PageEventArgs pe = new PageEventArgs();
                pe.pageidx = pageidx;
                onGo(sender, pe);
            }

        }