コード例 #1
0
 internal TokenTimeRange(int position, TimeRangeKeywordsType range)
     : base(position)
 {
     index = 0;
     timeRangeType = TimeRangeType.DEFAULT;
     timeRange = range;
 }
コード例 #2
0
 internal TokenTimeRange(int position, int val, TimeRangeType type)
     : base(position)
 {
     index = val;
     timeRangeType = type;
     timeRange = TimeRangeKeywordsType.NONE;
     Logger.Info("Created an time range token object", "TokenTimeRange::TokenTimeRange");
 }
コード例 #3
0
 /// <summary>
 /// Checks if a time range crosses the day boundary and returns a boolean indicating whether it does.
 /// </summary>
 /// <param name="timeRangeKeyword"></param>
 /// <returns>True if positive; false if otherwise</returns>
 public static bool IsTimeRangeOverDayBoundary(TimeRangeKeywordsType timeRangeKeyword)
 {
     int timeRangeStartHour, timeRangeEndHour;
     timeRangeKeywordsStartTime.TryGetValue(timeRangeKeyword, out timeRangeStartHour);
     timeRangeKeywordsEndTime.TryGetValue(timeRangeKeyword, out timeRangeEndHour);
     if (timeRangeEndHour <= timeRangeStartHour)
     {
         return true;
     }
     return false;
 }
コード例 #4
0
 /// <summary>
 /// Resets enums to their default values.
 /// </summary>
 /// <returns>Nothing.</returns>
 private void ResetEnumerations()
 {
     commandType = CommandType.INVALID;
     currentMode = ContextType.STARTTIME;
     currentSpecifier = ContextType.CURRENT;
     sortType = SortType.DEFAULT;
     searchType = SearchType.NONE;
     timeRangeType = TimeRangeType.DEFAULT;
     timeRangeOne = TimeRangeKeywordsType.NONE;
     timeRangeTwo = TimeRangeKeywordsType.NONE;
 }
コード例 #5
0
        /// <summary>
        /// Initializes the generator's configuration to it's default values.
        /// </summary>
        /// <returns></returns>
        public void InitializeNewConfiguration()
        {
            commandType = new CommandType();
            isSpecific = new DateTimeSpecificity();
            timeRangeType = new TimeRangeType();
            timeRangeOne = new TimeRangeKeywordsType();
            timeRangeTwo = new TimeRangeKeywordsType();
            sortType = new SortType();
            searchType = new SearchType();
            taskName = null;
            taskRangeIndex = null;
            timeRangeIndex = 0;
            rangeIsAll = false;
            startDateTime = null; endDateTime = null;
            startTimeOnly = null; endTimeOnly = null;
            startDateOnly = null; endDateOnly = null;
            startDayOfWeekSet = false; endDayOfWeekSet = false;
            currentSpecifier = new ContextType();
            currentMode = new ContextType();
            crossDayBoundary = false;

            ResetEnumerations();
        }
コード例 #6
0
ファイル: Settings.cs プロジェクト: RavenXce/ToDo_PlusPlus
 /// <summary>
 /// Set the Default Time Range of Morning,Afternoon,Evening and Night
 /// </summary>
 /// <param name="timeRange">Set type of TimeRange</param>
 /// <param name="startTime">Set Starting Time</param>
 /// <param name="endTime">Set Ending Time</param>
 public void SetTimeRange(TimeRangeKeywordsType timeRange, int startTime, int endTime)
 {
     settingInfo.userTimeRangeKeywordsStartTime[timeRange] = startTime;
     settingInfo.userTimeRangeKeywordsEndTime[timeRange] = endTime;
     EventHandlers.UpdateSettings(settingInfo);
 }
コード例 #7
0
ファイル: Settings.cs プロジェクト: RavenXce/ToDo_PlusPlus
 public int GetStartTime(TimeRangeKeywordsType timeRange)
 {
     return settingInfo.userTimeRangeKeywordsStartTime[timeRange];
 }
コード例 #8
0
        private void timeRangeKeywordTree_AfterSelect(object sender, TreeViewEventArgs e)
        {
            this.commandTree.SelectedNode = null;
            this.contextTree.SelectedNode = null;
            this.timeRangeTree.SelectedNode = null;
            this.rangeController.Enabled = true;
            schedPostponePanel.Hide();

            this.commandTree.SelectedNode = null;
            this.selectedType = SelectedType.TimeRangeKeywordsSelected;
            string selected = timeRangeKeywordTree.SelectedNode.Text;
            this.selectedTimeRangeKeywordType = ConvertStringToTimeRangeKeyword(selected);

            UpdateFlexiCommandList();
            UpdateDescription();
            UpdateTimeRangeUI();
        }