예제 #1
0
        private int GetNextId()
        {
            int currentSampleAttachmentsIndex = ListSampleAttachmentses.FindIndex(x => x.SampleAttachmentID == CurrentId);

            if (currentSampleAttachmentsIndex + 1 == ListSampleAttachmentses.Count)
            {
                currentSampleAttachmentsIndex = -1;
            }
            return(ListSampleAttachmentses[currentSampleAttachmentsIndex + 1].SampleAttachmentID);
        }
예제 #2
0
        private int GetPrevId()
        {
            int currentSampleAttachmentsIndex = ListSampleAttachmentses.FindIndex(x => x.SampleAttachmentID == CurrentId);

            if (currentSampleAttachmentsIndex == 0)
            {
                currentSampleAttachmentsIndex = ListSampleAttachmentses.Count;
            }
            return(ListSampleAttachmentses[currentSampleAttachmentsIndex - 1].SampleAttachmentID);
        }