Ejemplo n.º 1
0
    static List <string> Names(M.Database db)
    {
        List <string> names = new List <string>();

        using (M.Table root = db.Search("mfd_root"))
        {
            using (M.Sequence sequence = root.SearchAll(new string[] { "name" }))
            {
                while (sequence.Fetch())
                {
                    names.Add(sequence.GetValues()[0].Data.ToString());
                }
            }
        }
        names.Sort();
        return(names);
    }
Ejemplo n.º 2
0
    static List <string> CompNames(M.Database db)
    {
        var names = new List <string>();

        using (M.Table t = db.Search("mfd_root"))
        {
            using (M.Sequence sequence = t.SearchAll(new string[] { "mfd_id", "type", "name" }))
            {
                while (sequence.Fetch())
                {
                    names.Add(
                        sequence.GetValues()[1].Data.ToString()
                        + " " + "[" + sequence.GetValues()[2].Data.ToString() + "]"
                        + " " + sequence.GetValues()[0].Data.ToString()
                        );
                }
            }
        }
        names.Sort();
        return(names);
    }