ModelManagerOnStreamProgressChangedEvent Event |
Namespace: VIZCore3D.NET.Manager
public event StreamProgressChangedEventHandler OnStreamProgressChangedEvent
// VIZCore3D.NET Control private VIZCore3D.NET.VIZCore3DControl vizcore3d; private void AddStreamFile(Dictionary<string, byte[]> source) { vizcore3d.Model.OnStreamProgressChangedEvent += Model_OnStreamProgressChangedEvent; List<VIZCore3D.NET.Data.StreamData> stream = new List<VIZCore3D.NET.Data.StreamData>(); foreach (KeyValuePair<string, byte[]> item in source) { VIZCore3D.NET.Data.StreamData data = new VIZCore3D.NET.Data.StreamData( item.Value /* byte[] */ , item.Key /* Model Name */ ); stream.Add(data); } vizcore3d.Model.AddStream(stream); } private void Model_OnStreamProgressChangedEvent(object sender, VIZCore3D.NET.Event.EventManager.StreamProgressEventArgs e) { System.Diagnostics.Trace.WriteLine(string.Format("[{0}/{1}] {2} : {3}", e.Index, e.Count, e.ModelName, e.Result)); }