Ejemplo n.º 1
0
        public void ParseType(byte[] buf)
        {
            BinaryReader r = new BinaryReader(new MemoryStream(buf), Encoding.GetEncoding("iso-8859-1"));
            String       t = new String(r.ReadChars(3));

            TypeValue = (K3pType)Enum.Parse(typeof(K3pType), t);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Return the name of the type specified.
        /// </summary>
        public static String GetTypeName(K3pType type)
        {
            switch (type)
            {
            case K3pType.INS: return("instruction");

            case K3pType.INT: return("integer");

            case K3pType.STR: return("string");

            default: return("unknown type");
            }
        }
Ejemplo n.º 3
0
Archivo: K3p.cs Proyecto: tmbx/kwm-ng
 public void ParseType(byte[] buf)
 {
     BinaryReader r = new BinaryReader(new MemoryStream(buf), Encoding.GetEncoding("iso-8859-1"));
     String t = new String(r.ReadChars(3));
     TypeValue = (K3pType)Enum.Parse(typeof(K3pType), t);
 }
Ejemplo n.º 4
0
Archivo: K3p.cs Proyecto: tmbx/kwm-ng
 /// <summary>
 /// Return the name of the type specified.
 /// </summary>
 public static String GetTypeName(K3pType type)
 {
     switch (type)
     {
         case K3pType.INS: return "instruction";
         case K3pType.INT: return "integer";
         case K3pType.STR: return "string";
         default: return "unknown type";
     }
 }