private void SendHistoryChangedEvent(ClipItem newClip, ClipItem?previousClip = null) { OnHistoryChanged?.Invoke(this, new NewClipItemEventEventArgs() { ClipItem = newClip, PreviousClipItem = previousClip }); }
//Internal method. This is called from various places if something in the timeline changes. private void timelineChanged() { history.timelineEnd = getMaxYear(); //actualized displayedHistory - List expandDisplayedHistory(null); //Execute all requested callbacks (e.g. from the UI script to actualize the list), if not null; if (OnTimelineChangeAction != null) { OnTimelineChangeAction.Invoke(); } //Execute User Events OnHistoryChanged.Invoke(); }
private void OnSubmit(LineEditEventArgs args) { if (string.IsNullOrWhiteSpace(args.Text)) { return; } if (History.Count == 0 || History[History.Count - 1] != args.Text) { History.Add(args.Text); if (History.Count > MaxHistorySize) { History.RemoveAt(0); } } HistoryIndex = History.Count; OnHistoryChanged?.Invoke(); }