wxr
2020-04-14 06696e6f225733a60b03eea4a7c6374053d92c1d
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
66
67
68
69
70
71
72
73
74
75
76
using System;
using UIKit;
using CoreGraphics;
 
namespace Shared
{
    /// <summary>
    /// 信息提示
    /// </summary>
    public  class Tip
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public Tip()
        {
            this.BackgroundColor = 0xff323232;
        }
        /// <summary>
        /// 关闭时间
        /// </summary>
        /// <value>The close time.</value>
        public int CloseTime {
            get;
            set;
        }
        /// <summary>
        /// 提示内容
        /// </summary>
        /// <value>The text.</value>
        public string Text {
            get;
            set;
        }
 
        /// <summary>
        /// 文字提示方向
        /// </summary>
        /// <value>The direction.</value>
        public AMPopTipDirection Direction {
            get;
            set;
        }
        /// <summary>
        /// 最大宽度
        /// </summary>
        /// <value>The width of the max.</value>
        public int MaxWidth {
            get;
            set;
        }
 
        /// <summary>
        ///  背景颜色
        /// </summary>
        /// <value>The color of the background.</value>
        public uint BackgroundColor {
            get;
            set;
        }
 
 
        /// <summary>
        /// 点击哪个View时显赫提示
        /// </summary>
        public void Show(View view)
        {
            var popTip=    AMPopTip.PopTip ();
            popTip.PopoverColor = new UIKit.UIColor(((this.BackgroundColor >> 16) & 0xff)/255.0f, ((this.BackgroundColor >> 8) & 0xFF)/255.0f, (this.BackgroundColor & 0xFF)/255.0f, ((this.BackgroundColor >> 24) & 0xFF)/255.0f);
            popTip.ShowText (this.Text,Direction,MaxWidth, Application.RootFrameLayout, view.RealView.ConvertRectToView(view.RealView.Bounds,Application.RootFrameLayout),CloseTime);
        }
 
 
    }
        
}