Example #1
0
        private void showRecomList()
        {
            DateTime dt = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0);
            TimeSpan ts = new TimeSpan(1, 0, 0, 0);

            for (int i = 0; i < 20; i++)
            {
                string quest = RecommendQuestCalculator.recommandQuest(dt);
                Console.WriteLine("{0}:{1}", dt.ToString("yyyy/MM/dd"), quest);
                dt += ts;
            }
        }
Example #2
0
        private void setANEInotify()
        {
            TimeSpan ts60 = new TimeSpan(1, 0, 0);

            //DateTime nowDT = DateTime.Now;
            (int day, DateTime time) = RecommendQuestCalculator.nextnextQuest("暗影渦巻く壊れた世界", DateTime.Now);

            if (day == 1 && (DateTime.Now > new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 0, 0)))
            {
                DateTime fixDT = DateTime.Now + new TimeSpan(1, 0, 0, 0);
                (day, time) = RecommendQuestCalculator.nextnextQuest("暗影渦巻く壊れた世界", fixDT);
            }

            time = time - ts60;

            notifyANEI = time;
        }
Example #3
0
        /// <summary>
        /// 引数の時刻のおすすめクエストを投稿
        /// </summary>
        /// <param name="time"></param>
        public void postRecommendQuest(DateTime time)
        {
            string quest_name = RecommendQuestCalculator.recommandQuest(time);

            if (quest_name == "暗影渦巻く壊れた世界")
            {
                string postStr = ANEI_POST(time);
                ServiceClient.sendMessage(postStr);
            }
            else
            {
                (int day, DateTime nextday) = RecommendQuestCalculator.nextQuest("暗影渦巻く壊れた世界", time);
                string postStr = string.Format("今日のおすすめクエストは{0}です。次の暗影は{1}です。",
                                               quest_name,
                                               nextday.ToString("MM月dd日"));
                ServiceClient.sendMessage(postStr);
            }
        }