diff --git a/29WxOrder/29WxOrder.csproj b/29WxOrder/29WxOrder.csproj
index ef095ec..9c63734 100644
--- a/29WxOrder/29WxOrder.csproj
+++ b/29WxOrder/29WxOrder.csproj
@@ -236,12 +236,6 @@
MyProSkuItemsControl.cs
-
- Component
-
-
- UcCheckBox.cs
-
UserControl
diff --git a/29WxOrder/MainForm.Designer.cs b/29WxOrder/MainForm.Designer.cs
index 89d7a7d..a8310d2 100644
--- a/29WxOrder/MainForm.Designer.cs
+++ b/29WxOrder/MainForm.Designer.cs
@@ -54,7 +54,7 @@ namespace _29WxOrder
this.pnlAfterSale = new DevComponents.DotNetBar.PanelEx();
this.pnlOrderManage = new DevComponents.DotNetBar.PanelEx();
this.splitMain = new System.Windows.Forms.SplitContainer();
- this.chkHasLogisticsThenSend = new TemuKJD.UserComponent.UcCheckBox(this.components);
+ this.chkHasLogisticsThenSend = new Work.UserComponents.UcCheckBox(this.components);
this.btn电子面单测试 = new System.Windows.Forms.Button();
this.btnExportExcel = new DevComponents.DotNetBar.PanelEx();
this.btnSetMutliBuyer = new DevComponents.DotNetBar.PanelEx();
@@ -1783,7 +1783,7 @@ namespace _29WxOrder
private DevComponents.DotNetBar.Controls.CheckBoxX chkUseMultiBuyer;
private DevComponents.DotNetBar.PanelEx btnSetMutliBuyer;
private System.Windows.Forms.Button btn电子面单测试;
- private TemuKJD.UserComponent.UcCheckBox chkHasLogisticsThenSend;
+ private Work.UserComponents.UcCheckBox chkHasLogisticsThenSend;
}
}
diff --git a/AllBase/GetHtml.cs b/AllBase/GetHtml.cs
index 26b810f..886379d 100644
--- a/AllBase/GetHtml.cs
+++ b/AllBase/GetHtml.cs
@@ -12,6 +12,7 @@ using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.IO;
+using System.IO.Compression;
using System.Net;
using System.Security.Cryptography;
using System.Text;
@@ -44,6 +45,95 @@ namespace AllBase
}
+ ///
+ /// 读取网络图片转为Img以在DataGridView中显示,用于HttpWebRequest直接读取可能403的情况
+ ///
+ ///
+ ///
+ ///
+ public static Image GetUrlImg(string imgUrl, out string rst)
+ {
+ rst = "";
+ //return LoadImage(imgUrl);
+ Image image = null;
+ HttpWebResponse response = null;
+ try
+ {
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(imgUrl);
+
+ request.KeepAlive = true;
+ request.Headers.Set(HttpRequestHeader.CacheControl, "max-age=0");
+ request.Headers.Add("Upgrade-Insecure-Requests", @"1");
+ request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
+ request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7";
+ request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate");
+ request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9");
+ //request.IfModifiedSince = DateTime.Parse("Fri, 18 Jul 2025 06:00:49 GMT"); // 没改动不更新,CS程序无缓存不使用
+
+ response = (HttpWebResponse)request.GetResponse();
+
+ using (Stream stream = response.GetResponseStream())
+ {
+ image = Image.FromStream(stream);
+ }
+ }
+ catch (WebException ex)
+ {
+ if (ex.Status == WebExceptionStatus.ProtocolError)
+ {
+ response = (HttpWebResponse)ex.Response;
+ rst = ReadResponse(response);
+ }
+ if (string.IsNullOrEmpty(rst))
+ rst = ex.Message;
+ }
+ catch (Exception e)
+ {
+ rst = e.Message;
+ }
+ if (response != null)
+ {
+ response.Close();
+ response.Dispose();
+ }
+ return image;
+
+ //try
+ //{
+ // if (!string.IsNullOrEmpty(prodSelect?.main_img))
+ // {
+ // using (Stream stream = WebRequest.Create(prodSelect.main_img.Replace("https", "http")).GetResponse().GetResponseStream())
+ // {
+ // image = Image.FromStream(stream);
+ // }
+ // }
+ //}
+ //catch (Exception ex)
+ //{
+ //}
+ }
+
+ public static string ReadResponse(HttpWebResponse response, Encoding encoding = null)
+ {
+ using (Stream responseStream = response.GetResponseStream())
+ {
+ Stream streamToRead = responseStream;
+ if (response.ContentEncoding.ToLower().Contains("gzip"))
+ {
+ streamToRead = new GZipStream(streamToRead, CompressionMode.Decompress);
+ }
+ else if (response.ContentEncoding.ToLower().Contains("deflate"))
+ {
+ streamToRead = new DeflateStream(streamToRead, CompressionMode.Decompress);
+ }
+ if (encoding == null) encoding = Encoding.UTF8;
+ using (StreamReader streamReader = new StreamReader(streamToRead, encoding))
+ {
+ return streamReader.ReadToEnd();
+ }
+ }
+ }
+
///
/// 代理抓取
///
diff --git a/Work/29WxOrderWork.csproj b/Work/29WxOrderWork.csproj
index 29cd545..d8a5e52 100644
--- a/Work/29WxOrderWork.csproj
+++ b/Work/29WxOrderWork.csproj
@@ -71,7 +71,7 @@
False
- DLL\DevComponents.DotNetBar2.dll
+ ..\DllReference\DevComponents.DotNetBar2.dll
False
@@ -81,6 +81,10 @@
False
..\DllReference\NaiBa.Util.dll
+
+ False
+ ..\DllReference\NaiBa.Util.Winform.dll
+
..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll
@@ -102,6 +106,12 @@
+
+ Form
+
+
+ BaseForm.cs
+
Form
@@ -114,6 +124,75 @@
BaseMsgForm.cs
+
+ Component
+
+
+
+ UserControl
+
+
+ StatusBarUserControl.cs
+
+
+ UserControl
+
+
+ UcSplitPage.cs
+
+
+ Component
+
+
+
+ Component
+
+
+ Component
+
+
+ Component
+
+
+ UcCheckBox.cs
+
+
+ Component
+
+
+ Component
+
+
+ UcComboBoxMutiSelect .cs
+
+
+
+ UcDataGridViewCheckBoxColumn.cs
+
+
+ Component
+
+
+ UcGroupBoxEx.cs
+
+
+ Component
+
+
+ UcTabControl.cs
+
+
+ Component
+
+
+ UcTabControlMetro.cs
+
+
+ Component
+
+
+ UcTreeView.cs
+
@@ -132,6 +211,8 @@
+
+
@@ -164,7 +245,6 @@
-
@@ -175,6 +255,7 @@
+
@@ -193,12 +274,24 @@
+
+ BaseForm.cs
+
BaseGeneralForm.cs
BaseMsgForm.cs
+
+ StatusBarUserControl.cs
+
+
+ UcSplitPage.cs
+
+
+ DataGridViewEx.cs
+
ResXFileCodeGenerator
Resources.Designer.cs
diff --git a/Work/BaseForms/BaseForm.Designer.cs b/Work/BaseForms/BaseForm.Designer.cs
index dd82320..168a150 100644
--- a/Work/BaseForms/BaseForm.Designer.cs
+++ b/Work/BaseForms/BaseForm.Designer.cs
@@ -29,149 +29,20 @@ namespace Work.BaseForms
///
private void InitializeComponent()
{
- this.panel2 = new System.Windows.Forms.Panel();
- this.pbMinBase = new System.Windows.Forms.PictureBox();
- this.pbNormalBase = new System.Windows.Forms.PictureBox();
- this.pbMaxBase = new System.Windows.Forms.PictureBox();
- this.pictureBox3 = new System.Windows.Forms.PictureBox();
- this.lbTitle = new System.Windows.Forms.Label();
- this.pbCloseBase = new System.Windows.Forms.PictureBox();
- this.panel2.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pbMinBase)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.pbNormalBase)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.pbMaxBase)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).BeginInit();
this.SuspendLayout();
//
- // panel2
- //
- this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(160)))), ((int)(((byte)(233)))));
- this.panel2.Controls.Add(this.pbMinBase);
- this.panel2.Controls.Add(this.pbNormalBase);
- this.panel2.Controls.Add(this.pbMaxBase);
- this.panel2.Controls.Add(this.pictureBox3);
- this.panel2.Controls.Add(this.lbTitle);
- this.panel2.Controls.Add(this.pbCloseBase);
- this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
- this.panel2.Location = new System.Drawing.Point(0, 0);
- this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(386, 32);
- this.panel2.TabIndex = 2;
- this.panel2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseDown);
- this.panel2.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseMove);
- //
- // pbMinBase
- //
- this.pbMinBase.Dock = System.Windows.Forms.DockStyle.Right;
- this.pbMinBase.Image = global::Work.Properties.Resources.min;
- this.pbMinBase.Location = new System.Drawing.Point(258, 0);
- this.pbMinBase.Name = "pbMinBase";
- this.pbMinBase.Size = new System.Drawing.Size(32, 32);
- this.pbMinBase.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
- this.pbMinBase.TabIndex = 1;
- this.pbMinBase.TabStop = false;
- this.pbMinBase.Click += new System.EventHandler(this.PictureBox2_Click);
- this.pbMinBase.MouseLeave += new System.EventHandler(this.PictureBox2_MouseLeave);
- this.pbMinBase.MouseHover += new System.EventHandler(this.PictureBox2_MouseHover);
- //
- // pbNormalBase
- //
- this.pbNormalBase.Dock = System.Windows.Forms.DockStyle.Right;
- this.pbNormalBase.Image = global::Work.Properties.Resources.normal;
- this.pbNormalBase.Location = new System.Drawing.Point(290, 0);
- this.pbNormalBase.Name = "pbNormalBase";
- this.pbNormalBase.Size = new System.Drawing.Size(32, 32);
- this.pbNormalBase.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
- this.pbNormalBase.TabIndex = 6;
- this.pbNormalBase.TabStop = false;
- this.pbNormalBase.Visible = false;
- this.pbNormalBase.Click += new System.EventHandler(this.pbNormalBase_Click);
- this.pbNormalBase.MouseLeave += new System.EventHandler(this.pbNormalBase_MouseLeave);
- this.pbNormalBase.MouseHover += new System.EventHandler(this.pbNormalBase_MouseHover);
- //
- // pbMaxBase
- //
- this.pbMaxBase.Dock = System.Windows.Forms.DockStyle.Right;
- this.pbMaxBase.Image = global::Work.Properties.Resources.max;
- this.pbMaxBase.Location = new System.Drawing.Point(322, 0);
- this.pbMaxBase.Name = "pbMaxBase";
- this.pbMaxBase.Size = new System.Drawing.Size(32, 32);
- this.pbMaxBase.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
- this.pbMaxBase.TabIndex = 5;
- this.pbMaxBase.TabStop = false;
- this.pbMaxBase.Visible = false;
- this.pbMaxBase.Click += new System.EventHandler(this.pbMaxBase_Click);
- this.pbMaxBase.MouseLeave += new System.EventHandler(this.pbMaxBase_MouseLeave);
- this.pbMaxBase.MouseHover += new System.EventHandler(this.pbMaxBase_MouseHover);
- //
- // pictureBox3
- //
- this.pictureBox3.BackColor = System.Drawing.Color.Transparent;
- this.pictureBox3.Image = global::Work.Properties.Resources.icon;
- this.pictureBox3.Location = new System.Drawing.Point(5, 3);
- this.pictureBox3.Name = "pictureBox3";
- this.pictureBox3.Size = new System.Drawing.Size(23, 23);
- this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.pictureBox3.TabIndex = 3;
- this.pictureBox3.TabStop = false;
- //
- // lbTitle
- //
- this.lbTitle.AutoSize = true;
- this.lbTitle.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.lbTitle.ForeColor = System.Drawing.Color.White;
- this.lbTitle.Location = new System.Drawing.Point(31, 6);
- this.lbTitle.Name = "lbTitle";
- this.lbTitle.Size = new System.Drawing.Size(45, 17);
- this.lbTitle.TabIndex = 2;
- this.lbTitle.Text = "label1";
- //
- // pbCloseBase
- //
- this.pbCloseBase.Dock = System.Windows.Forms.DockStyle.Right;
- this.pbCloseBase.Image = global::Work.Properties.Resources.close;
- this.pbCloseBase.Location = new System.Drawing.Point(354, 0);
- this.pbCloseBase.Name = "pbCloseBase";
- this.pbCloseBase.Size = new System.Drawing.Size(32, 32);
- this.pbCloseBase.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
- this.pbCloseBase.TabIndex = 0;
- this.pbCloseBase.TabStop = false;
- this.pbCloseBase.Click += new System.EventHandler(this.PictureBox1_Click);
- this.pbCloseBase.MouseLeave += new System.EventHandler(this.PictureBox1_MouseLeave);
- this.pbCloseBase.MouseHover += new System.EventHandler(this.PictureBox1_MouseHover);
- //
// BaseForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(160)))), ((int)(((byte)(233)))));
- this.ClientSize = new System.Drawing.Size(386, 183);
- this.Controls.Add(this.panel2);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ this.ClientSize = new System.Drawing.Size(800, 450);
this.Name = "BaseForm";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "BaseForm";
- this.Load += new System.EventHandler(this.LcBaseForm_Load);
- this.panel2.ResumeLayout(false);
- this.panel2.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pbMinBase)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.pbNormalBase)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.pbMaxBase)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).EndInit();
+ this.Load += new System.EventHandler(this.BaseForm_Load);
this.ResumeLayout(false);
}
#endregion
-
- private System.Windows.Forms.Panel panel2;
- private System.Windows.Forms.PictureBox pbMinBase;
- private System.Windows.Forms.PictureBox pbNormalBase;
- private System.Windows.Forms.PictureBox pbMaxBase;
- private System.Windows.Forms.PictureBox pictureBox3;
- private System.Windows.Forms.Label lbTitle;
- protected System.Windows.Forms.PictureBox pbCloseBase;
}
}
\ No newline at end of file
diff --git a/Work/BaseForms/BaseForm.cs b/Work/BaseForms/BaseForm.cs
index 2b5d53c..06379b4 100644
--- a/Work/BaseForms/BaseForm.cs
+++ b/Work/BaseForms/BaseForm.cs
@@ -1,278 +1,181 @@
using AllBase;
+using AllBase.Helper;
+using DevComponents.DotNetBar;
+using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
-using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
+using Work.UserControls;
namespace Work.BaseForms
{
public partial class BaseForm : Form
{
- const int WM_NCHITTEST = 0x0084;
- const int HTLEFT = 10; //左边界
- const int HTRIGHT = 11; //右边界
- const int HTTOP = 12; //上边界
- const int HTTOPLEFT = 13; //左上角
- const int HTTOPRIGHT = 14; //右上角
- const int HTBOTTOM = 15; //下边界
- const int HTBOTTOMLEFT = 0x10; //左下角
- const int HTBOTTOMRIGHT = 17; //右下角
-
- protected bool Minimized { get { return this.pbMinBase.Visible; } set { this.pbMinBase.Visible = value; } }
-
- protected override void WndProc(ref Message m)
- {
- switch (m.Msg)
- {
- case WM_NCHITTEST:
- base.WndProc(ref m);
- Point vPoint = new Point((int)m.LParam & 0xFFFF,
- (int)m.LParam >> 16 & 0xFFFF);
- vPoint = PointToClient(vPoint);
- if (vPoint.X <= 5)
- if (vPoint.Y <= 5)
- m.Result = (IntPtr)HTTOPLEFT;
- else if (vPoint.Y >= ClientSize.Height - 5)
- m.Result = (IntPtr)HTBOTTOMLEFT;
- else m.Result = (IntPtr)HTLEFT;
- else if (vPoint.X >= ClientSize.Width - 5)
- if (vPoint.Y <= 5)
- m.Result = (IntPtr)HTTOPRIGHT;
- else if (vPoint.Y >= ClientSize.Height - 5)
- m.Result = (IntPtr)HTBOTTOMRIGHT;
- else m.Result = (IntPtr)HTRIGHT;
- else if (vPoint.Y <= 5)
- m.Result = (IntPtr)HTTOP;
- else if (vPoint.Y >= ClientSize.Height - 5)
- m.Result = (IntPtr)HTBOTTOM;
- break;
- default:
- base.WndProc(ref m);
- break;
- }
- }
- public BaseForm()
- {
- InitializeComponent();
- this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
- if (FileBase.Exists(BaseClass.ProgromLogoIco))
- {
- Image img = Image.FromFile(BaseClass.ProgromLogoIco);
- pictureBox3.Image = img;
- }
- }
-
- private void LcBaseForm_Load(object sender, EventArgs e)
- {
- if (BaseClass.Ico != null)
- Iconx = Icon = BaseClass.Ico;
- else
- Iconx = Icon = BaseClass.Ico = ImageBuild.ConvertToIcon(Properties.Resources.icon);
-
-
- if (this.IsShowMax)
- {
- if (this.WindowState == FormWindowState.Maximized)
- {
- this.pbMaxBase.Visible = false;
- this.pbNormalBase.Visible = true;
- }
- else
- {
- this.pbMaxBase.Visible = true;
- this.pbNormalBase.Visible = false;
- }
- }
- }
-
- private void PictureBox2_Click(object sender, EventArgs e)
- {
- WindowState = FormWindowState.Minimized;
- }
-
- public virtual void PictureBox1_Click(object sender, EventArgs e)
- {
- //pictureBox3.Image?.Dispose();
- Close();
- }
-
- private Icon _iconx;
- public Icon Iconx
- {
- set
- {
- _iconx = value;
- if (_iconx == null) return;
-
- using (MemoryStream mStream = new MemoryStream())
- {
- _iconx.Save(mStream);
- Image image = Image.FromStream(mStream);
- pictureBox3.Image = image;
- }
- }
- }
-
- private bool isShowMax = false;
- public bool IsShowMax
- {
- get { return isShowMax; }
- set
- {
- isShowMax = value;
- if (isShowMax)
- {
- if (this.WindowState == FormWindowState.Maximized)
- {
- this.pbMaxBase.Visible = false;
- this.pbNormalBase.Visible = true;
- }
- else
- {
- this.pbMaxBase.Visible = true;
- this.pbNormalBase.Visible = false;
- }
- }
- else
- {
- this.pbMaxBase.Visible = false;
- this.pbNormalBase.Visible = false;
- }
- }
- }
-
- public string TitleText
+ public bool IsSetFontScaleNone { get; set; } = true;
+ public float FormDpi
{
get
{
- return Text;
+ return dpi;
}
- set
+ }
+ private float dpi = 96;
+
+ public BaseForm()
+ {
+ InitializeComponent();
+ }
+
+ private void BaseForm_Load(object sender, EventArgs e)
+ {
+ setSkinColor(this);
+
+ using (Graphics graphics = Graphics.FromHwnd(IntPtr.Zero))
{
- Text = lbTitle.Text = value;
- }
- }
- private Point mouseOffset;//记录鼠标指针的坐标
- private bool isMouseDown;//记录鼠标左键是否按下
- private void Panel1_MouseMove(object sender, MouseEventArgs e)
- {
- if (isMouseDown)
- {//获取鼠标的位置
- Point mousePos = MousePosition;
- mousePos.Offset(mouseOffset.X, mouseOffset.Y);
- Location = mousePos;
+ dpi = graphics.DpiX;
+ // 或者使用 graphics.DpiY 获取垂直方向的DPI
+ // float dpi = graphics.DpiY;
+ // Console.WriteLine("Screen DPI: " + dpi); // winform程序会闪退
+
+ if (IsSetFontScaleNone)
+ SetFont(this, dpi);
}
}
- private void Panel1_MouseDown(object sender, MouseEventArgs e)
+ public void SetFont(Control control, float dpi)
{
- if (e.Button == MouseButtons.Left)
+ foreach (Control c in control.Controls)
{
- mouseOffset = new Point(-e.X, -e.Y);
- isMouseDown = true;
+ SetFont(c, dpi);
+
+ Font of = c.Font;
+ Font nf = new Font(of.FontFamily, (of.Size * 96.0 / dpi).ParseToFloat(), of.Style, of.Unit, of.GdiCharSet, of.Bold);
+ c.Font = nf;
+
+ if (c is DevComponents.DotNetBar.PanelEx)
+ {
+ var pEx = (c as DevComponents.DotNetBar.PanelEx);
+ if (pEx.Style.Font != null)
+ {
+ Font osf = pEx.Style.Font;
+ Font nsf = new Font(osf.FontFamily, (osf.Size * 96.0 / dpi).ParseToFloat(), osf.Style, osf.Unit, osf.GdiCharSet, osf.Bold);
+ pEx.Style.Font = nsf;
+ }
+
+ if (pEx.StyleMouseOver.Font != null)
+ {
+ Font oof = pEx.StyleMouseOver.Font;
+ Font nof = new Font(oof.FontFamily, (oof.Size * 96.0 / dpi).ParseToFloat(), oof.Style, oof.Unit, oof.GdiCharSet, oof.Bold);
+ pEx.StyleMouseOver.Font = nof;
+ }
+
+ if (pEx.StyleMouseDown.Font != null)
+ {
+ Font odf = pEx.StyleMouseDown.Font;
+ Font ndf = new Font(odf.FontFamily, (odf.Size * 96.0 / dpi).ParseToFloat(), odf.Style, odf.Unit, odf.GdiCharSet, odf.Bold);
+ pEx.StyleMouseDown.Font = ndf;
+ }
+ }
+ if (c is UserComponents.UcTreeView)
+ {
+ var tree = c as UserComponents.UcTreeView;
+ Font ogf = tree.GroupFont;
+ Font ngf = new Font(ogf.FontFamily, (ogf.Size * 96.0 / dpi).ParseToFloat(), ogf.Style, ogf.Unit, ogf.GdiCharSet, ogf.Bold);
+ tree.GroupFont = ngf;
+ }
+
+ if (c.Name == "pnlSA")
+ {
+ }
}
}
- private void Panel1_MouseUp(object sender, MouseEventArgs e)
+ public void setSkinColor(Control control)
{
- isMouseDown = false;
- }
-
- private void PictureBox1_MouseHover(object sender, EventArgs e)
- {
- this.pbCloseBase.Image = global::Work.Properties.Resources.close_hover;
- this.Cursor = Cursors.Hand;
-
- }
-
- private void PictureBox1_MouseLeave(object sender, EventArgs e)
- {
- this.pbCloseBase.Image = global::Work.Properties.Resources.close;
- this.Cursor = Cursors.Default;
-
- }
-
- private void PictureBox2_MouseHover(object sender, EventArgs e)
- {
- this.pbMinBase.Image = global::Work.Properties.Resources.min_hover;
- this.Cursor = Cursors.Hand;
-
- }
-
- private void PictureBox2_MouseLeave(object sender, EventArgs e)
- {
- this.pbMinBase.Image = global::Work.Properties.Resources.min;
- this.Cursor = Cursors.Default;
-
- }
-
- public virtual void HideTitle()
- {
- // this.panel1.Visible = false;
- }
-
- #region 窗体提交数据完成事件
- public event Action