diff --git a/SunnyUI/Common/UImage.cs b/SunnyUI/Common/UImage.cs
index 77a033b8..67bd6696 100644
--- a/SunnyUI/Common/UImage.cs
+++ b/SunnyUI/Common/UImage.cs
@@ -31,9 +31,19 @@ using System.Windows.Forms;
namespace Sunny.UI
{
+ ///
+ /// 形状
+ ///
public enum UIShape
{
+ ///
+ /// 圆形
+ ///
Circle,
+
+ ///
+ /// 方形
+ ///
Square
}
@@ -54,7 +64,7 @@ namespace Sunny.UI
/// All Files|*.*
/// ------
///
- ///
+ /// 图片过滤字符串
public static string GetImageFilter()
{
StringBuilder allImageExtensions = new StringBuilder();
@@ -84,6 +94,11 @@ namespace Sunny.UI
return sb.ToString();
}
+ ///
+ /// 根据文件名利用内存流生成图片,加载后文件不占用
+ ///
+ /// 文件名
+ /// 图片
public static Image FromFile(string path)
{
if (File.Exists(path))
@@ -104,6 +119,12 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置图片不透明度
+ ///
+ /// 图片
+ /// 不透明度
+ /// 图片
public static Bitmap ChangeOpacity(Image img, float opacity)
{
Bitmap bmp = new Bitmap(img.Width, img.Height); // Determining Width and Height of Source Image
@@ -117,7 +138,14 @@ namespace Sunny.UI
return bmp;
}
- public static ImageList GetToolbarImageList(Type type, Image bitmap, Size imageSize, Color transparentColor)
+ ///
+ /// 获取工具栏图片列表
+ ///
+ /// 图片
+ /// 单图大小
+ /// 透明度
+ /// 图片列表
+ public static ImageList GetToolbarImageList(Image bitmap, Size imageSize, Color transparentColor)
{
ImageList imageList = new ImageList();
imageList.ImageSize = imageSize;
@@ -127,6 +155,13 @@ namespace Sunny.UI
return imageList;
}
+ ///
+ /// 图片截取
+ ///
+ /// 图片
+ /// 大小
+ /// 形状
+ /// 图片
public static Bitmap Split(this Image image, int size, UIShape shape)
{
//截图画板
@@ -158,6 +193,12 @@ namespace Sunny.UI
return result;
}
+ ///
+ /// 图片截取
+ ///
+ /// 图片
+ /// 路径
+ /// 图片
public static Bitmap Split(this Image image, GraphicsPath path)
{
//截图画板
@@ -175,6 +216,11 @@ namespace Sunny.UI
return result;
}
+ ///
+ /// 图片的绘图图元
+ ///
+ /// 图片
+ /// 绘图图元
public static Graphics Graphics(this Image image)
{
return System.Drawing.Graphics.FromImage(image);
@@ -183,8 +229,8 @@ namespace Sunny.UI
///
/// 图像水平翻转
///
- /// 原来图像
- ///
+ /// 原图像
+ /// 图像
public static Bitmap HorizontalFlip(this Bitmap image)
{
try
@@ -206,8 +252,8 @@ namespace Sunny.UI
///
/// 图像垂直翻转
///
- /// 原来图像
- ///
+ /// 原图像
+ /// 图像
public static Bitmap VerticalFlip(this Bitmap image)
{
try
@@ -575,6 +621,12 @@ namespace Sunny.UI
}
}
+ ///
+ /// 从Base64数据绘图
+ ///
+ /// 绘图图元
+ /// Base64
+ /// 区域
public static void DrawImageFromBase64(this Graphics g, string base64Image, Rectangle rect)
{
using (var ms = new System.IO.MemoryStream(Convert.FromBase64String(base64Image)))
@@ -585,6 +637,13 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制透明图片
+ ///
+ /// 绘图图元
+ /// 透明度
+ /// 图片
+ /// 区域
public static void DrawTransparentImage(this Graphics g, float alpha, Image image, Rectangle rect)
{
var colorMatrix = new ColorMatrix { Matrix33 = alpha };
@@ -594,6 +653,14 @@ namespace Sunny.UI
imageAttributes.Dispose();
}
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
public static void DrawStrokedRectangle(this Graphics g, Rectangle rect, Color bodyColor, Color strokeColor, int strokeThickness = 1)
{
using (var bodyBrush = new SolidBrush(bodyColor))
@@ -611,6 +678,14 @@ namespace Sunny.UI
}
}
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
public static void DrawStrokedEllipse(this Graphics g, Rectangle rect, Color bodyColor, Color strokeColor, int strokeThickness = 1)
{
using (var bodyBrush = new SolidBrush(bodyColor))
@@ -628,6 +703,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 图片转Baase64字符串
+ ///
+ /// 图片
+ /// 字符串
public static string ToBase64(this Image image)
{
using (var toBase64 = new MemoryStream())
@@ -638,6 +718,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// Base64字符串转图片
+ ///
+ /// 字符串
+ /// 图片
public static Image ToImage(string base64Image)
{
using (var toImage = new System.IO.MemoryStream(Convert.FromBase64String(base64Image)))
@@ -646,6 +731,12 @@ namespace Sunny.UI
}
}
+ ///
+ /// 图片存为图标
+ ///
+ /// 图片
+ /// 大小
+ /// 图标
public static Icon SaveToIcon(this Image img, int size = 16)
{
byte[] pngiconheader = new byte[] { 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
diff --git a/SunnyUI/Common/UJson.cs b/SunnyUI/Common/UJson.cs
index f7745e00..67b99438 100644
--- a/SunnyUI/Common/UJson.cs
+++ b/SunnyUI/Common/UJson.cs
@@ -28,8 +28,17 @@ using System.Web.Script.Serialization;
namespace Sunny.UI
{
+ ///
+ /// Json扩展类
+ ///
public static class Json
{
+ ///
+ /// 反序列化字符串为对象
+ ///
+ /// 对象类型
+ /// 字符串
+ /// 对象
public static T Deserialize(string input)
{
try
@@ -48,6 +57,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 序列号对象为字符串
+ ///
+ /// 对象
+ /// 字符串
public static string Serialize(object obj)
{
#if NETFRAMEWORK
@@ -58,12 +72,26 @@ namespace Sunny.UI
#endif
}
+ ///
+ /// 从文件读取字符串反序列化为对象
+ ///
+ /// 对象类型
+ /// 文件名
+ /// 文件编码
+ /// 对象
public static T DeserializeFromFile(string filename, Encoding encoding)
{
string jsonStr = File.ReadAllText(filename, encoding);
return Deserialize(jsonStr);
}
+ ///
+ /// 序列号对象为字符串并保存到文件
+ ///
+ /// 对象
+ /// 文件名
+ /// 文件编码
+ /// 字符串
public static string SerializeToFile(object obj, string filename, Encoding encoding)
{
string jsonStr = Serialize(obj);
diff --git a/SunnyUI/Common/ULocalize.cs b/SunnyUI/Common/ULocalize.cs
index ac01bebc..e72f94e3 100644
--- a/SunnyUI/Common/ULocalize.cs
+++ b/SunnyUI/Common/ULocalize.cs
@@ -22,6 +22,9 @@
namespace Sunny.UI
{
+ ///
+ /// 多语言字符串定义
+ ///
public static class UILocalize
{
///
@@ -94,37 +97,135 @@ namespace Sunny.UI
///
public static string SystemProcessing = "系统正在处理中,请稍候...";
+ ///
+ /// 星期一
+ ///
public static string Monday = "一";
+
+ ///
+ /// 星期二
+ ///
public static string Tuesday = "二";
+
+ ///
+ /// 星期三
+ ///
public static string Wednesday = "三";
+
+ ///
+ /// 星期四
+ ///
public static string Thursday = "四";
+
+ ///
+ /// 星期五
+ ///
public static string Friday = "五";
+
+ ///
+ /// 星期六
+ ///
public static string Saturday = "六";
+
+ ///
+ /// 星期日
+ ///
public static string Sunday = "日";
+ ///
+ /// 上一页
+ ///
public static string Prev = "上一页";
+
+ ///
+ /// 下一页
+ ///
public static string Next = "下一页";
+
+ ///
+ /// 第
+ ///
public static string SelectPageLeft = "第";
+
+ ///
+ /// 页
+ ///
public static string SelectPageRight = "页";
+ ///
+ /// 一月
+ ///
public static string January = "一月";
+
+ ///
+ /// 二月
+ ///
public static string February = "二月";
+
+ ///
+ /// 三月
+ ///
public static string March = "三月";
+
+ ///
+ /// 四月
+ ///
public static string April = "四月";
+
+ ///
+ /// 五月
+ ///
public static string May = "五月";
+
+ ///
+ /// 六月
+ ///
public static string June = "六月";
+
+ ///
+ /// 七月
+ ///
public static string July = "七月";
+
+ ///
+ /// 八月
+ ///
public static string August = "八月";
+
+ ///
+ /// 九月
+ ///
public static string September = "九月";
+
+ ///
+ /// 十月
+ ///
public static string October = "十月";
+
+ ///
+ /// 十一月
+ ///
public static string November = "十一月";
+
+ ///
+ /// 十二月
+ ///
public static string December = "十二月";
+ ///
+ /// 今天
+ ///
public static string Today = "今天";
}
+ ///
+ /// 多语言字符串帮助类
+ ///
public static class UILocalizeHelper
{
+ ///
+ /// 设置为英文
+ ///
public static void SetEN()
{
UILocalize.InfoTitle = "Info";
@@ -173,6 +274,9 @@ namespace Sunny.UI
UIStyles.Translate();
}
+ ///
+ /// 设置为中文
+ ///
public static void SetCH()
{
UILocalize.InfoTitle = "提示";
diff --git a/SunnyUI/Common/UMMFile.cs b/SunnyUI/Common/UMMFile.cs
index 886051a6..8a85bea4 100644
--- a/SunnyUI/Common/UMMFile.cs
+++ b/SunnyUI/Common/UMMFile.cs
@@ -67,11 +67,27 @@ using System.Threading;
namespace Sunny.UI
{
+ ///
+ /// 多进程通信类
+ ///
public sealed class MMFile : BackgroundWorkerEx, IDisposable
{
+ ///
+ /// 内存文件名
+ ///
public string MapName { get; }
+
+ ///
+ /// 大小
+ ///
public int Capacity { get; }
+ ///
+ /// 构造函数
+ ///
+ /// 内存文件名
+ /// 大小
+ /// 报错消息
public MMFile(string mapName, int capacity = 4096)
{
if (!FileEx.IsValidFileName(mapName))
@@ -91,8 +107,14 @@ namespace Sunny.UI
}
}
+ ///
+ /// 消息回调
+ ///
public event MMFileEventHandler OnMessage;
+ ///
+ /// 线程运行
+ ///
protected override void DoWorker()
{
try
@@ -109,6 +131,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 给目标内存文件写字符串
+ ///
+ /// 目标内存文件名
+ /// 消息字符串
public void Write(string dest, string message)
{
var mmf = MemoryMappedFile.CreateOrOpen(dest, Capacity, MemoryMappedFileAccess.ReadWrite);
@@ -184,18 +211,42 @@ namespace Sunny.UI
}
}
+ ///
+ /// 析构函数
+ ///
~MMFile()
{
Dispose();
}
}
+ ///
+ /// 回调事件定义
+ ///
+ /// 对象
+ /// 事件
public delegate void MMFileEventHandler(object sender, MMFileEventArgs e);
+
+ ///
+ /// 内存文件事件
+ ///
public class MMFileEventArgs : EventArgs
{
+ ///
+ /// 消息来源
+ ///
public string Source { get; set; }
+
+ ///
+ /// 消息字符串
+ ///
public string Value { get; set; }
+ ///
+ /// 构造函数
+ ///
+ /// 消息来源
+ /// 消息字符串
public MMFileEventArgs(string source, string value)
{
Source = source;
diff --git a/SunnyUI/Common/UMapper.cs b/SunnyUI/Common/UMapper.cs
index c66d5d6d..1dfcb7cc 100644
--- a/SunnyUI/Common/UMapper.cs
+++ b/SunnyUI/Common/UMapper.cs
@@ -27,6 +27,9 @@ using System.Reflection;
namespace Sunny.UI
{
+ ///
+ /// 轻量级的对象映射框架
+ ///
public static class Mapper
{
private static void Execute(T1 source, T2 dest)
@@ -157,6 +160,13 @@ namespace Sunny.UI
}
}
+ ///
+ /// T1映射到T2
+ ///
+ /// T1
+ /// T2
+ /// 源
+ /// 目标
public static void MapperTo(this T1 source, T2 dest)
where T1 : class
where T2 : class
@@ -164,6 +174,13 @@ namespace Sunny.UI
Execute(source, dest);
}
+ ///
+ /// T1从T2映射
+ ///
+ /// T1
+ /// T2
+ /// 源
+ /// 目标
public static void MapperFrom(this T1 dest, T2 source)
where T1 : class
where T2 : class
@@ -171,6 +188,11 @@ namespace Sunny.UI
Execute(source, dest);
}
+ ///
+ /// 获取数组的类类型
+ ///
+ /// 类型
+ /// 类类型
public static Type GetArrayElementType(this Type t)
{
if (!t.IsArray) return null;
diff --git a/SunnyUI/Common/UMessageTip.cs b/SunnyUI/Common/UMessageTip.cs
index d42363d1..3e054934 100644
--- a/SunnyUI/Common/UMessageTip.cs
+++ b/SunnyUI/Common/UMessageTip.cs
@@ -33,6 +33,7 @@ using System.Windows.Forms;
namespace Sunny.UI
{
+#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释
///
/// 轻便消息窗
///
@@ -1967,4 +1968,6 @@ namespace Sunny.UI
#endregion
}
+
+#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释
}
\ No newline at end of file
diff --git a/SunnyUI/Common/UOther.cs b/SunnyUI/Common/UOther.cs
index d20be580..c6cfaaf1 100644
--- a/SunnyUI/Common/UOther.cs
+++ b/SunnyUI/Common/UOther.cs
@@ -1,32 +1,65 @@
namespace Sunny.UI
{
+ ///
+ /// 其他
+ ///
public static class UIOther
{
+ ///
+ /// 值不为数字
+ ///
+ /// 值
+ /// 不为数字
public static bool IsNan(this double d)
{
return double.IsNaN(d);
}
+ ///
+ /// 值不为数字
+ ///
+ /// 值
+ /// 不为数字
public static bool IsNan(this float d)
{
return float.IsNaN(d);
}
+ ///
+ /// 值负无穷或者正无穷
+ ///
+ /// 值
+ /// 负无穷或者正无穷
public static bool IsInfinity(this double d)
{
return double.IsInfinity(d);
}
+ ///
+ /// 值负无穷或者正无穷
+ ///
+ /// 值
+ /// 负无穷或者正无穷
public static bool IsInfinity(this float d)
{
return float.IsInfinity(d);
}
+ ///
+ /// 值不为数字或者负无穷或者正无穷
+ ///
+ /// 值
+ /// 不为数字或者负无穷或者正无穷
public static bool IsNanOrInfinity(this double d)
{
return d.IsNan() || d.IsInfinity();
}
+ ///
+ /// 值不为数字或者负无穷或者正无穷
+ ///
+ /// 值
+ /// 不为数字或者负无穷或者正无穷
public static bool IsNanOrInfinity(this float d)
{
return d.IsNan() || d.IsInfinity();
diff --git a/SunnyUI/Common/UScrollBarInfo.cs b/SunnyUI/Common/UScrollBarInfo.cs
index 30b619aa..16a357e5 100644
--- a/SunnyUI/Common/UScrollBarInfo.cs
+++ b/SunnyUI/Common/UScrollBarInfo.cs
@@ -26,14 +26,19 @@ using System.Windows.Forms;
namespace Sunny.UI
{
+ ///
+ /// 滚动条信息获取类
+ ///
public static class ScrollBarInfo
{
+#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释
public const int SIF_RANGE = 1;
public const int SIF_PAGE = 2;
public const int SIF_POS = 4;
public const int SIF_TRACKPOS = 16;
public const int SIF_DISABLENOSCROLL = 8;
public const int SIF_ALL = SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS;
+#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释
//私有方法
private static uint MakeLong(short lowPart, short highPart)
@@ -41,18 +46,26 @@ namespace Sunny.UI
return (ushort)lowPart | (uint)(highPart << 16);
}
+ ///
+ /// 垂直滚动条宽度
+ ///
+ /// 宽度
public static int VerticalScrollBarWidth()
{
return SystemInformation.VerticalScrollBarWidth;
}
+ ///
+ /// 水平滚动条高度
+ ///
+ /// 高度
public static int HorizontalScrollBarHeight()
{
return SystemInformation.HorizontalScrollBarHeight;
}
///
- /// 获取控件滚动条信息
+ /// 获取垂直控件滚动条信息
///
/// 控件句柄
/// 信息结构
@@ -65,6 +78,11 @@ namespace Sunny.UI
return si;
}
+ ///
+ /// 获取水平控件滚动条信息
+ ///
+ /// 控件句柄
+ /// 信息结构
public static SCROLLINFO GetHorInfo(IntPtr handle)
{
SCROLLINFO si = new SCROLLINFO();
@@ -118,12 +136,22 @@ namespace Sunny.UI
User.SendMessage(handle, User.WM_VSCROLL, User.SB_LINEDOWN, 0);
}
+ ///
+ /// 垂直滚动条是否显示
+ ///
+ /// 控件
+ /// 垂直滚动条是否显示
public static bool IsVerticalScrollBarVisible(Control ctrl)
{
if (!ctrl.IsHandleCreated) return false;
return (Sunny.UI.Win32.User.GetWindowLong(ctrl.Handle, User.GWL_STYLE) & User.WS_VSCROLL) != 0;
}
+ ///
+ /// 水平滚动条是否显示
+ ///
+ /// 控件
+ /// 水平滚动条是否显示
public static bool IsHorizontalScrollBarVisible(Control ctrl)
{
if (!ctrl.IsHandleCreated) return false;
diff --git a/SunnyUI/Common/USuspendCtrlAltDel.cs b/SunnyUI/Common/USuspendCtrlAltDel.cs
index ae2ca9ea..df37e44e 100644
--- a/SunnyUI/Common/USuspendCtrlAltDel.cs
+++ b/SunnyUI/Common/USuspendCtrlAltDel.cs
@@ -34,6 +34,9 @@ namespace Sunny.UI
///
public static class SuspendCtrlAltDelete
{
+ ///
+ /// 获取权限
+ ///
public static void GetSeDebugPrivilege()
{
IntPtr hToken;
@@ -78,6 +81,9 @@ namespace Sunny.UI
CloseHandle(hToken);
}
+ ///
+ /// 挂起
+ ///
public static void Suspend()
{
Process[] processes = Process.GetProcesses();
@@ -93,6 +99,9 @@ namespace Sunny.UI
}
}
+ ///
+ /// 恢复
+ ///
public static void Resume()
{
Process[] processes = Process.GetProcesses();
diff --git a/SunnyUI/Common/USystem.cs b/SunnyUI/Common/USystem.cs
index 9f3aec9f..03006d57 100644
--- a/SunnyUI/Common/USystem.cs
+++ b/SunnyUI/Common/USystem.cs
@@ -58,17 +58,23 @@ namespace Sunny.UI
User.SetProcessDPIAware();
}
+ ///
+ /// 工具栏可用
+ ///
public static void EnabledTaskManager()
{
RegistryDisableTaskMgr(0);
}
+ ///
+ /// 工具栏不可用
+ ///
public static void DisabledTaskManager()
{
RegistryDisableTaskMgr(1);
}
- public static void RegistryDisableTaskMgr(int value)
+ private static void RegistryDisableTaskMgr(int value)
{
string subKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System";
RegistryKey mKey = Registry.CurrentUser.CreateSubKey(subKey);
@@ -76,6 +82,9 @@ namespace Sunny.UI
mKey?.Dispose();
}
+ ///
+ /// 设置键盘鼠标钩子超时
+ ///
public static void RegistryHooksTimeout()
{
string subKey = @"Control Panel\Desktop";
@@ -106,6 +115,13 @@ namespace Sunny.UI
}
}
+ ///
+ /// 线程安全调用
+ ///
+ /// 类型
+ /// 控件
+ /// 方法
+ /// 类型
public static T ThreadSafeCall(this Control control, Func method)
{
if (control.InvokeRequired)
@@ -150,7 +166,7 @@ namespace Sunny.UI
///
/// 是否64位
///
- ///
+ /// 是否64位
public static bool Is64bitApp()
{
return IntPtr.Size == 8;
@@ -330,7 +346,7 @@ namespace Sunny.UI
HandleRunningInstance(instance, showStyle);
}
- public static Process RunningInstance()
+ private static Process RunningInstance()
{
Process currentProcess = Process.GetCurrentProcess();
Process[] processes = Process.GetProcessesByName(currentProcess.ProcessName);
diff --git a/SunnyUI/Common/UTranslate.cs b/SunnyUI/Common/UTranslate.cs
index 5a652b39..967f5229 100644
--- a/SunnyUI/Common/UTranslate.cs
+++ b/SunnyUI/Common/UTranslate.cs
@@ -21,8 +21,14 @@
namespace Sunny.UI
{
+ ///
+ /// 多语翻译接口
+ ///
public interface ITranslate
{
+ ///
+ /// 多语翻译接口
+ ///
void Translate();
}
}
diff --git a/SunnyUI/Controls/Color/UIColorBar.cs b/SunnyUI/Controls/Color/UIColorBar.cs
index b977c38a..7c446f24 100644
--- a/SunnyUI/Controls/Color/UIColorBar.cs
+++ b/SunnyUI/Controls/Color/UIColorBar.cs
@@ -4,8 +4,6 @@ using System.Windows.Forms;
namespace Sunny.UI
{
-#pragma warning disable CS0618 // ͻԱѹʱ
-#pragma warning disable CS1591 // ȱٶԹɼͻԱ XML ע
internal class ColorSlider : LabelRotate
{
public event EventHandler SelectedValueChanged;
@@ -315,7 +313,4 @@ namespace Sunny.UI
SelectedHSLColor = m_selectedColor;
}
}
-
-#pragma warning restore CS0618 // ͻԱѹʱ
-#pragma warning restore CS1591 // ȱٶԹɼͻԱ XML ע
}
\ No newline at end of file
diff --git a/SunnyUI/Controls/Color/UIColorTable.cs b/SunnyUI/Controls/Color/UIColorTable.cs
index fc55b649..66bfe36f 100644
--- a/SunnyUI/Controls/Color/UIColorTable.cs
+++ b/SunnyUI/Controls/Color/UIColorTable.cs
@@ -7,7 +7,6 @@ using System.Windows.Forms;
namespace Sunny.UI
{
-#pragma warning disable CS0618 // ͻԱѹʱ
#pragma warning disable CS1591 // ȱٶԹɼͻԱ XML ע
[ToolboxItem(false)]
public sealed class UIColorTable : LabelRotate
@@ -394,6 +393,5 @@ namespace Sunny.UI
}
}
-#pragma warning restore CS0618 // ͻԱѹʱ
#pragma warning restore CS1591 // ȱٶԹɼͻԱ XML ע
}
\ No newline at end of file
diff --git a/SunnyUI/Controls/Color/UIColorWheel.cs b/SunnyUI/Controls/Color/UIColorWheel.cs
index 6a981541..266b484e 100644
--- a/SunnyUI/Controls/Color/UIColorWheel.cs
+++ b/SunnyUI/Controls/Color/UIColorWheel.cs
@@ -7,7 +7,6 @@ using System.Windows.Forms;
namespace Sunny.UI
{
-#pragma warning disable CS0618 // ͻԱѹʱ
#pragma warning disable CS1591 // ȱٶԹɼͻԱ XML ע
[ToolboxItem(false)]
public sealed class UIColorWheel : Control, IStyleInterface, IZoomScale
@@ -366,6 +365,5 @@ namespace Sunny.UI
public string TagString { get; set; }
}
-#pragma warning restore CS0618 // ͻԱѹʱ
#pragma warning restore CS1591 // ȱٶԹɼͻԱ XML ע
}
\ No newline at end of file
diff --git a/SunnyUI/Controls/Color/UIHSLColor.cs b/SunnyUI/Controls/Color/UIHSLColor.cs
index dead8fbf..5d841f7e 100644
--- a/SunnyUI/Controls/Color/UIHSLColor.cs
+++ b/SunnyUI/Controls/Color/UIHSLColor.cs
@@ -5,7 +5,6 @@ using System.Windows.Forms;
namespace Sunny.UI
{
-#pragma warning disable CS0618 // ͻԱѹʱ
#pragma warning disable CS1591 // ȱٶԹɼͻԱ XML ע
public struct HSLColor
{
@@ -316,9 +315,8 @@ namespace Sunny.UI
public static ImageList ImageList()
{
- Type t = typeof(SelectorImages);
if (m_imageList == null)
- m_imageList = ImageEx.GetToolbarImageList(t, Properties.Resources.colorbarIndicators, new Size(12, 12), Color.Magenta);
+ m_imageList = ImageEx.GetToolbarImageList(Properties.Resources.colorbarIndicators, new Size(12, 12), Color.Magenta);
return m_imageList;
}
@@ -328,6 +326,5 @@ namespace Sunny.UI
}
}
-#pragma warning restore CS0618 // ͻԱѹʱ
#pragma warning restore CS1591 // ȱٶԹɼͻԱ XML ע
}
\ No newline at end of file
diff --git a/SunnyUI/Controls/Color/UILabelRotate.cs b/SunnyUI/Controls/Color/UILabelRotate.cs
index ec736ecb..ee1eb8ae 100644
--- a/SunnyUI/Controls/Color/UILabelRotate.cs
+++ b/SunnyUI/Controls/Color/UILabelRotate.cs
@@ -4,7 +4,6 @@ using System.Windows.Forms;
namespace Sunny.UI
{
-#pragma warning disable CS0618 // ͻԱѹʱ
#pragma warning disable CS1591 // ȱٶԹɼͻԱ XML ע
[ToolboxItem(false)]
public class LabelRotate : Control, IStyleInterface, IZoomScale
@@ -278,6 +277,5 @@ namespace Sunny.UI
public string TagString { get; set; }
}
-#pragma warning restore CS0618 // ͻԱѹʱ
#pragma warning restore CS1591 // ȱٶԹɼͻԱ XML ע
}
\ No newline at end of file
diff --git a/SunnyUI/Font/UFontAwesomeV4.cs b/SunnyUI/Font/UFontAwesomeV4.cs
index ea8780bf..cfc4942a 100644
--- a/SunnyUI/Font/UFontAwesomeV4.cs
+++ b/SunnyUI/Font/UFontAwesomeV4.cs
@@ -62,7 +62,6 @@ to represent the company, product, or service to which they refer.
namespace Sunny.UI
{
-#pragma warning disable CS0618 // 类型或成员已过时
#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释
///
/// FontAwesome.ttf V4.7
@@ -1251,6 +1250,5 @@ namespace Sunny.UI
public const int icon_clipboard = 0xe0e6;
}
-#pragma warning restore CS0618 // 类型或成员已过时
#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释
}
\ No newline at end of file
diff --git a/SunnyUI/Font/UFontAwesomeV5.cs b/SunnyUI/Font/UFontAwesomeV5.cs
index d01cc58c..731a8f29 100644
--- a/SunnyUI/Font/UFontAwesomeV5.cs
+++ b/SunnyUI/Font/UFontAwesomeV5.cs
@@ -62,7 +62,6 @@ to represent the company, product, or service to which they refer.
namespace Sunny.UI
{
-#pragma warning disable CS0618 // 类型或成员已过时
#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释
///
/// fa-regular-400.ttf
@@ -1702,6 +1701,5 @@ namespace Sunny.UI
public const int fa_yin_yang = 0xf6ad;
}
-#pragma warning restore CS0618 // 类型或成员已过时
#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释
}
\ No newline at end of file
diff --git a/SunnyUI/Style/UIStyleColor.cs b/SunnyUI/Style/UIStyleColor.cs
index e0850861..502769c3 100644
--- a/SunnyUI/Style/UIStyleColor.cs
+++ b/SunnyUI/Style/UIStyleColor.cs
@@ -25,7 +25,6 @@ using System.Drawing;
namespace Sunny.UI
{
-#pragma warning disable CS0618 // 类型或成员已过时
#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释
public class UIBaseStyle
{
@@ -718,6 +717,5 @@ namespace Sunny.UI
}
}
-#pragma warning restore CS0618 // 类型或成员已过时
#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释
}
\ No newline at end of file
diff --git a/SunnyUI/SunnyUI.csproj b/SunnyUI/SunnyUI.csproj
index ffb94d0e..79dfce74 100644
--- a/SunnyUI/SunnyUI.csproj
+++ b/SunnyUI/SunnyUI.csproj
@@ -21,7 +21,7 @@
D:\MyDocuments\SunnyUI.pfx
False
True
- True
+ False
diff --git a/SunnyUI/Win32/Win32.Added.cs b/SunnyUI/Win32/Win32.Added.cs
index 9b4ccca9..6526bdc1 100644
--- a/SunnyUI/Win32/Win32.Added.cs
+++ b/SunnyUI/Win32/Win32.Added.cs
@@ -5,7 +5,6 @@ using System.Runtime.InteropServices;
namespace Sunny.UI.Win32
{
-#pragma warning disable CS0618 // 类型或成员已过时
#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释
public static class Win32Helper
{
@@ -188,6 +187,5 @@ namespace Sunny.UI.Win32
public delegate void TimerSetEventCallback(int uTimerID, uint uMsg, uint dwUser, UIntPtr dw1, UIntPtr dw2);
}
-#pragma warning restore CS0618 // 类型或成员已过时
#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释
}
\ No newline at end of file
diff --git a/SunnyUI/Win32/Win32.ErrorCodes.cs b/SunnyUI/Win32/Win32.ErrorCodes.cs
index e37bb521..b007db9a 100644
--- a/SunnyUI/Win32/Win32.ErrorCodes.cs
+++ b/SunnyUI/Win32/Win32.ErrorCodes.cs
@@ -1,6 +1,5 @@
namespace Sunny.UI.Win32
{
-#pragma warning disable CS0618 // ͻԱѹʱ
#pragma warning disable CS1591 // ȱٶԹɼͻԱ XML ע
public abstract class ERROR
{
@@ -928,6 +927,5 @@ namespace Sunny.UI.Win32
public const int VIEW_S_LAST = 0x4014F;
}
-#pragma warning restore CS0618 // ͻԱѹʱ
#pragma warning restore CS1591 // ȱٶԹɼͻԱ XML ע
}
\ No newline at end of file
diff --git a/SunnyUI/Win32/Win32.GDI.cs b/SunnyUI/Win32/Win32.GDI.cs
index d49b9ac9..8f10e361 100644
--- a/SunnyUI/Win32/Win32.GDI.cs
+++ b/SunnyUI/Win32/Win32.GDI.cs
@@ -6,7 +6,6 @@ using HWND = System.IntPtr;
namespace Sunny.UI.Win32
{
-#pragma warning disable CS0618 // 类型或成员已过时
#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释
public struct XFORM
{
@@ -1999,6 +1998,5 @@ namespace Sunny.UI.Win32
public const int WINDING = 2;
}
-#pragma warning restore CS0618 // 类型或成员已过时
#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释
}
\ No newline at end of file
diff --git a/SunnyUI/Win32/Win32.Kernel.cs b/SunnyUI/Win32/Win32.Kernel.cs
index 9e618023..d4f8c3b6 100644
--- a/SunnyUI/Win32/Win32.Kernel.cs
+++ b/SunnyUI/Win32/Win32.Kernel.cs
@@ -7,7 +7,6 @@ using HWND = System.IntPtr;
namespace Sunny.UI.Win32
{
-#pragma warning disable CS0618 // ͻԱѹʱ
#pragma warning disable CS1591 // ȱٶԹɼͻԱ XML ע
public struct OVERLAPPED
{
@@ -2397,6 +2396,5 @@ namespace Sunny.UI.Win32
public const string SE_UNSOLICITED_INPUT_NAME = "SeUnsolicitedInputPrivilege";
}
-#pragma warning restore CS0618 // ͻԱѹʱ
#pragma warning restore CS1591 // ȱٶԹɼͻԱ XML ע
}
\ No newline at end of file
diff --git a/SunnyUI/Win32/Win32.Multimedia.cs b/SunnyUI/Win32/Win32.Multimedia.cs
index a09bbf4c..2264e2a9 100644
--- a/SunnyUI/Win32/Win32.Multimedia.cs
+++ b/SunnyUI/Win32/Win32.Multimedia.cs
@@ -7,7 +7,6 @@ using HWND = System.IntPtr;
namespace Sunny.UI.Win32
{
-#pragma warning disable CS0618 // ͻԱѹʱ
#pragma warning disable CS1591 // ȱٶԹɼͻԱ XML ע
public struct SMPTE
{
@@ -1488,6 +1487,5 @@ namespace Sunny.UI.Win32
public const string CFSEPCHAR = "+";
}
-#pragma warning restore CS0618 // ͻԱѹʱ
#pragma warning restore CS1591 // ȱٶԹɼͻԱ XML ע
}
\ No newline at end of file
diff --git a/SunnyUI/Win32/Win32.NetApi.cs b/SunnyUI/Win32/Win32.NetApi.cs
index b2a957c2..46a12c37 100644
--- a/SunnyUI/Win32/Win32.NetApi.cs
+++ b/SunnyUI/Win32/Win32.NetApi.cs
@@ -7,7 +7,6 @@ using HWND = System.IntPtr;
namespace Sunny.UI.Win32
{
-#pragma warning disable CS0618 // ͻԱѹʱ
#pragma warning disable CS1591 // ȱٶԹɼͻԱ XML ע
public struct NETRESOURCE
{
@@ -212,6 +211,5 @@ namespace Sunny.UI.Win32
public const int WN_WINDOWS_ERROR = ERROR.ERROR_UNEXP_NET_ERR;
}
-#pragma warning restore CS0618 // ͻԱѹʱ
#pragma warning restore CS1591 // ȱٶԹɼͻԱ XML ע
}
\ No newline at end of file
diff --git a/SunnyUI/Win32/Win32.Shell.cs b/SunnyUI/Win32/Win32.Shell.cs
index b385d32a..5dfc8af3 100644
--- a/SunnyUI/Win32/Win32.Shell.cs
+++ b/SunnyUI/Win32/Win32.Shell.cs
@@ -4,7 +4,6 @@ using HWND = System.IntPtr;
namespace Sunny.UI.Win32
{
-#pragma warning disable CS0618 // ͻԱѹʱ
#pragma warning disable CS1591 // ȱٶԹɼͻԱ XML ע
public struct DRAGINFO
{
@@ -189,6 +188,5 @@ namespace Sunny.UI.Win32
public const int SHGNLI_PREFIXNAME = 0x2;
}
-#pragma warning restore CS0618 // ͻԱѹʱ
#pragma warning restore CS1591 // ȱٶԹɼͻԱ XML ע
}
\ No newline at end of file
diff --git a/SunnyUI/Win32/Win32.User.cs b/SunnyUI/Win32/Win32.User.cs
index 7cf64b5d..e4b8ac74 100644
--- a/SunnyUI/Win32/Win32.User.cs
+++ b/SunnyUI/Win32/Win32.User.cs
@@ -7,7 +7,6 @@ using HWND = System.IntPtr;
namespace Sunny.UI.Win32
{
-#pragma warning disable CS0618 // 类型或成员已过时
#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释
public struct CBTACTIVATESTRUCT
{
@@ -2539,6 +2538,5 @@ namespace Sunny.UI.Win32
public const string SZDDE_ITEM_ITEMLIST = "TopicItemList";
}
-#pragma warning restore CS0618 // 类型或成员已过时
#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释
}
\ No newline at end of file
diff --git a/SunnyUI/Win32/Win32.cs b/SunnyUI/Win32/Win32.cs
index ab03927a..a23a7450 100644
--- a/SunnyUI/Win32/Win32.cs
+++ b/SunnyUI/Win32/Win32.cs
@@ -2,7 +2,6 @@ using System.Runtime.InteropServices;
namespace Sunny.UI.Win32
{
-#pragma warning disable CS0618 // ͻԱѹʱ
#pragma warning disable CS1591 // ȱٶԹɼͻԱ XML ע
public struct RECT
{
@@ -147,6 +146,5 @@ namespace Sunny.UI.Win32
public short wMilliseconds;
}
-#pragma warning restore CS0618 // ͻԱѹʱ
#pragma warning restore CS1591 // ȱٶԹɼͻԱ XML ע
}
\ No newline at end of file