public static CLabtype FromStream(System.IO.BinaryReader br) { CLabtype lab = new CLabtype(); lab.attrVal = br.ReadInt16(); if (lab.attr == Type.Model) { CModType mod = new CModType(); mod.Name = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(30)); lab.Tag = mod; } else if (lab.attr == Type.String) { CStgType stg = new CStgType(); stg.label = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); lab.Tag = stg; } else if (lab.attr == Type.Point) { CPTStype pts = CPTStype.FromStream(br); lab.Tag = pts; } else if (lab.attr == Type.Text) { CTXTtype txt = CTXTtype.FromStream(br); lab.Tag = txt; } return(lab); }
public static ClSTtype FromStream(BinaryReader br) { ClSTtype lstdata = new ClSTtype(); lstdata.strMod1 = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(30)); lstdata.strStg = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); return(lstdata); }
public static Detail FromStream(System.IO.BinaryReader br) { Detail detail = new Detail(); detail.ModelName = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(30)); detail.StringName = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); detail.XMin = br.ReadDouble(); detail.YMin = br.ReadDouble(); detail.TextSize = br.ReadDouble(); detail.Rotation = br.ReadDouble(); return(detail); }
public static CTXTtype FromStream(BinaryReader br) { CTXTtype txt = new CTXTtype(); txt.tx = br.ReadDouble(); txt.ty = br.ReadDouble(); txt.tz = br.ReadDouble(); txt.ts = br.ReadDouble(); txt.tr = br.ReadDouble(); txt.tg = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(60)); return(txt); }
public static Grid FromStream(System.IO.BinaryReader br) { Grid grid = new Grid(); grid.ModelName = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(30)); grid.StringName = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); grid.MinX = br.ReadDouble(); grid.MinY = br.ReadDouble(); grid.MaxX = br.ReadDouble(); grid.MaxY = br.ReadDouble(); grid.XInterval = br.ReadDouble(); grid.YInterval = br.ReadDouble(); grid.TextSize = br.ReadDouble(); grid.Rotation = br.ReadDouble(); return(grid); }
public static Circletype FromStream(System.IO.BinaryReader br) { Circletype circle = new Circletype(); circle.elatt = br.ReadInt16(); circle.scatt = br.ReadInt16(); circle.Layer = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); circle.laatt = br.ReadInt16(); circle.xc = br.ReadDouble(); circle.yc = br.ReadDouble(); circle.Radius = br.ReadDouble(); circle.color = br.ReadInt16(); circle.style = br.ReadInt16(); circle.Width = br.ReadInt16(); circle.Label = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); return(circle); }
public string Label; //20 public static TEXTtype FromStream(System.IO.BinaryReader br) { TEXTtype text = new TEXTtype(); text.Length = br.ReadInt16(); text.scatt = br.ReadInt16(); text.Layer = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); text.laatt = br.ReadInt16(); text.x1 = br.ReadDouble(); text.y1 = br.ReadDouble(); text.Size = br.ReadDouble(); text.rotn = br.ReadDouble(); text.Color = br.ReadInt16(); text.style = br.ReadInt16(); text.text = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(60)); text.Label = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); return(text); }
public string Label; //20 char public static Boxtype FromStream(System.IO.BinaryReader br) { Boxtype box = new Boxtype(); box.elatt = br.ReadInt16(); box.scatt = br.ReadInt16(); box.Layer = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); box.laatt = br.ReadInt16(); box.x1 = br.ReadDouble(); box.y1 = br.ReadDouble(); box.x2 = br.ReadDouble(); box.y2 = br.ReadDouble(); box.color = br.ReadInt16(); box.style = br.ReadInt16(); box.Width = br.ReadInt16(); box.Label = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); return(box); }
public static Linetype FromStream(System.IO.BinaryReader br) { Linetype line = new Linetype(); line.elatt = br.ReadInt16(); line.scatt = br.ReadInt16(); line.layer = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); line.laatt = br.ReadInt16(); line.x1 = br.ReadDouble(); line.y1 = br.ReadDouble(); line.z1 = br.ReadDouble(); line.x2 = br.ReadDouble(); line.y2 = br.ReadDouble(); line.z2 = br.ReadDouble(); line.color = br.ReadInt16(); line.style = br.ReadInt16(); line.width = br.ReadInt16(); line.label = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); return(line); }
public static OffsetRec FromStream(BinaryReader br) { OffsetRec obj = new OffsetRec(); obj.OffsetType = br.ReadInt16(); obj.AcceptCode = br.ReadInt16(); obj.ModelName = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(30)); //[30]; obj.StringName = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); //[20]; obj.OffsetModel = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(30)); //[30]; obj.OffsetString = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); //[20]; obj.StartChainage = br.ReadDouble(); obj.EndChainage = br.ReadDouble(); obj.StartHOffset = br.ReadDouble(); obj.EndHOffset = br.ReadDouble(); obj.StartVOffset = br.ReadDouble(); obj.EndVOffset = br.ReadDouble(); obj.StartSuper = br.ReadDouble(); obj.EndSuper = br.ReadDouble(); return(obj); }
public static Arctype FromStream(System.IO.BinaryReader br) { Arctype arc = new Arctype(); arc.elatt = br.ReadInt16(); arc.scatt = br.ReadInt16(); arc.Layer = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); arc.laatt = br.ReadInt16(); arc.xs = br.ReadDouble(); arc.ys = br.ReadDouble(); arc.xe = br.ReadDouble(); arc.ye = br.ReadDouble(); arc.xc = br.ReadDouble(); arc.yc = br.ReadDouble(); arc.Radius = br.ReadDouble(); arc.Color = br.ReadInt16(); arc.style = br.ReadInt16(); arc.Width = br.ReadInt16(); arc.Label = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20)); return(arc); }