Ejemplo n.º 1
0
        /// <summary>
        /// 页面控件呈现
        /// </summary>
        private void DrawControl()
        {
            this.btnGo.Text = this.JumpText;
            //lblCurrentPage.Text = string.Format("{0}/{1}  共 {2} 条记录,每页 {3} 条", CurrentPage.ToString(),
            //    this.PageCount.ToString(), TotalCount.ToString(), RecordsPerPage.ToString());
            this.lblCurrentPage.Text = CurrentPage.ToString();
            this.lblPageCount.Text   = PageCount.ToString();
            this.lblTotalCount.Text  = TotalCount.ToString();
            this.lblRecPerPg.Text    = RecordsPerPage.ToString();

            if (currentPageChanged != null && isNeedNotify)
            {
                currentPageChanged(this, null);//当前分页数字改变时,触发委托事件
            }
            SetFormCtrEnabled();
            if (PageCount == 1)//有且仅有一页
            {
                this.lnkFirst.Enabled     = false;
                this.simpBtnFirst.Enabled = false;

                this.lnkPrev.Enabled     = false;
                this.simpBtnPrev.Enabled = false;

                this.lnkNext.Enabled     = false;
                this.simpBtnNext.Enabled = false;

                this.lnkLast.Enabled     = false;
                this.simpBtnLast.Enabled = false;
                this.btnGo.Enabled       = false;
            }
            else if (CurrentPage == 1)//第一页
            {
                this.lnkFirst.Enabled     = false;
                this.simpBtnFirst.Enabled = false;
                this.lnkPrev.Enabled      = false;
                this.simpBtnPrev.Enabled  = false;
                //this.lnkFirst.ForeColor = Color.Gray;
                //this.lnkPrev.ForeColor = Color.Gray;
            }
            else if (CurrentPage == this.PageCount)//最后一页
            {
                this.lnkNext.Enabled     = false;
                this.simpBtnNext.Enabled = false;
                this.lnkLast.Enabled     = false;
                this.simpBtnLast.Enabled = false;
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 ///		Graba los datos
 /// </summary>
 public void Save()
 {
     MainViewModel.ViewsController.PluginController.ConfigurationController.SetConfiguration("BlogReader", nameof(PathBlogs), PathBlogs);
     MainViewModel.ViewsController.PluginController.ConfigurationController.SetConfiguration("BlogReader", nameof(MinutesBetweenDownload), MinutesBetweenDownload.ToString());
     MainViewModel.ViewsController.PluginController.ConfigurationController.SetConfiguration("BlogReader", nameof(RecordsPerPage), RecordsPerPage.ToString());
     MainViewModel.ViewsController.PluginController.ConfigurationController.SetConfiguration("BlogReader", nameof(DownloadEnabled), DownloadEnabled.ToString());
     MainViewModel.ViewsController.PluginController.ConfigurationController.SetConfiguration("BlogReader", nameof(SeeEntriesRead), SeeEntriesRead.ToString());
     MainViewModel.ViewsController.PluginController.ConfigurationController.SetConfiguration("BlogReader", nameof(SeeEntriesNotRead), SeeEntriesNotRead.ToString());
     MainViewModel.ViewsController.PluginController.ConfigurationController.SetConfiguration("BlogReader", nameof(SeeEntriesInteresting), SeeEntriesInteresting.ToString());
 }