예제 #1
0
        public SerializablePhaseCollection GetPhasesFromModel()
        {
            var phasesFromModel = new SerializablePhaseCollection();
            var phases          = new Model().GetPhases();

            foreach (Phase phase in phases)
            {
                var serializablePhase = new SerializablePhase(phase);
                phasesFromModel.Add(serializablePhase);
            }
            phasesFromModel.Sort();
            return(phasesFromModel);
        }
예제 #2
0
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }
            else
            {
                SerializablePhase phase = obj as SerializablePhase;

                if (this.Number <= phase.Number)
                {
                    return(-1);
                }
                else
                {
                    return(1);
                }
            }
        }
예제 #3
0
 public void Add(SerializablePhase serializablePhase) => this.List.Add(serializablePhase);