Browse Source

创建气泡提示框,整理时间工具类

yuzhengyang 8 years ago
parent
commit
48e012d2a6
32 changed files with 1036 additions and 16 deletions
  1. BIN
      Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide
  2. BIN
      Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide
  3. BIN
      Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-shm
  4. BIN
      Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-wal
  5. 1 1
      Fork.Net/Azylee.Utils/Azylee.Core/AppUtils/AppLaunchTool.cs
  6. 8 0
      Fork.Net/Azylee.Utils/Azylee.Core/Azylee.Core.csproj
  7. 77 0
      Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/ChineseHourTool.cs
  8. 49 0
      Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/DateTimeConvert.cs
  9. 63 0
      Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/DateTimeTool.cs
  10. 32 0
      Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/DateTool.cs
  11. 56 0
      Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/TimerTool.cs
  12. 33 0
      Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/UnixTimeTool.cs
  13. 38 0
      Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/WeekDayTool.cs
  14. 1 1
      Fork.Net/Azylee.Utils/Azylee.Core/LogUtils/Log.cs
  15. 102 0
      Fork.Net/Azylee.Utils/Azylee.Core/TaskUtils/TaskSupport.cs
  16. 58 0
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/APIUtils/FormAnimateAPI.cs
  17. 15 0
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/Azylee.WinformSkin.csproj
  18. 2 1
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/NoTitle/NoTitleForm.Designer.cs
  19. 10 10
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/NoTitle/NoTitleForm.cs
  20. BIN
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/Toast/Images/toast_error.png
  21. BIN
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/Toast/Images/toast_info.png
  22. BIN
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/Toast/Images/toast_warning.png
  23. 123 0
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/Toast/ToastForm.Designer.cs
  24. 159 0
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/Toast/ToastForm.cs
  25. 129 0
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/Toast/ToastForm.resx
  26. 30 0
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/Properties/Resources.Designer.cs
  27. 10 0
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/Properties/Resources.resx
  28. 14 0
      Fork.Net/Fork.Net.Tools/Y.Utils/IOUtils/TxtUtils/IniTool.cs
  29. 2 2
      Fork.Net/Test/Y.Test/Commons/R.cs
  30. 13 0
      Fork.Net/Test/Y.Test/Views/MainForm.Designer.cs
  31. 7 1
      Fork.Net/Test/Y.Test/Views/MainForm.cs
  32. 4 0
      Fork.Net/Test/Y.Test/Y.Test.csproj

BIN
Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide


BIN
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide


BIN
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-shm


BIN
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-wal


+ 1 - 1
Fork.Net/Azylee.Utils/Azylee.Core/AppUtils/AppLaunchTool.cs

@@ -62,7 +62,7 @@ namespace Azylee.Core.AppUtils
                     //准备启动
                     if (startfile != null)
                     {
-                        return ProcessTool.Start(startfile);
+                        return ProcessTool.SimpleStart(startfile);
                     }
                 }
             }

+ 8 - 0
Fork.Net/Azylee.Utils/Azylee.Core/Azylee.Core.csproj

@@ -46,6 +46,13 @@
     <Compile Include="AppUtils\PermissionTool.cs" />
     <Compile Include="AppUtils\StartupTool.cs" />
     <Compile Include="DataUtils\CollectionUtils\ListTool.cs" />
+    <Compile Include="DataUtils\DateTimeUtils\ChineseHourTool.cs" />
+    <Compile Include="DataUtils\DateTimeUtils\DateTimeConvert.cs" />
+    <Compile Include="DataUtils\DateTimeUtils\DateTimeTool.cs" />
+    <Compile Include="DataUtils\DateTimeUtils\DateTool.cs" />
+    <Compile Include="DataUtils\DateTimeUtils\TimerTool.cs" />
+    <Compile Include="DataUtils\DateTimeUtils\UnixTimeTool.cs" />
+    <Compile Include="DataUtils\DateTimeUtils\WeekDayTool.cs" />
     <Compile Include="DataUtils\EncryptUtils\AesTool.cs" />
     <Compile Include="DataUtils\EncryptUtils\DesTool.cs" />
     <Compile Include="DataUtils\EncryptUtils\MD5Tool.cs" />
@@ -73,6 +80,7 @@
     <Compile Include="IOUtils\DirUtils\DirTool.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Readme.cs" />
+    <Compile Include="TaskUtils\TaskSupport.cs" />
     <Compile Include="VersionUtils\VersionTool.cs" />
     <Compile Include="WindowsUtils\APIUtils\PermissionAPI.cs" />
     <Compile Include="WindowsUtils\APIUtils\WindowsAPI.cs" />

+ 77 - 0
Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/ChineseHourTool.cs

