本文整理汇总了C#中Page.Refresh方法的典型用法代码示例。如果您正苦于以下问题:C# Page.Refresh方法的具体用法?C# Page.Refresh怎么用?C# Page.Refresh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Page
的用法示例。
在下文中一共展示了Page.Refresh方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestSerializationOfPage
public void TestSerializationOfPage()
{
var p = new Page<ICrestGroup>();
p.Href = "https://public-crest.eveonline.com/inventory/groups/?page=1";
p.Refresh();
var settings = new JsonSerializerSettings();
settings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
settings.ContractResolver = new CrestJsonContractResolver();
settings.Converters.Add(new CrestJsonConverter());
var x = JsonConvert.SerializeObject(p, settings);
Assert.IsFalse(string.IsNullOrEmpty(x));
}
示例2: MakePages
void MakePages()
{
XmlElement root = (XmlElement)XML.SelectSingleNode("Display");
string[] s = root.GetAttribute("Size").Split(',');
Size = new Size(int.Parse(s[0]), int.Parse(s[1]));
Pages.Clear();
for (int i = 0; i < root.ChildNodes.Count; i++)
{
Page cav = new Page(Size.Width, Size.Height);
cav.BeforeRender = BeforePageRender;
cav.AfterRender = AfterPageRender;
XmlElement page = root.ChildNodes[i] as XmlElement;
string id = page.GetAttribute("ID");
cav.Delay = int.Parse(page.GetAttribute("Delay"));
Pages.Add(id, cav);
foreach (XmlNode n in page.ChildNodes)
{
if (n.Name == "TextBox")
{
cav.AddItem(0, new Canvas.TextBox(n));
}
else if (n.Name == "FillRect")
{
cav.AddItem(0, new Canvas.FillRect(n));
}
else if (n.Name == "Rect")
{
cav.AddItem(0, new Canvas.Rect(n));
}
else if (n.Name == "FillEllipse")
{
cav.AddItem(0, new Canvas.FillEllipse(n));
}
else if (n.Name == "Ellipse")
{
cav.AddItem(0, new Canvas.Ellipse(n));
}
else if (n.Name == "PicBox")
{
cav.AddItem(0, new Canvas.PicBox(n));
}
}
cav.Refresh();
}
}