Exemple #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);
        }
Exemple #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");
            }
        }
Exemple #3
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);
 }
Exemple #4
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";
     }
 }