@@ -0,0 +1,77 @@
+//############################################################
+//      https://github.com/yuzhengyang
+//      author:yuzhengyang
+//############################################################
+using System;
+
+namespace Azylee.Core.DataUtils.DateTimeUtils
+{
+    public class ChineseHourTool
+    {
+        public static string GetDesc(DateTime time)
+        {
+            string result = "";
+            if (time.Hour >= 23 || time.Hour < 1)
+            {
+                //子时(23 - 1点):半夜
+                result = "半夜";
+            }
+            else if (time.Hour >= 1 && time.Hour < 3)
+            {
+                //丑时(1 - 3点):凌晨
+                result = "凌晨";
+            }
+            else if (time.Hour >= 3 && time.Hour < 5)
+            {
+                //寅时(3 - 5点):黎明
+                result = "黎明";
+            }
+            else if (time.Hour >= 5 && time.Hour < 7)
+            {
+                //卯时(5 - 7点):清晨
+                result = "清晨";
+            }
+            else if (time.Hour >= 7 && time.Hour < 9)
+            {
+                //辰时(7 - 9点):早上
+                result = "早上";
+            }
+            else if (time.Hour >= 9 && time.Hour < 11)
+            {
+                //巳时(9 - 11点):上午
+                result = "上午";
+            }
+            else if (time.Hour >= 11 && time.Hour < 13)
+            {
+                //午时(11 - 13点):中午
+                result = "中午";
+            }
+            else if (time.Hour >= 13 && time.Hour < 15)
+            {
+                //未时(13 - 15点):午后
+                result = "午后";
+            }
+            else if (time.Hour >= 15 && time.Hour < 17)
+            {
+                //申时(15 - 17点):下午
+                result = "下午";
+            }
+            else if (time.Hour >= 17 && time.Hour < 19)
+            {
+                //酉时(17 - 19点):傍晚
+                result = "傍晚";
+            }
+            else if (time.Hour >= 19 && time.Hour < 21)
+            {
+                //戌时(19 - 21点):晚上
+                result = "晚上";
+            }
+            else if (time.Hour >= 21 && time.Hour < 23)
+            {
+                //亥时(21 - 23点):深夜
+                result = "深夜";
+            }
+            return result;
+        }
+    }
+}

+ 49 - 0
Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/DateTimeConvert.cs

@@ -0,0 +1,49 @@
+//************************************************************************
+//      https://github.com/yuzhengyang
+//      author:     yuzhengyang
+//      date:       2017.3.29 - 2017.6.27
+//      desc:       日期格式转换
+//      Copyright (c) yuzhengyang. All rights reserved.
+//************************************************************************
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Azylee.Core.DataUtils.DateTimeUtils
+{
+    /// <summary>
+    /// 日期格式转换工具
+    /// </summary>
+    public sealed class DateTimeConvert
+    {
+        /// <summary>
+        /// yyyy-MM-dd HH:mm:ss
+        /// </summary>
+        /// <param name="dt"></param>
+        /// <returns></returns>
+        public static string StandardString(DateTime dt)
+        {
+            return dt.ToString("yyyy-MM-dd HH:mm:ss");
+        }
+        /// <summary>
+        /// yyyyMMddHHmmss
+        /// </summary>
+        /// <param name="dt"></param>
+        /// <returns></returns>
+        public static string CompactString(DateTime dt)
+        {
+            return dt.ToString("yyyyMMddHHmmss");
+        }
+        /// <summary>
+        /// yyyy-MM-dd HH:mm:ss.fff
+        /// </summary>
+        /// <param name="dt"></param>
+        /// <returns></returns>
+        public static string DetailString(DateTime dt)
+        {
+            return dt.ToString("yyyy-MM-dd HH:mm:ss.fff");
+        }
+    }
+}

+ 63 - 0
Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/DateTimeTool.cs

