static void Mainx(string[] args) { { ShadowPlay <LoveBridge.Element> userInterface = new ShadowPlay <LoveBridge.Element>(); LoveBridge bridge = new LoveBridge(); string tmpXML = @" <div flex-wrap=""wrap"" justify-content=""center"" flex-direction=""row"" el-bind:id="" 'root-id' "" > <div el-for=""item in list"" el-bind:id=""item"" width=""100px"" height=""100px""> my id is {{item}} <div el-for=""item in list"" el-bind:id=""item"" width=""100px"" height=""100px""> my id is {{item}} </div> </div> </div> "; userInterface.Build(tmpXML); userInterface.SetBridge(bridge); userInterface.SetData("list", new List <string> { "a3" }); userInterface.Update(); userInterface.Update(); System.Console.WriteLine("--------------------------------"); System.Console.WriteLine(userInterface.ToString()); userInterface.SetData("list", new List <string> { }); userInterface.Update(); System.Console.WriteLine("--------------------------------"); System.Console.WriteLine(userInterface.ToString()); userInterface.SetData("list", new List <string> { "a3" }); userInterface.Update(); System.Console.WriteLine("--------------------------------"); System.Console.WriteLine(userInterface.ToString()); System.Console.Read(); } }
public string GetRealXmlString() { return(shadowPlay.ToString()); }
public override void Load() { string tmpXML3 = @" <div el-bind:padding-top=""pt"" el-bind:width=""w"" el-bind:height=""styleObj.StyleHeight"" id=""root"" flex-wrap=""wrap"" justify-content=""center"" flex-direction=""row"" > <div el-for=""item in list"" el-if=""item != '2' "" el-bind:margin=""mt"" el-bind:id=""item"" width=""100px"" height=""100px""> my id is {{item}} <div el-for=""item in list"" el-if=""item != '2' "" el-bind:margin=""mt"" el-bind:id=""item"" width=""50px"" height=""50px""> my id is {{item}} </div> </div> </div> "; string tmpXML = @" <div el-bind:padding-top=""pt"" el-bind:width=""w"" el-bind:height=""styleObj.StyleHeight"" id=""root"" flex-wrap=""wrap"" justify-content=""center"" flex-direction=""row"" > <div el-for=""item in list"" flex-wrap=""wrap"" el-if=""item != '2' "" el-bind:margin=""mt"" el-bind:id=""item"" width=""150px"" height=""150px""> my id is {{item}} <div el-for=""item in list"" flex-wrap=""wrap"" el-if=""item != '2' "" el-bind:id=""item"" width=""50px"" height=""50px""> my id is {{item}} </div> </div> </div> "; userInterface.Build(tmpXML); userInterface.SetData(new Dictionary <string, object>() { { "styleObj", this }, { "w", "620px" }, { "mt", "5px" }, { "pt", "15px" }, }); if (useFactory) { userInterface.SetBridge(fac); } userInterface.SetData("list", new List <string> { "a3" }); userInterface.Update(); System.Console.WriteLine("--------------------------------"); System.Console.WriteLine(userInterface.ToString()); System.Console.WriteLine("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); System.Console.WriteLine(fac.ToString()); System.Console.WriteLine("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); userInterface.SetData("list", new List <string> { "b3", "b5" }); userInterface.Update(); System.Console.WriteLine("--------------------------------"); System.Console.WriteLine(userInterface.ToString()); userInterface.SetData("list", new List <string> { "c1", "c2", "c3" }); userInterface.Update(); System.Console.WriteLine("--------------------------------"); System.Console.WriteLine(userInterface.ToString()); userInterface.SetData("list", new List <string> { "a3" }); userInterface.Update(); System.Console.WriteLine("--------------------------------"); System.Console.WriteLine(userInterface.ToString()); userInterface.SetData("list", new List <string> { "c1", "c2", "c3" }); userInterface.Update(); System.Console.WriteLine("--------------------------------"); System.Console.WriteLine(userInterface.ToString()); userInterface.SetData("list", new List <string> { "b3", "b5" }); userInterface.Update(); System.Console.WriteLine("--------------------------------"); System.Console.WriteLine(userInterface.ToString()); }