2 using System.Collections.Generic;
5 using System.Xml.Expression;
9 using Xex = System.Xml.Expression.Xexpression;
13 public static void Main()
16 MDatabase.ApplicationDir = "/usr/local/share/m17n";
19 MInputMethod.Command[] cmds;
22 MDatabase.Tag tag = new MDatabase.Tag ("input-method",
23 "t", "nil", "vi-base");
24 MDatabase mdb = MDatabase.Find (tag);
25 XmlNode node = mdb.Load ("map-alnum", "input-method", "map-list", "map");
27 Console.WriteLine (node.OuterXml);
30 MInputMethod im = MInputMethod.Find ("vi", "telex");
32 if (im.Info (out desc, out title, out vars, out cmds))
34 Console.WriteLine ("{0}, {1}, {2}, {3}", desc, title, vars, cmds);
38 MInputMethod[] ims = MInputMethod.List ();
39 foreach (MInputMethod im in ims)
42 Console.Write ("(<{0}, {1}, {2}>", im.Language, im.Name, im.SubName);
43 if (im.Info (out desc, out title, out vars, out cmds))
44 Console.Write (" {0}, {1}, {2}, {3}", desc, title, vars, cmds);
46 Console.Write (" open fail");
47 Console.WriteLine (")");