Exemplo n.º 1
0
        public IType write(BinaryWriter f)
        {
            string[] values = Value.Split(DatTool.DELIMITER);
            f.Write(Convert.ToInt32(values.Length));
            foreach (string parseS in values)
            {
                string[] v = parseS.Replace("(", "").Replace(")", "").Split(':');
                f.Write(Convert.ToInt32(v[0]));
                DatTool.WriteString(f, ConvertUtilities.replaceIn(v[1]));
            }

            return(this);
        }
Exemplo n.º 2
0
 public IType read(BinaryReader f)
 {
     cnt  = f.ReadInt32();
     Text = "";
     for (int i = 0; i < cnt; i++)
     {
         Text += f.ReadInt32().ToString();
         if (i < cnt - 1)
         {
             Text += DatTool.DELIMITER;
         }
     }
     Text = ConvertUtilities.replaceIn(Text);
     return(this);
 }
Exemplo n.º 3
0
        public IType read(BinaryReader b)
        {
            int size = b.ReadInt32();

            for (int i = 0; i < size; i++)
            {
                int    id   = b.ReadInt32();
                String text = ConvertUtilities.replaceIn(DatTool.ReadString(b));
                Value += "(" + id + ":" + text + ")";
                if (i < size - 1)
                {
                    Value += DatTool.DELIMITER;
                }
            }

            return(this);
        }
Exemplo n.º 4
0
        public IType write(BinaryWriter f)
        {
            text = ConvertUtilities.replaceIn(text);

            if (text.Length > 0)
            {
                string[] TmpStr = text.Split(new[] { DatTool.DELIMITER });
                DatTool.WriteByteCount(f, cntr);
                for (int i = 0; i < cntr; i++)
                {
                    f.Write(Convert.ToInt32(TmpStr[i]));
                }
            }
            else
            {
                DatTool.WriteByteCount(f, 0);
            }

            return(this);
        }
Exemplo n.º 5
0
 public IType write(BinaryWriter f)
 {
     Text = ConvertUtilities.replaceIn(Text);
     DatTool.WriteStringSimple_UnicodeInt32Length(f, Text);
     return(this);
 }
Exemplo n.º 6
0
 public void setText(String t)
 {
     richTextBox1.Text = ConvertUtilities.replaceIn(t);
 }
Exemplo n.º 7
0
 public IType write(BinaryWriter f)
 {
     Text = ConvertUtilities.replaceIn(Text);
     DatTool.WriteString(f, Text);
     return(this);
 }