@@ -0,0 +1,63 @@
+//************************************************************************
+//      https://github.com/yuzhengyang
+//      author:     yuzhengyang
+//      date:       2017.3.29 - 2017.8.17
+//      desc:       日期时间工具
+//      Copyright (c) yuzhengyang. All rights reserved.
+//************************************************************************
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Azylee.Core.DataUtils.DateTimeUtils
+{
+    public sealed class DateTimeTool
+    {
+        public static DateTime TodayDate()
+        {
+            DateTime today = DateTime.Now;
+            DateTime result = new DateTime(today.Year, today.Month, today.Day);
+            return result;
+        }
+        public static DateTime TodayDate(DateTime today)
+        {
+            DateTime result = new DateTime(today.Year, today.Month, today.Day);
+            return result;
+        }
+        public static TimeSpan TimeSpan(DateTime dt1, DateTime dt2)
+        {
+            if (dt1 > dt2)
+                return dt1 - dt2;
+            else
+                return dt2 - dt1;
+        }
+        public static Tuple<int, int> ToMS(double second)
+        {
+            int Minute = 0, Second = 0;
+            Minute = (int)second / 60;
+            Second = (int)second % 60;
+            return new Tuple<int, int>(Minute, Second);
+        }
+        public static Tuple<long, long, long> ToHMS(double second)
+        {
+            double Hour = second / 60 / 60;
+            double Minute = second / 60 % 60;
+            double Second = second % 60;
+            return new Tuple<long, long, long>((long)Hour, (long)Minute, (long)Second);
+        }
+        public static Tuple<long, long, long> ToHMS(long ms)
+        {
+            long Hour = ms / 1000 / 60 / 60;
+            long Minute = ms / 1000 / 60 % 60;
+            long Second = ms / 1000 % 60;
+            return new Tuple<long, long, long>(Hour, Minute, Second);
+        }
+        public static Tuple<int, int, int> ToHMS(int ms)
+        {
+            int Hour = ms / 1000 / 60 / 60;
+            int Minute = ms / 1000 / 60 % 60;
+            int Second = ms / 1000 % 60;
+            return new Tuple<int, int, int>(Hour, Minute, Second);
+        }
+    }
+}

+ 32 - 0
Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/DateTool.cs

@@ -0,0 +1,32 @@
+//************************************************************************
+//      https://github.com/yuzhengyang
+//      author:     yuzhengyang
+//      date:       2017.8.17 - 2017.8.17
+//      desc:       日期工具
+//      Copyright (c) yuzhengyang. All rights reserved.
+//************************************************************************
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.Core.DataUtils.DateTimeUtils
+{
+    public sealed class DateTool
+    {
+        public static bool IsToday(DateTime date)
+        {
+            DateTime today = DateTime.Now;
+            if (today.Year == date.Year && today.Month == date.Month && today.Day == date.Day)
+                return true;
+            return false;
+        }
+        public static bool IsYesterday(DateTime date)
+        {
+            DateTime yesterday = DateTime.Now.AddDays(-1);
+            if (yesterday.Year == date.Year && yesterday.Month == date.Month && yesterday.Day == date.Day)
+                return true;
+            return false;
+        }
+    }
+}

+ 56 - 0
Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/TimerTool.cs

@@ -0,0 +1,56 @@
+//############################################################
+//      https://github.com/yuzhengyang
+//      author:yuzhengyang
+//############################################################
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Azylee.Core.DataUtils.DateTimeUtils
+{
+    public class TimerTool
+    {
+        private DateTime BeginTime { get; set; }
+        private DateTime EndTime { get; set; }
+        private TimerTool() { }
+        public TimerTool(bool isStart = false)
+        {
+            if (isStart)
+                Begin();
+        }
+        public void Begin()
+        {
+            BeginTime = DateTime.Now;
+        }
+        public void End()
+        {
+            EndTime = DateTime.Now;
+        }
+        public double m
+        {
+            get
+            {
+                End();
+                return (EndTime - BeginTime).TotalMinutes;
+            }
+        }
+        public double s
+        {
+            get
+            {
+                End();
+                return (EndTime - BeginTime).TotalSeconds;
+            }
+        }
+        public double ms
+        {
+            get
+            {
+                End();
+                return (EndTime - BeginTime).TotalMilliseconds;
+            }
+        }
+    }
+}

+ 33 - 0
Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/UnixTimeTool.cs

@@ -0,0 +1,33 @@
+//############################################################
+//      https://github.com/yuzhengyang
+//      author:yuzhengyang
+//############################################################
+using System;
+
+namespace Azylee.Core.DataUtils.DateTimeUtils
+{
+    public class UnixTimeTool
+    {
+        public static DateTime Parse(float second)
+        {
+            TimeSpan span = new TimeSpan((long)second * 10000000);
+            DateTime baseTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
+            DateTime resultTime = baseTime.Add(span);
+            return resultTime;
+        }
+        public static DateTime Parse(double second)
+        {
+            TimeSpan span = new TimeSpan((long)second * 10000000);
+            DateTime baseTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
+            DateTime resultTime = baseTime.Add(span);
+            return resultTime;
+        }
+        public static DateTime Parse(long second)
+        {
+            TimeSpan span = new TimeSpan(second * 10000000);
+            DateTime baseTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
+            DateTime resultTime = baseTime.Add(span);
+            return resultTime;
+        }
+    }
+}

+ 38 - 0
Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/DateTimeUtils/WeekDayTool.cs

