------ #### RaUIV4 V4.0.2311.0701 - *.[全新]整合了MyDb、ryControls、MyDb_MySQL等dll文件到RaUI一个项目。 - *.[新增]新增ApkOp类,可以轻松获取APK信息。 - *.[新增]新增JsonExt扩展类,让Json操作更简单。 - *.[新增]新增WebP类,可以支持webp格式的图片。 - *.[改进]ryQuickSQL中的AddField方法改为自动替换已存在的同名值。 - *.[修复]ryQuickSQL中的AddFieldCalc方法无法正常计算的BUG。
112 lines
2.5 KiB
C#
112 lines
2.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace TheArtOfDev.HtmlRenderer.Adapters.Entities
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class PageList
|
|
{
|
|
private int _iCurrent = -1;
|
|
|
|
private int iCurrent
|
|
{
|
|
get { return _iCurrent; }
|
|
set { _iCurrent = value; }
|
|
}
|
|
|
|
|
|
private List<RPage> _Page = new List<RPage>();
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public RPage Screen_Page = new RPage();
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="i"></param>
|
|
/// <returns></returns>
|
|
public RPage Page(int i)
|
|
{
|
|
if ((_Page.Count > 0) && (i >= 0) && (i <= _Page.Count))
|
|
{
|
|
return _Page[i];
|
|
}
|
|
else
|
|
{
|
|
return Screen_Page;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="page"></param>
|
|
public void Add(RPage page)
|
|
{
|
|
_Page.Add(page);
|
|
}
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public void Clear()
|
|
{
|
|
_Page.Clear();
|
|
}
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
|
|
public int Count
|
|
{
|
|
get { return _Page.Count; }
|
|
}
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public float Height
|
|
{
|
|
get
|
|
{
|
|
double y = 0;
|
|
int i = 0;
|
|
if (_Page.Count > 0)
|
|
{
|
|
for (i = 0; i < _Page.Count; i++)
|
|
{
|
|
|
|
y += _Page[i].VerticalDistanceBetweenTwoPages + _Page[i].Height;
|
|
}
|
|
y += _Page[i - 1].VerticalDistanceBetweenTwoPages;
|
|
}
|
|
return Convert.ToSingle(y);
|
|
}
|
|
}
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public float Width
|
|
{
|
|
get
|
|
{
|
|
double y = 0;
|
|
int i = 0;
|
|
if (_Page.Count > 0)
|
|
{
|
|
for (i = 0; i < _Page.Count; i++)
|
|
{
|
|
if (y < _Page[i].Width)
|
|
{
|
|
y = _Page[i].Width;
|
|
}
|
|
}
|
|
}
|
|
return Convert.ToSingle(y);
|
|
}
|
|
}
|
|
}
|
|
} |