public void AddHistory(ImageHistory history)
        {
            bool addInHead = true;

            if (index >= 0 && index < Histories.Count - 1)
            {
                while (Histories.Count - 1 > index)
                {
                    Histories.RemoveAt(index + 1);
                }
                addInHead = false;
            }
            Histories.Add(history);
            index = Histories.Count - 1;
            HistoryAdd?.Invoke(this, (history, addInHead, index));
        }
Beispiel #2
0
        public void UpdateImage(ImageUpdate updateRequest)
        {
            if (updateRequest.Image == CurrentImage)
            {
                return;
            }

            if (m_imageHistory == null)
            {
                m_imageHistory = new ObservableCollection <ImageUpdate>();
            }

            ImageHistory.Add(updateRequest);

            CurrentImage = updateRequest.Image;
        }
Beispiel #3
0
 public IList <ImageHistoryData> GetAllHistory(int id)
 {
     return(ImageHistory.ToJavaScriptImageHistory(_eventStoreRepository.All(id)));
 }