public NKMD(byte[] Data) { EndianBinaryReader er = new EndianBinaryReader(new MemoryStream(Data), Endianness.LittleEndian); try { Header = new NKMDHeader(er); foreach (var v in Header.SectionOffsets) { er.BaseStream.Position = Header.HeaderSize + v; String sig = er.ReadString(Encoding.ASCII, 4); er.BaseStream.Position -= 4; switch (sig) { case "OBJI": ObjectInformation = new OBJI(er); break; case "PATH": Path = new PATH(er); break; case "POIT": Point = new POIT(er); break; case "STAG": Stage = new STAG(er); break; case "KTPS": KartPointStart = new KTPS(er); break; case "KTPJ": KartPointJugem = new KTPJ(er, Header.Version); break; case "KTP2": KartPointSecond = new KTP2(er); break; case "KTPC": KartPointCannon = new KTPC(er); break; case "KTPM": KartPointMission = new KTPM(er); break; default: //throw new Exception("Unknown Section: " + sig); continue; //goto cont; } } cont: if (KartPointCannon == null) { KartPointCannon = new KTPC(); } if (KartPointMission == null) { KartPointMission = new KTPM(); } } catch (SignatureNotCorrectException e) { MessageBox.Show(e.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { er.Close(); } }
public MKDSRouteViewer(PATH Routes, POIT Points) { this.Routes = Routes; this.Points = Points; InitializeComponent(); }
public MKDSRouteLineRenderGroup(PATH Paths, POIT Points, Color LineColor) { this.Paths = Paths; this.Points = Points; this.LineColor = LineColor; }