/// <summary>
        ///     Registers the current marking
        /// </summary>
        public void RegisterCurrentMarking()
        {
            CurrentMarking = new Marking();

            if (Markings.Count >= MaxMarking)
            {
                Markings.RemoveAt(0);
            }

            Markings.Add(CurrentMarking);
        }
        /// <summary>
        ///     Selects the current marking an restores the marks
        /// </summary>
        /// <param name="marking"></param>
        /// <returns>true when a marking has been selected</returns>
        private bool SelectCurrentMarking(Marking marking)
        {
            bool retVal = marking != null;

            if (retVal)
            {
                EfsSystem.Instance.ClearMessages(false);
                EfsSystem.Instance.Context.HandleInfoMessageChangeEvent(null);
                CurrentMarking = marking;
                CurrentMarking.RestoreMarks();
            }

            return(retVal);
        }
        /// <summary>
        ///     Selects the previous marking in the history
        /// </summary>
        public bool SelectPreviousMarking()
        {
            Marking current = null;

            foreach (Marking marking in Markings)
            {
                if (marking != CurrentMarking)
                {
                    current = marking;
                }
                else
                {
                    break;
                }
            }

            // current is the marking before CurrentMarking
            return(SelectCurrentMarking(current));
        }
        /// <summary>
        ///     Selects the next marking in the history
        /// </summary>
        public bool SelectNextMarking()
        {
            Marking previous = null;
            Marking current  = null;

            foreach (Marking marking in Markings)
            {
                if (marking == CurrentMarking)
                {
                    previous = marking;
                }
                else if (previous != null)
                {
                    current = marking;
                    break;
                }
            }

            // current is the marking after CurrentMarking
            return(SelectCurrentMarking(current));
        }
        /// <summary>
        ///     Selects the current marking an restores the marks
        /// </summary>
        /// <param name="marking"></param>
        /// <returns>true when a marking has been selected</returns>
        private bool SelectCurrentMarking(Marking marking)
        {
            bool retVal = marking != null;

            if (retVal)
            {
                EFSSystem.INSTANCE.ClearMessages(false);
                EFSSystem.INSTANCE.Context.HandleInfoMessageChangeEvent(null);
                CurrentMarking = marking;
                CurrentMarking.RestoreMarks();
            }

            return retVal;
        }
        /// <summary>
        ///     Registers the current marking
        /// </summary>
        public void RegisterCurrentMarking()
        {
            CurrentMarking = new Marking();

            if (Markings.Count >= MaxMarking)
            {
                Markings.RemoveAt(0);
            }

            Markings.Add(CurrentMarking);
        }