protected void ShowXmlEditor(object sender, EventArgs args) { XmlEditorController.IfNull(() => { NewDocument("xmlEditor.xml"); }); }
protected void NewXml(object sender, EventArgs args) { if (CheckDirtyModel()) { XmlEditorController.IfNotNull(t => t.View.Editor.Document.TextContent = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n"); CurrentXmlFilename = String.Empty; } }
public void LoadXml(string filename) { XmlEditorController.IfNull(() => NewDocument("xmlEditor.xml")); XmlEditorController.View.Editor.LoadFile(filename); CurrentXmlFilename = filename; // SetCaption(filename); CreateTypes(this, EventArgs.Empty); GenerateCode(this, EventArgs.Empty); Compile(this, EventArgs.Empty); // Now we can load our receptors, once the protocol dictionary is loaded. // TODO: How do we KNOW the protocol dictionary has been loaded? // Speak("Protocols loaded."); Program.Skin.LoadReceptors(); // Process immediately. }