@@ -0,0 +1,38 @@
+//************************************************************************
+//      https://github.com/yuzhengyang
+//      author:     yuzhengyang
+//      date:       2017.3.29 - 2017.7.24
+//      desc:       日期转换周
+//      Copyright (c) yuzhengyang. All rights reserved.
+//************************************************************************
+using System;
+
+namespace Azylee.Core.DataUtils.DateTimeUtils
+{
+    /// <summary>
+    /// 日期转换周
+    /// </summary>
+    public class WeekDayTool
+    {
+        /// <summary>
+        /// 显示日期为周几
+        /// </summary>
+        /// <param name="date"></param>
+        /// <returns></returns>
+        public static string ToWeekDay(DateTime date)
+        {
+            string result = "";
+            switch (date.DayOfWeek.ToString())
+            {
+                case "Sunday": result = "星期日"; break;
+                case "Monday": result = "星期一"; break;
+                case "Tuesday": result = "星期二"; break;
+                case "Wednesday": result = "星期三"; break;
+                case "Thursday": result = "星期四"; break;
+                case "Friday": result = "星期五"; break;
+                case "Saturday": result = "星期六"; break;
+            }
+            return result;
+        }
+    }
+}

+ 1 - 1
Fork.Net/Azylee.Utils/Azylee.Core/LogUtils/Log.cs

