using System;
namespace FineUIPro.Mobile
{
public class PageBaseMobile : PageBase
{
#region static readonly
protected static readonly string DATALIST_ITEM_TEMPLATE = "
 {1} {2} |
";
protected static readonly string DATALIST_SIMPLE_ITEM_TEMPLATE = " {1} |
";
#endregion
#region OnInit
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
var pm = PageManager.Instance;
// 如果不是AJAX回发
if (pm != null && !pm.IsFineUIAjaxPostBack && !Constants.IS_BASE)
{
// 强制设为大字体、移动设备自适应
pm.MobileAdaption = true;
pm.DisplayMode = DisplayMode.Large;
}
}
#endregion
#region ShowNotify
///
/// 显示通知对话框
///
///
public override void ShowNotify(string message)
{
ShowNotify(message, MessageBoxIcon.None);
}
///
/// 显示通知对话框
///
///
///
public override void ShowNotify(string message, MessageBoxIcon messageIcon)
{
Notify notify = new Notify();
notify.Target = Target.Self;
notify.ShowHeader = false;
notify.PositionX = Position.Center;
notify.PositionY = Position.Center;
notify.Message = message;
notify.MessageBoxIcon = messageIcon;
notify.MessageAlign = TextAlign.Center;
notify.MinWidth = 200;
notify.DisplayMilliseconds = 3000;
notify.IsModal = true;
notify.HideOnMaskClick = true;
notify.Show();
}
#endregion
}
}