using System;
using UIKit;
using CoreGraphics;
namespace Shared
{
///
/// 信息提示
///
public class Tip
{
///
/// 构造函数
///
public Tip()
{
this.BackgroundColor = 0xff323232;
}
///
/// 关闭时间
///
/// The close time.
public int CloseTime {
get;
set;
}
///
/// 提示内容
///
/// The text.
public string Text {
get;
set;
}
///
/// 文字提示方向
///
/// The direction.
public AMPopTipDirection Direction {
get;
set;
}
///
/// 最大宽度
///
/// The width of the max.
public int MaxWidth {
get;
set;
}
///
/// 背景颜色
///
/// The color of the background.
public uint BackgroundColor {
get;
set;
}
///
/// 点击哪个View时显赫提示
///
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);
}
}
}