public static EffectsDirectory CreateFromStream(Stream strm) { EffectsDirectory effDir = new EffectsDirectory(); effDir.MajorVersion = strm.ReadU16BE(); effDir.MinorVersion = strm.ReadU16BE(); uint NumberofEntries = strm.ReadU16BE(); uint Behavior_1 = strm.ReadU16BE(); uint AlwaysZero = strm.ReadU16BE(); uint Behavior_2 = strm.ReadU16BE(); uint EffectDurationMinimum = strm.ReadU16BE(); uint EffectDurationMaximum = strm.ReadU16BE(); uint NumberReleasedAtHighDetail = strm.ReadU16BE(); uint RepeatFlag = strm.ReadU16BE(); uint Unk1 = strm.ReadU16BE(); uint Unk2 = strm.ReadU16BE(); uint Unk3 = strm.ReadU16BE(); uint TimeDelayMinimum = strm.ReadU16BE(); uint TimeDelayMaximum = strm.ReadU16BE(); uint XAxisPushMin = strm.ReadU16BE(); uint XAxisPushMax = strm.ReadU16BE(); return(effDir); }
private void UserControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { if (this.DataContext != null && this.DataContext.GetType() == typeof(DatabaseIndexData)) { DatabaseIndexData index = (DatabaseIndexData)this.DataContext; MemoryStream byteStream = new MemoryStream(index.Data); try { EffectsDirectory effDir = EffectsDirectory.CreateFromStream(byteStream); } catch { } } }