Shuxia Ning
2024-11-19 a01861a95ede48fa4979a47b24f21616e362e534
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
namespace Yw.WinFrmUI
{
    /// <summary>
    /// 覆盖辅助类
    /// </summary>
    public static class OverlayHelper
    {
        private static OverlayWindowOptions _options = new OverlayWindowOptions(opacity: 100d / 255);
 
        /// <summary>
        /// 
        /// </summary>
        /// <param name="owner"></param>
        /// <returns></returns>
        public static IOverlaySplashScreenHandle ShowOverlay(this Control owner)
        {
            return SplashScreenManager.ShowOverlayForm(owner, _options);
        }
 
        /// <summary>
        /// 
        /// </summary>
        /// <param name="owner"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public static IOverlaySplashScreenHandle ShowOverlay(Control owner, OverlayWindowOptions options)
        {
            return SplashScreenManager.ShowOverlayForm(owner, options);
        }
 
        /// <summary>
        /// 
        /// </summary>
        /// <param name="owner"></param>
        /// <param name="fadeIn"></param>
        /// <param name="fadeOut"></param>
        /// <param name="backColor"></param>
        /// <param name="foreColor"></param>
        /// <param name="opacity"></param>
        /// <param name="image"></param>
        /// <param name="customPainter"></param>
        /// <param name="skinName"></param>
        /// <param name="rotationParameters"></param>
        /// <param name="startupDelay"></param>
        /// <returns></returns>
        public static IOverlaySplashScreenHandle ShowOverlay
            (
                Control owner,
                bool? fadeIn = null,
                bool? fadeOut = null,
                Color? backColor = null,
                Color? foreColor = null,
                int? opacity = null,
                Image image = null,
                IOverlayWindowPainter customPainter = null,
                string skinName = null,
                ImageRotationParams? rotationParameters = null,
                int? startupDelay = null
            )
        {
            return SplashScreenManager.ShowOverlayForm(owner, fadeIn, fadeOut, backColor, foreColor, opacity, image, customPainter, skinName, rotationParameters, startupDelay);
        }
 
    }
}