yuzhengyang 8 年 前
コミット
f363efa488

+ 1 - 1
Fork.Net/Azylee.Utils/Azylee.Core/Azylee.Core.csproj

@@ -22,7 +22,7 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
+    <DebugType>none</DebugType>
     <Optimize>true</Optimize>
     <OutputPath>bin\Release\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>

+ 1 - 1
Fork.Net/Azylee.Utils/Azylee.WinformMan/Azylee.WinformMan.csproj

@@ -22,7 +22,7 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
+    <DebugType>none</DebugType>
     <Optimize>true</Optimize>
     <OutputPath>bin\Release\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>

+ 1 - 1
Fork.Net/Azylee.Utils/Azylee.WinformSkin/Azylee.WinformSkin.csproj

@@ -22,7 +22,7 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
+    <DebugType>none</DebugType>
     <Optimize>true</Optimize>
     <OutputPath>bin\Release\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>

+ 3 - 3
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/CustomTitle/BigIconForm.Designer.cs

@@ -190,10 +190,10 @@
         private System.Windows.Forms.Panel BigIconFormPNHeadIcon;
         public System.Windows.Forms.PictureBox BigIconFormPBHeadIcon;
         public System.Windows.Forms.Panel BigIconFormPNContainer;
-        private System.Windows.Forms.Button BigIconFormBTFormMinBox;
-        private System.Windows.Forms.Button BigIconFormBTFormMaxBox;
-        private System.Windows.Forms.Button BigIconFormBTFormCloseBox;
         public System.Windows.Forms.Panel BigIconFormPNHead;
         public System.Windows.Forms.Panel BigIconFormPNHeadButton;
+        public System.Windows.Forms.Button BigIconFormBTFormMinBox;
+        public System.Windows.Forms.Button BigIconFormBTFormMaxBox;
+        public System.Windows.Forms.Button BigIconFormBTFormCloseBox;
     }
 }

+ 13 - 0
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/CustomTitle/BigIconForm.cs

@@ -40,6 +40,19 @@ namespace Azylee.WinformSkin.FormUI.CustomTitle
             }
         }
         #endregion
+        #region UI界面调整方法
+        public void UIMax()
+        {
+            Invoke(new Action(() =>
+            {
+                if (WindowState != FormWindowState.Maximized)
+                {
+                    MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
+                    WindowState = FormWindowState.Maximized;
+                }
+            }));
+        }
+        #endregion
         #region 窗口操作:拖动、边框、最小化、最大化、还原、双击标题栏最大化、拖动标题栏还原、关闭
         /// <summary>
         /// 拖动窗口移动

+ 41 - 18
Fork.Net/Azylee.Utils/Azylee.WinformSkin/UserWidgets/PageWidgets/PageToolBar.cs

@@ -32,15 +32,18 @@ namespace Azylee.WinformSkin.UserWidgets.PageWidgets
         #region 初始化和修改参数
         public void Init(PageDataProvider provider, int pageIndex, int dataCount, int pageSize)
         {
-            if (!IsInit)
+            if (!DesignMode)
             {
-                Provider += provider;
+                if (!IsInit)
+                {
+                    Provider += provider;
 
-                PageIndex = pageIndex;
-                PageSize = pageSize;
-                DataCount = dataCount;
-                PageTotal = DataCount % pageSize == 0 ? DataCount / pageSize : (DataCount / pageSize) + 1;
-                IsInit = true;
+                    PageIndex = pageIndex;
+                    PageSize = pageSize;
+                    DataCount = dataCount;
+                    PageTotal = DataCount % pageSize == 0 ? DataCount / pageSize : (DataCount / pageSize) + 1;
+                    IsInit = true;
+                }
             }
         }
         public void Init(PageDataProvider provider, int pageIndex, int pageSize)
@@ -53,15 +56,21 @@ namespace Azylee.WinformSkin.UserWidgets.PageWidgets
         /// <param name="dataCount"></param>
         public void SetDataCount(int dataCount)
         {
-            DataCount = dataCount;
-            PageTotal = DataCount % PageSize == 0 ? DataCount / PageSize : (DataCount / PageSize) + 1;
-            if (!ParentForm.IsDisposed)
+            if (!DesignMode)
             {
-                ParentForm.Invoke(new Action(() =>
+                DataCount = dataCount;
+                PageTotal = DataCount % PageSize == 0 ? DataCount / PageSize : (DataCount / PageSize) + 1;
+                if (PageIndex > PageTotal) PageIndex = 1;
+                if (PageTotal == 0) PageTotal = 1;
+
+                if (!ParentForm.IsDisposed)
                 {
-                    //调整控件展示界面(第几页,共几页)
-                    LBPageDesc.Text = string.Format("第 {0} 页,共 {1} 页", PageIndex, PageTotal);
-                }));
+                    ParentForm.Invoke(new Action(() =>
+                    {
+                        //调整控件展示界面(第几页,共几页)
+                        LBPageDesc.Text = string.Format("第 {0} 页,共 {1} 页", PageIndex, PageTotal);
+                    }));
+                }
             }
         }
         #endregion
@@ -72,16 +81,30 @@ namespace Azylee.WinformSkin.UserWidgets.PageWidgets
         /// </summary>
         public void ReadFirstPage()
         {
-            PageIndex = 1;
-            QueryPageData(new PageDataProviderArgs(PageIndex, PageSize));
+            if (!DesignMode)
+            {
+                PageIndex = 1;
+                QueryPageData(new PageDataProviderArgs(PageIndex, PageSize));
+            }
         }
         /// <summary>
         /// 加载默认页(或刷新)
         /// </summary>
         public void ReadDefaultPage()
         {
-            PageIndex = PageIndex >= 1 ? PageIndex : 1;
-            QueryPageData(new PageDataProviderArgs(PageIndex, PageSize));
+            if (!DesignMode)
+            {
+                PageIndex = PageIndex >= 1 ? PageIndex : 1;
+                QueryPageData(new PageDataProviderArgs(PageIndex, PageSize));
+            }
+        }
+        public void Clear()
+        {
+            PageIndex = 1;
+            Invoke(new Action(() =>
+            {
+                LBPageDesc.Text = "第 1 页,共 1 页";
+            }));
         }
         #endregion