private void pasteButton_Click(object sender, EventArgs e) { if (Clipboard.ContainsData(ClipboardFormat)) { CurrentItem = (SoundListEntry)Clipboard.GetData(ClipboardFormat); ReloadTextureData(); } }
public void Read(Stream input, OWLib.STUD stud) { using (BinaryReader reader = new BinaryReader(input, System.Text.Encoding.Default, true)) { data = reader.Read <SoundListData>(); if (data.offsetLists > 0) { input.Position = data.offsetLists; STUDArrayInfo array = reader.Read <STUDArrayInfo>(); info = new SoundListInfo[array.count]; entries = new SoundListEntry[array.count][]; input.Position = (long)array.offset; for (ulong i = 0; i < array.count; ++i) { info[i] = reader.Read <SoundListInfo>(); } for (ulong i = 0; i < array.count; ++i) { if (info[i].offset > 0) { input.Position = info[i].offset; STUDArrayInfo innerArray = reader.Read <STUDArrayInfo>(); entries[i] = new SoundListEntry[innerArray.count]; input.Position = (long)innerArray.offset; for (ulong j = 0; j < innerArray.count; ++j) { entries[i][j] = reader.Read <SoundListEntry>(); } } else { entries[i] = new SoundListEntry[0]; } } } else { info = new SoundListInfo[0]; entries = new SoundListEntry[0][]; } } }