Example #1
0
        /// <summary>
        /// Creates a new Period.
        /// </summary>
        /// <param name="s"></param>
        public PeriodEditor(AddPeriodListener l, Day s, bool updatedDay)
        {
            InitializeComponent();
            this.l = l;
            this.baseSched = s;

            p = new Period();

            setupGroups();

            if (!updatedDay)
                noteText.Visible = updatedDay;
        }
Example #2
0
        public static Period newFromParse(ParseObject period)
        {
            Period p = new Period();

            p.periodShort = (string)period["short"];
            p.periodName = (string)period["name"];
            p.startH = (int)period["startHr"];
            p.startM = (int)period["startMin"];
            p.endH = (int)period["endHr"];
            p.endM = (int)period["endMin"];
            p.groupN = (int)period["groupN"];
            p.note = (string)period["note"];

            return p;
        }
Example #3
0
        void AddPeriodListener.periodAdded(Period p, List<String> groups)
        {
            Console.WriteLine("Period added.");

            // Add period
            schedDay.mPeriods.Add(p);
            periodsList.Items.Add(p.ToString());
            // Groups
            schedDay.setGroups(groups);
            refreshGroups();
        }