@@ -72,7 +72,7 @@ namespace Azylee.Core.LogUtils
                 {
                     while (IsStart)
                     {
-                        Thread.Sleep(10 * 1000);
+                        Thread.Sleep(500);
 
                         if (Queue.Any())
                         {

+ 102 - 0
Fork.Net/Azylee.Utils/Azylee.Core/TaskUtils/TaskSupport.cs

@@ -0,0 +1,102 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Azylee.Core.TaskUtils
+{
+    public abstract class TaskSupport
+    {
+        private DateTime StartTime, LastRunTime;
+
+        /// <summary>
+        /// 通过运行时间判断是否运行
+        /// </summary>
+        public bool IsRun
+        {
+            get
+            {
+                if (LastRunTime.AddSeconds(Interval + 1000) > DateTime.Now)
+                    return true;
+                return false;
+            }
+        }
+        /// <summary>
+        /// 已启动
+        /// </summary>
+        public bool IsStart { get { return _IsStart; } }
+        /// <summary>
+        /// 已启动(Protect)
+        /// </summary>
+        protected bool _IsStart = false;
+        /// <summary>
+        /// 取消标志
+        /// </summary>
+        protected CancellationTokenSource CT = new CancellationTokenSource();
+        /// <summary>
+        /// 任务循环间隔
+        /// </summary>
+        protected int Interval = 1000;
+
+        private bool IsDestroy = false;
+
+        /// <summary>
+        /// 设置任务间隔(0为不循环任务)
+        /// </summary>
+        /// <param name="i"></param>
+        /// <returns></returns>
+        public int SetInterval(int i)
+        {
+            Interval = i;
+            return Interval;
+        }
+
+        /// <summary>
+        /// 启动服务任务
+        /// </summary>
+        public virtual void Start()
+        {
+            StartTime = DateTime.Now;
+            if (!IsDestroy)
+                Task.Factory.StartNew(() =>
+                {
+                    if (!IsStart)
+                    {
+                        _IsStart = true;
+                        BeforeTODO();
+                        do
+                        {
+                            LastRunTime = DateTime.Now;
+                            TODO();
+                            Thread.Sleep(Interval);
+
+                        } while (!CT.IsCancellationRequested && Interval > 0);
+                        AfterTODO();
+                    }
+                });
+        }
+        /// <summary>
+        /// 提前干点啥
+        /// </summary>
+        public virtual void BeforeTODO() { }
+        /// <summary>
+        /// 干点啥
+        /// </summary>
+        public abstract void TODO();
+        /// <summary>
+        /// 完事儿干点啥
+        /// </summary>
+        public virtual void AfterTODO() { }
+        /// <summary>
+        /// 停止服务任务
+        /// </summary>
+        public virtual void Stop()
+        {
+            CT.Cancel();
+            IsDestroy = true;
+        }
+
+    }
+}

+ 58 - 0
Fork.Net/Azylee.Utils/Azylee.WinformSkin/APIUtils/FormAnimateAPI.cs

@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+
+namespace Azylee.WinformSkin.APIUtils
+{
+    public class FormAnimateAPI
+    {
+        /// <summary>
+        /// 窗体动画函数
+        /// </summary>
+        /// <param name="hwnd">指定产生动画的窗口的句柄</param>
+        /// <param name="dwTime">指定动画持续的时间</param>
+        /// <param name="dwFlags">指定动画类型,可以是一个或多个标志的组合。</param>
+        /// <returns></returns>
+        [DllImport("user32")]
+        public static extern bool AnimateWindow(IntPtr hwnd, int dwTime, int dwFlags);
+
+        /// <summary>
+        /// 自左向右显示窗口,该标志可以在滚动动画和滑动动画中使用。使用AW_CENTER标志时忽略该标志
+        /// </summary>
+        public static int AW_HOR_POSITIVE { get { return 0x0001; } }
+        /// <summary>
+        /// 自右向左显示窗口,该标志可以在滚动动画和滑动动画中使用。使用AW_CENTER标志时忽略该标志
+        /// </summary>
+        public static int AW_HOR_NEGATIVE { get { return 0x0002; } }
+        /// <summary>
+        /// 自顶向下显示窗口,该标志可以在滚动动画和滑动动画中使用。使用AW_CENTER标志时忽略该标志
+        /// </summary>
+        public static int AW_VER_POSITIVE { get { return 0x0004; } }
+        /// <summary>
+        /// 自下向上显示窗口,该标志可以在滚动动画和滑动动画中使用。使用AW_CENTER标志时忽略该标志该标志
+        /// </summary>
+        public static int AW_VER_NEGATIVE { get { return 0x0008; } }
+        /// <summary>
+        /// 若使用了AW_HIDE标志,则使窗口向内重叠;否则向外扩展
+        /// </summary>
+        public static int AW_CENTER { get { return 0x0010; } }
+        /// <summary>
+        /// 隐藏窗口
+        /// </summary>
+        public static int AW_HIDE { get { return 0x10000; } }
+        /// <summary>
+        /// 激活窗口,在使用了AW_HIDE标志后不要使用这个标志
+        /// </summary>
+        public static int AW_ACTIVE { get { return 0x20000; } }
+        /// <summary>
+        /// 使用滑动类型动画效果,默认为滚动动画类型,当使用AW_CENTER标志时,这个标志就被忽略
+        /// </summary>
+        public static int AW_SLIDE { get { return 0x40000; } }
+        /// <summary>
+        /// 使用淡入淡出效果
+        /// </summary>
+        public static int AW_BLEND { get { return 0x80000; } }
+    }
+}

+ 15 - 0
Fork.Net/Azylee.Utils/Azylee.WinformSkin/Azylee.WinformSkin.csproj

@@ -41,6 +41,7 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="APIUtils\FormAnimateAPI.cs" />
     <Compile Include="APIUtils\FormStyleAPI.cs" />
     <Compile Include="FormUI\CustomTitle\BigIconForm.cs">
       <SubType>Form</SubType>
@@ -72,6 +73,12 @@
     <Compile Include="FormUI\SimpleShadow\SimpleShadowForm.Designer.cs">
       <DependentUpon>SimpleShadowForm.cs</DependentUpon>
     </Compile>
+    <Compile Include="FormUI\Toast\ToastForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FormUI\Toast\ToastForm.Designer.cs">
+      <DependentUpon>ToastForm.cs</DependentUpon>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>
@@ -110,6 +117,9 @@
     <EmbeddedResource Include="FormUI\SimpleShadow\SimpleShadowForm.resx">
       <DependentUpon>SimpleShadowForm.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FormUI\Toast\ToastForm.resx">
+      <DependentUpon>ToastForm.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -121,5 +131,10 @@
       <DependentUpon>SuperUserControl.cs</DependentUpon>
     </EmbeddedResource>
   </ItemGroup>
+  <ItemGroup>
+    <Content Include="FormUI\Toast\Images\toast_error.png" />
+    <Content Include="FormUI\Toast\Images\toast_info.png" />
+    <Content Include="FormUI\Toast\Images\toast_warning.png" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 2 - 1
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/NoTitle/NoTitleForm.Designer.cs

@@ -34,7 +34,8 @@
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1920, 1080);
+            this.ClientSize = new System.Drawing.Size(1378, 780);
+            this.DoubleBuffered = true;
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Name = "NoTitleForm";
             this.Text = "NoTitleForm";

+ 10 - 10
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/NoTitle/NoTitleForm.cs

@@ -147,17 +147,17 @@ namespace Azylee.WinformSkin.FormUI.NoTitle
         }
         #region 界面优化
         /// <summary>
-        /// 避免拖动窗口闪烁
+        /// 避免拖动窗口闪烁,使用会导致Windows自带动画失效
         /// </summary>
-        //protected override CreateParams CreateParams
-        //{
-        //    get
-        //    {
-        //        CreateParams cp = base.CreateParams;
-        //        cp.ExStyle |= 0x02000000;  // Turn on WS_EX_COMPOSITED  
-        //        return cp;
-        //    }
-        //}
+        protected override CreateParams CreateParams
+        {
+            get
+            {
+                CreateParams cp = base.CreateParams;
+                cp.ExStyle |= 0x02000000;  // Turn on WS_EX_COMPOSITED  
+                return cp;
+            }
+        }
         protected override void OnPaint(PaintEventArgs e)
         {
             base.OnPaint(e);

BIN
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/Toast/Images/toast_error.png


BIN
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/Toast/Images/toast_info.png


BIN
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/Toast/Images/toast_warning.png


+ 123 - 0
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/Toast/ToastForm.Designer.cs

@@ -0,0 +1,123 @@
+namespace Azylee.WinformSkin.FormUI.Toast
+{
+    partial class ToastForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.PBIcon = new System.Windows.Forms.PictureBox();
+            this.LBTitle = new System.Windows.Forms.Label();
+            this.LBText = new System.Windows.Forms.Label();
+            this.TMHide = new System.Windows.Forms.Timer(this.components);
+            this.TMHideAnim = new System.Windows.Forms.Timer(this.components);
+            this.TMShowAnim = new System.Windows.Forms.Timer(this.components);
+            ((System.ComponentModel.ISupportInitialize)(this.PBIcon)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // PBIcon
+            // 
+            this.PBIcon.BackColor = System.Drawing.Color.Transparent;
+            this.PBIcon.Image = global::Azylee.WinformSkin.Properties.Resources.toast_warning;
+            this.PBIcon.Location = new System.Drawing.Point(16, 16);
+            this.PBIcon.Name = "PBIcon";
+            this.PBIcon.Size = new System.Drawing.Size(42, 41);
+            this.PBIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
+            this.PBIcon.TabIndex = 4;
+            this.PBIcon.TabStop = false;
+            this.PBIcon.Click += new System.EventHandler(this.PBIcon_Click);
+            // 
+            // LBTitle
+            // 
+            this.LBTitle.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LBTitle.ForeColor = System.Drawing.Color.White;
+            this.LBTitle.Location = new System.Drawing.Point(68, 7);
+            this.LBTitle.Name = "LBTitle";
+            this.LBTitle.Size = new System.Drawing.Size(270, 20);
+            this.LBTitle.TabIndex = 5;
+            this.LBTitle.Text = "测试标题测试标题测试标题测试标题";
+            this.LBTitle.Click += new System.EventHandler(this.LBTitle_Click);
+            // 
+            // LBText
+            // 
+            this.LBText.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LBText.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(155)))), ((int)(((byte)(155)))));
+            this.LBText.Location = new System.Drawing.Point(68, 30);
+            this.LBText.Name = "LBText";
+            this.LBText.Size = new System.Drawing.Size(270, 44);
+            this.LBText.TabIndex = 6;
+            this.LBText.Text = "测试,内容。测试,内容。测试,内容。测试,内容。测试,内容。测试,内容。";
+            this.LBText.Click += new System.EventHandler(this.LBText_Click);
+            // 
+            // TMHide
+            // 
+            this.TMHide.Tick += new System.EventHandler(this.TMHide_Tick);
+            // 
+            // TMHideAnim
+            // 
+            this.TMHideAnim.Interval = 10;
+            this.TMHideAnim.Tick += new System.EventHandler(this.TMHideAnim_Tick);
+            // 
+            // TMShowAnim
+            // 
+            this.TMShowAnim.Interval = 10;
+            this.TMShowAnim.Tick += new System.EventHandler(this.TMShowAnim_Tick);
+            // 
+            // ToastForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31)))));
+            this.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(72)))), ((int)(((byte)(72)))), ((int)(((byte)(72)))));
+            this.ClientSize = new System.Drawing.Size(360, 80);
+            this.Controls.Add(this.LBText);
+            this.Controls.Add(this.LBTitle);
+            this.Controls.Add(this.PBIcon);
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "ToastForm";
+            this.ShowIcon = false;
+            this.ShowInTaskbar = false;
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "通知";
+            this.TopMost = true;
+            this.Load += new System.EventHandler(this.ToastForm_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.PBIcon)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.PictureBox PBIcon;
+        private System.Windows.Forms.Label LBTitle;
+        private System.Windows.Forms.Label LBText;
+        private System.Windows.Forms.Timer TMHide;
+        private System.Windows.Forms.Timer TMHideAnim;
+        private System.Windows.Forms.Timer TMShowAnim;
+    }
+}

