Ejemplo n.º 1
0
        /// <summary>
        ///     Registers the current marking
        /// </summary>
        public void RegisterCurrentMarking()
        {
            CurrentMarking = new Marking();

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

            Markings.Add(CurrentMarking);
        }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
        /// <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));
        }
Ejemplo n.º 4
0
        /// <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));
        }
Ejemplo n.º 5
0
        /// <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;
        }
Ejemplo n.º 6
0
        /// <summary>
        ///     Registers the current marking
        /// </summary>
        public void RegisterCurrentMarking()
        {
            CurrentMarking = new Marking();

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

            Markings.Add(CurrentMarking);
        }