本文整理汇总了C#中Poker.LoadState方法的典型用法代码示例。如果您正苦于以下问题:C# Poker.LoadState方法的具体用法?C# Poker.LoadState怎么用?C# Poker.LoadState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Poker
的用法示例。
在下文中一共展示了Poker.LoadState方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Label_ViewState
public void Label_ViewState ()
{
XmlPoker p = new XmlPoker ();
Assert.AreEqual (p.Text, "", "A1");
p.Text = "Hello";
Assert.AreEqual (p.Text, "Hello", "A2");
object state = p.SaveState ();
Poker copy = new Poker ();
copy.LoadState (state);
Assert.AreEqual (copy.Text, "Hello", "A3");
}
示例2: FormView_ViewState
public void FormView_ViewState ()
{
Poker fv = new Poker ();
Poker copy = new Poker ();
fv.AllowPaging = true;
fv.HeaderText = "Testing";
fv.CssClass = "style.css";
object state = fv.SaveState ();
copy.LoadState (state);
Assert.AreEqual (true, copy.AllowPaging, "ViewStateAllowPaging");
Assert.AreEqual ("Testing", copy.HeaderText, "ViewStateHeaderText");
Assert.AreEqual ("style.css", copy.CssClass, "ViewStateCssClass");
}
示例3: ViewState
public void ViewState ()
{
Poker p = new Poker ();
Poker copy = new Poker ();
p.DataSourceID = "hi";
object state = p.SaveState ();
copy.LoadState (state);
Assert.AreEqual ("hi", copy.DataSourceID, "A1");
}
示例4: ViewState
public void ViewState ()
{
Poker t = new Poker ();
t.TrackState();
t.ValidationGroup = "VG";
t.CausesValidation = true;
object s = t.SaveState ();
Console.WriteLine ("state = {0}", s == null ? "null" : "not-null");
Poker copy = new Poker ();
copy.LoadState (s);
Assert.AreEqual ("VG", copy.ValidationGroup, "A1");
Assert.IsTrue (copy.CausesValidation, "A2");
}
示例5: TestValidationGroup
public void TestValidationGroup ()
{
Poker p = new Poker ();
p.TrackState ();
Assert.AreEqual (p.ValidationGroup, "", "V1");
p.ValidationGroup = "VG1";
Assert.AreEqual (p.ValidationGroup, "VG1", "V2");
object state = p.SaveState ();
Poker copy = new Poker ();
copy.TrackState ();
copy.LoadState (state);
Assert.AreEqual (copy.ValidationGroup, "VG1", "A3");
}