public override XmlItem OnCommand(XmlItem xml, bool ignoreIfNotExists) { string action = xml.GetAttribute("action").ToLowerInvariant(); if(action == "ui.show.preferences") { Forms.Settings Dlg = new Forms.Settings(); Dlg.ShowDialog(); FormMain.EnabledUi(); } else if (action == "ui.show.about") { Forms.About dlg = new Forms.About(); dlg.ShowDialog(); } else if (action == "ui.show.menu") { FormMain.ShowMenu(); } else return base.OnCommand(xml, ignoreIfNotExists); return null; }
public override void OnCommand(CommandLine command) { string action = command.Get("action", "").ToLowerInvariant(); if (action == "ui.show.preferences") { Forms.Settings Dlg = new Forms.Settings(); Dlg.ShowDialog(); FormMain.EnabledUi(); } else if (action == "ui.show.about") { Forms.About dlg = new Forms.About(); dlg.ShowDialog(); } else if (action == "ui.show.menu") { FormMain.ShowMenu(); } else { base.OnCommand(command); } }