+ 159 - 0
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/Toast/ToastForm.cs

@@ -0,0 +1,159 @@
+using Azylee.WinformSkin.APIUtils;
+using Azylee.WinformSkin.FormUI.NoTitle;
+using Azylee.WinformSkin.Properties;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Azylee.WinformSkin.FormUI.Toast
+{
+    public partial class ToastForm : NoTitleForm
+    {
+        private static ToastForm form = new ToastForm();
+        public static void Display(string title, string text, char type, int time)
+        {
+            if (form == null || form.IsDisposed)
+                form = new ToastForm();
+
+            form.SetContent(title, text, type, time);
+            form.Toast();
+        }
+
+        private int TimeSpend = 0;
+        private int SlowTime = 8;
+        private int SlowStep = 10;
+        private ToastForm()
+        {
+            InitializeComponent();
+        }
+        private void ToastForm_Load(object sender, EventArgs e)
+        {
+            SetPosition();//设置初始位置为右下角,开始栏上方12px
+            ShowInTaskbar = false;//不在任务栏显示
+            TopMost = true;//显示到最上层窗体
+        }
+        private void Toast()
+        {
+            Show();//显示窗口
+            TMHideAnim.Enabled = false;//隐藏动画禁用(防止冲突)
+            TMHide.Enabled = false;//隐藏计时器禁用(防止冲突)
+            TMShowAnim.Enabled = true;//启动显示动画
+            TMHide.Enabled = true;//开始隐藏倒计时
+        }
+        #region 初始化设置
+        /// <summary>
+        /// 初始化设置,设置要显示的内容
+        /// </summary>
+        /// <param name="title">标题</param>
+        /// <param name="text">内容</param>
+        /// <param name="type">类型</param>
+        /// <param name="time">显示时间</param>
+        private void SetContent(string title, string text, char type, int time)
+        {
+            TimeSpend = 0;//初始化运行时间,每次执行动画++
+            SetPosition();//设置初始位置
+            TMShowAnim.Interval = 10;//设置显示动画执行间隔
+
+            Text = title;//设置程序标题
+            LBTitle.Text = title;//设置显示标题
+            LBText.Text = text;//设置内容
+            SetType(type);//设置消息类型
+            TMHide.Interval = time;//设置显示时长
+        }
+        /// <summary>
+        /// 设置消息类型
+        /// </summary>
+        /// <param name="type"></param>
+        private void SetType(char type)
+        {
+            switch (type)
+            {
+                case 'w':
+                case 'W':
+                    PBIcon.Image = Resources.toast_warning;
+                    break;
+                case 'e':
+                case 'E':
+                    PBIcon.Image = Resources.toast_error;
+                    break;
+                case 'i':
+                case 'I':
+                default:
+                    PBIcon.Image = Resources.toast_info;
+                    break;
+            }
+        }
+        /// <summary>
+        /// 设置初始位置
+        /// </summary>
+        private void SetPosition()
+        {
+            Left = Screen.PrimaryScreen.WorkingArea.Width;
+            Top = Screen.PrimaryScreen.WorkingArea.Height - Height - 12;
+        }
+        #endregion
+
+        #region 显示提示框
+        private void TMShowAnim_Tick(object sender, EventArgs e)
+        {
+            if (Left > Screen.PrimaryScreen.WorkingArea.Width - Width)
+            {
+                Left -= 30;
+                if (TimeSpend++ > SlowTime) TMShowAnim.Interval += SlowStep;
+            }
+            else
+            {
+                TMShowAnim.Enabled = false;
+            }
+        }
+        #endregion
+        #region 隐藏提示框
+        /// <summary>
+        /// 执行隐藏窗口动画
+        /// </summary>
+        private void HideForm()
+        {
+            TimeSpend = 0;
+            TMShowAnim.Enabled = false;
+            TMHide.Enabled = false;
+            TMHideAnim.Enabled = true;//执行隐藏窗口动画
+            TMHideAnim.Interval = 10;
+        }
+        private void PBIcon_Click(object sender, EventArgs e)
+        {
+            HideForm();
+        }
+        private void LBTitle_Click(object sender, EventArgs e)
+        {
+            HideForm();
+        }
+        private void LBText_Click(object sender, EventArgs e)
+        {
+            HideForm();
+        }
+        private void TMHide_Tick(object sender, EventArgs e)
+        {
+            HideForm();
+        }
+        private void TMHideAnim_Tick(object sender, EventArgs e)
+        {
+            if (Left < Screen.PrimaryScreen.WorkingArea.Width)
+            {
+                Left += 30;
+                if (TimeSpend++ > SlowTime) TMShowAnim.Interval += SlowStep;
+            }
+            else
+            {
+                TMHideAnim.Enabled = false;
+                Hide();
+                Close();
+            }
+        }
+        #endregion
+    }
+}

