public override void UpdateModel(Dictionary dictionary) { base.UpdateModel(dictionary); DictionaryNode optionsNode = dictionary.RootNode.GetChildNode(XafApplication.OptionsNodeName); optionsNode.SetAttribute(SaveListViewStateInDataStoreAttributeName, false); }
public void Create_Application() { var helper = new SchemaHelper(); DictionaryNode node=helper.CreateElement(ModelElement.Application); var dictionaryNode = new DictionaryNode("Element"); dictionaryNode.SetAttribute("Name", ModelElement.Application.ToString()); Assert.AreEqual(dictionaryNode.ToXml(), node.ToXml()); }
public void Create_Class() { var helper = new SchemaHelper(); DictionaryNode node=helper.CreateElement(ModelElement.Class); var dictionaryNode = new DictionaryNode("Element"); dictionaryNode.SetAttribute("Name", ModelElement.Application.ToString()); var childNode = dictionaryNode.AddChildNode("Element"); childNode.SetAttribute("Name", ModelElement.BOModel.ToString()); childNode.AddChildNode("Element").SetAttribute("Name", ModelElement.Class.ToString()); Assert.AreEqual(dictionaryNode.ToXml(), node.ToXml()); }
private void setAttributes(DictionaryNode dictionaryNode, ViewCloner viewCloner) { dictionaryNode.SetAttribute("Caption", viewCloner.Caption); dictionaryNode.SetAttribute("ID", viewCloner.Caption); }
public void Inject_Into_ListView() { var helper = new SchemaHelper(); var element = new DictionaryNode("Element"); element.SetAttribute("Name", ModelElement.Application.ToString()); var childNode = element.AddChildNode("Element"); childNode.SetAttribute("Name", ModelElement.Views.ToString()); var addChildNode = childNode.AddChildNode("Element"); addChildNode.SetAttribute("Name", ModelElement.ListView.ToString()); addChildNode.AddChildNode("Element1"); DictionaryNode dictionaryNode=helper.Inject(@"<Element1/>", ModelElement.ListView); Assert.AreEqual(element.ToXml(), dictionaryNode.ToXml()); }