public Writer(string filepath, SySal.BasicTypes.Identifier id, SySal.BasicTypes.Rectangle extents, SySal.BasicTypes.Vector2 center, SySal.DAQSystem.Scanning.IntercalibrationInfo transform) { guid = System.Environment.ExpandEnvironmentVariables("%TEMP%\\" + System.Guid.NewGuid().ToString() + ".tlgs."); m_FilePath = filepath; w_tlg = new System.IO.BinaryWriter(new System.IO.FileStream(filepath, System.IO.FileMode.Create, System.IO.FileAccess.Write, System.IO.FileShare.None)); b_toptk = new System.IO.BinaryWriter(t_toptk = new System.IO.FileStream(guid + "ttk", System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite, System.IO.FileShare.None)); b_bottk = new System.IO.BinaryWriter(t_bottk = new System.IO.FileStream(guid + "btk", System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite, System.IO.FileShare.None)); b_topvw = new System.IO.BinaryWriter(t_topvw = new System.IO.FileStream(guid + "tvw", System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite, System.IO.FileShare.None)); b_botvw = new System.IO.BinaryWriter(t_botvw = new System.IO.FileStream(guid + "bvw", System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite, System.IO.FileShare.None)); b_topix = new System.IO.BinaryWriter(t_topix = new System.IO.FileStream(guid + "tix", System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite, System.IO.FileShare.None)); b_botix = new System.IO.BinaryWriter(t_botix = new System.IO.FileStream(guid + "bix", System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite, System.IO.FileShare.None)); b_linked = new System.IO.BinaryWriter(t_linked = new System.IO.FileStream(guid + "lk", System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite, System.IO.FileShare.None)); w_tlg.Write((byte)0x41); w_tlg.Write((ushort)0x7); w_tlg.Write(SectionTag); Section_Tracks_pos = w_tlg.BaseStream.Position; w_tlg.Write((long)0); w_tlg.Write(id.Part0); w_tlg.Write(id.Part1); w_tlg.Write(id.Part2); w_tlg.Write(id.Part3); w_tlg.Write(center.X); w_tlg.Write(center.Y); w_tlg.Write(extents.MinX); w_tlg.Write(extents.MaxX); w_tlg.Write(extents.MinY); w_tlg.Write(extents.MaxY); w_tlg.Write(transform.MXX); w_tlg.Write(transform.MXY); w_tlg.Write(transform.MYX); w_tlg.Write(transform.MYY); w_tlg.Write(transform.TX); w_tlg.Write(transform.TY); w_tlg.Write(transform.RX); w_tlg.Write(transform.RY); }
/// <summary> /// Sets the Id; /// </summary> /// <param name="id">the new id.</param> public void SetId(SySal.BasicTypes.Identifier id) { m_Id = id; }