public InstVar ReadInstVar() { InstVar inst_var = new InstVar(); inst_var.Told = ReadIntVar(); inst_var.CaptionLength = ReadIntVar(); inst_var.CaptionBytes = SavReader.ReadBytes(inst_var.CaptionLength.Value); return(inst_var); }
public static InstVar GenerateInstVar(string Name, int Told = 0) { InstVar item = new InstVar(); item.CaptionBytes = Encoding.GetEncoding(1251).GetBytes(Name); item.Told = new IntVar() { FirstByte = 18, VarIndex = 4, DelimeterByte = 6, Value = Told }; item.CaptionLength = new IntVar() { FirstByte = 18, VarIndex = 5, DelimeterByte = 1, Value = Name.Length }; return(item); }