Пример #1
0
        /**
         * Get the HourMinuteAMPM object determined by what user has entered for
         * end time.
         *
         *@access   Public
         *@return   HourMinuteAMPM
         */

        public HourMinuteAMPM endHM()
        {
            String         hourDum   = this.endHourNumericUpDown.Value.ToString();
            String         minuteDum = String.Format("{0:00}", this.endMinuteNumericUpDown.Value);
            String         ampmDum   = this.endAMPMComboBox.Text;
            HourMinuteAMPM returnVal = new HourMinuteAMPM(hourDum + ":" + minuteDum + " " + ampmDum);

            return(returnVal);
        }
Пример #2
0
        /**
         * "Ok" action-- Add all times between start and end times of the
         * specified interval, then close the window.
         *
         *@access   Public.
         */

        public void addTimes()
        {
            HourMinuteAMPM startDum = this.startHM();
            HourMinuteAMPM endDum   = this.endHM();
            int            interval = (int)this.intervalNumericUpDown.Value;

            this.mainWin.populateTimesListBoxIntervals(startDum, endDum, interval);
            startDum = null;
            endDum   = null;
            this.Close();
        }
Пример #3
0
        /**
         * Populate timesListBox with multiple values within an interval based
         * on a subinterval value.
         *
         *@access   Public
         *@param    HourMinuteAMPM  startTime
         *@param    HourMinuteAMPM  endTime
         *@param    int             intervalMinutes
         */

        public void populateTimesListBoxIntervals(HourMinuteAMPM startTime, HourMinuteAMPM endTime, int intervalMinutes)
        {
            HourMinuteAMPM dumTimeHM;
            int            startTimeInt = startTime.getTimeInt();
            int            endTimeInt   = endTime.getTimeInt();

            for (int timeInd = startTimeInt; timeInd <= endTimeInt; timeInd += intervalMinutes)
            {
                dumTimeHM = new HourMinuteAMPM(timeInd);
                this.addTimeRaw(dumTimeHM.getTime());
                dumTimeHM = null;
            }
        }