2 using System.Collections.Generic;
11 public static void Main()
14 MDatabase.ApplicationDir = "/usr/local/share/m17n-xml";
16 MInputMethod.Variable[] vars;
17 MInputMethod.Command[] cmds;
20 MDatabase.Tag tag = new MDatabase.Tag ("input-method",
21 "t", "nil", "vi-base");
22 MDatabase mdb = MDatabase.Find (tag);
23 XmlNode node = mdb.Load ("map-alnum", "input-method", "map-list", "map");
25 Console.WriteLine (node.OuterXml);
28 MInputMethod im = MInputMethod.Find ("vi", "telex");
30 if (im.Info (out desc, out title, out vars, out cmds))
32 Console.WriteLine ("{0}, {1}, {2}, {3}", desc, title, vars, cmds);
36 MInputMethod[] ims = MInputMethod.List ();
37 foreach (MInputMethod im in ims)
40 Console.Write ("(<{0}, {1}, {2}>", im.Language, im.Name, im.SubName);
41 if (im.Info (out desc, out title, out vars, out cmds))
42 Console.Write (" {0}, {1}, {2}, {3}", desc, title, vars, cmds);
44 Console.Write (" open fail");
45 Console.WriteLine (")");