public void Load(string path) { lock (saveLockObj) { using (Stream stream = File.Open(path, FileMode.OpenOrCreate)) { try { _models = Serializer.Deserialize(stream) as ShowModelCollection; } catch (Exception e) { Debug.WriteLine("Error loading: " + e.ToString()); } } foreach (ShowModel model in Models) { model.DisplayMatrix.IsDirty = true; ShowSlidePartModel slide = model as ShowSlidePartModel; if (slide != null) { slide.Parent = GetModelByID(slide.ParentID) as ShowSlidePartModel; } } } }
public ShowSlidePartView(ShowSlidePartModel model) : base(model) { InitializeComponent(); }