+ 129 - 0
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/Toast/ToastForm.resx

@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="TMHide.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="TMHideAnim.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>115, 17</value>
+  </metadata>
+  <metadata name="TMShowAnim.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>245, 17</value>
+  </metadata>
+</root>

+ 30 - 0
Fork.Net/Azylee.Utils/Azylee.WinformSkin/Properties/Resources.Designer.cs

@@ -59,5 +59,35 @@ namespace Azylee.WinformSkin.Properties {
                 resourceCulture = value;
             }
         }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap toast_error {
+            get {
+                object obj = ResourceManager.GetObject("toast_error", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap toast_info {
+            get {
+                object obj = ResourceManager.GetObject("toast_info", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap toast_warning {
+            get {
+                object obj = ResourceManager.GetObject("toast_warning", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
     }
 }

+ 10 - 0
Fork.Net/Azylee.Utils/Azylee.WinformSkin/Properties/Resources.resx

@@ -117,4 +117,14 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="toast_error" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\FormUI\Toast\Images\toast_error.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="toast_info" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\FormUI\Toast\Images\toast_info.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="toast_warning" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\FormUI\Toast\Images\toast_warning.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

+ 14 - 0
Fork.Net/Fork.Net.Tools/Y.Utils/IOUtils/TxtUtils/IniTool.cs

@@ -402,6 +402,20 @@ namespace Y.Utils.IOUtils.TxtUtils
             int.TryParse(flag, out result);
             return result;
         }
+        public static int GetIntValue(string iniFile, string section, string key, int defaultValue)
+        {
+            string flag = GetStringValue(iniFile, section, key, "null");
+            if (flag == "null")
+            {
+                return defaultValue;
+            }
+            else
+            {
+                int result = 0;
+                int.TryParse(flag, out result);
+                return result;
+            }
+        }
         public static long GetLongValue(string iniFile, string section, string key)
         {
             string flag = GetStringValue(iniFile, section, key, "0");

+ 2 - 2
Fork.Net/Test/Y.Test/Commons/R.cs

@@ -1,7 +1,7 @@
-using System;
+using Azylee.FormMan.ManagerUtils;
+using System;
 using System.Collections.Generic;
 using Y.Utils.IOUtils.PathUtils;
-using Y.Utils.WindowsUtils.FormUtils;
 
 namespace Y.Test.Commons
 {

+ 13 - 0
Fork.Net/Test/Y.Test/Views/MainForm.Designer.cs

@@ -37,6 +37,7 @@
             this.TestIrrForm = new System.Windows.Forms.Button();
             this.BTCheckYUtils = new System.Windows.Forms.Button();
             this.TestCrossForm = new System.Windows.Forms.Button();
+            this.button1 = new System.Windows.Forms.Button();
             this.SuspendLayout();
             // 
             // ChineseCalendarForm
@@ -129,11 +130,22 @@
             this.TestCrossForm.UseVisualStyleBackColor = true;
             this.TestCrossForm.Click += new System.EventHandler(this.TestCrossForm_Click);
             // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(13, 256);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(261, 23);
+            this.button1.TabIndex = 9;
+            this.button1.Text = "测试ToastForm";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
             // MainForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(564, 427);
+            this.Controls.Add(this.button1);
             this.Controls.Add(this.TestCrossForm);
             this.Controls.Add(this.BTCheckYUtils);
             this.Controls.Add(this.TestIrrForm);
@@ -162,5 +174,6 @@
         private System.Windows.Forms.Button TestIrrForm;
         private System.Windows.Forms.Button BTCheckYUtils;
         private System.Windows.Forms.Button TestCrossForm;
+        private System.Windows.Forms.Button button1;
     }
 }

+ 7 - 1
Fork.Net/Test/Y.Test/Views/MainForm.cs

@@ -1,4 +1,5 @@
-using System;
+using Azylee.WinformSkin.FormUI.Toast;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
@@ -69,5 +70,10 @@ namespace Y.Test.Views
         {
             R.Forms.GetUnique<TestCrossForm>().Show();
         }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            ToastForm.Display("测试测试", "测试内容,测试内容123,456七八九十!", 'i', 2000);
+        }
     }
 }

+ 4 - 0
Fork.Net/Test/Y.Test/Y.Test.csproj

@@ -260,6 +260,10 @@
     <Content Include="Images\BackgroundImages\Rainbow.png" />
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\Azylee.Utils\Azylee.WinformSkin\Azylee.WinformSkin.csproj">
+      <Project>{d280c16f-fde2-4647-bd76-3514f673426d}</Project>
+      <Name>Azylee.WinformSkin</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\Fork.Net.Tools\Y.Skin\Y.Skin.csproj">
       <Project>{e9a97673-3e27-4a49-90bc-8806411a2f57}</Project>
       <Name>Y.Skin</Name>