Exemplo n.º 1
0
 public String GetFullCmd(String shortCmd)
 {
     if (AliasCmds.ContainsKey(shortCmd))
     {
         return(AliasCmds[shortCmd]);
     }
     return(null);
 }
Exemplo n.º 2
0
        private void LoadAliasCmds()
        {
            String path = AppDomain.CurrentDomain.BaseDirectory + "Alias.xml";

            if (File.Exists(path))
            {
                XmlDocument doc = new XmlDocument();
                doc.Load(path);
                XmlNodeList xnl = doc["data"].ChildNodes;
                foreach (XmlNode xn in xnl)
                {
                    String sc = xn.Attributes["shortCmd"].Value;
                    String fc = xn.Attributes["fullCmd"].Value;
                    if (!AliasCmds.ContainsKey(sc))
                    {
                        AliasCmds.Add(sc, fc);
                    }
                }
            }
        }