示例#1
0
        private void btn1_Click(object sender, EventArgs e)
        {
            Codeplug c = Codeplug.FromFile("uhf.rdt");

            foreach (Codeplug.Contact con in c.Contacts)
            {
                if (con.Type == Codeplug.Contact.ContactType.Group || con.Type == Codeplug.Contact.ContactType.Private)
                {
                    con.Id += 1000;
                    //debugPrint(con.Name + " : " + con.Id);
                    Console.WriteLine(" " + con.Name + " - " + con.Id.ToString());
                }
            }

            c.save("testOut4.rdt");

            Console.WriteLine("READING BACK IN DATA ---");

            c = Codeplug.FromFile("testOut4.rdt");

            foreach (Codeplug.Contact con in c.Contacts)
            {
                if (con.Type == Codeplug.Contact.ContactType.Group || con.Type == Codeplug.Contact.ContactType.Private)
                {
                    //debugPrint(con.Name + " : " + con.Id);
                    Console.WriteLine(" " + con.Name + " - " + con.Id.ToString());
                }
            }

            /*
             *
             * debugPrint("Downloading repeater data..");
             * Repeaters.Repeater[] rptrs = Repeaters.Get_Repeaters();
             *
             * int i = 0;
             * foreach(Repeaters.Repeater rptr in rptrs)
             * {
             *  i++;
             *  if (i > 10) break;
             *  debugPrint(rptr.city + ", " + rptr.state);
             *
             * }*/
        }
示例#2
0
 public Contact(Kaitai.KaitaiStream io, Codeplug parent = null, Codeplug root = null) : base(io)
 {
     m_parent = parent;
     m_root   = root;
     _parse();
 }