Example #1
0
        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);

        }
Example #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);

        }
Example #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);
        }
Example #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);
            }
        }
Example #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);
                }
            }
        }
Example #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);
            }
        }
Example #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);
            }

        }