public static void ShowDesignOverlay( TimelineStyle testStyle = null) { if (designOverlay == null) { dummyNoticeList = TimelineVisualNoticeModel.CreateDummyNotices(testStyle); designOverlay = CreateDesignOverlay(); } designOverlay.Show(); designOverlay.OverlayVisible = true; foreach (var notice in dummyNoticeList) { designOverlay.AddNotice(notice, true); } }
public void AddNotice( TimelineVisualNoticeModel notice, bool dummyMode = false, bool init = false) { lock (this) { var same = this.noticeList.FirstOrDefault(x => x.IsVisible && x.TextToDisplay == notice.TextToDisplay); if (same != null) { lock (same) { same.Timestamp = notice.Timestamp; same.IncrementStack(); } return; } notice.StartNotice( (toRemove) => { lock (this) { toRemove.ClearStack(); this.noticeList.Remove(toRemove); this.OverlayVisible = this.noticeList.Any(x => x.IsVisible); } }, dummyMode); notice.IncrementStack(); this.noticeList.Add(notice); this.EnsureTopMost(); if (!init) { this.OverlayVisible = true; } } }