Example #1
0
        /// <summary>
        /// BOT初期化
        /// * 設定読み込み
        /// * タイマー設定
        /// </summary>
        /// <param name="output">ログ出力先</param>
        public KamatteBot(logOutput output = null)
        {
            LogOutput = output;

            Settings = Properties.Settings.Default.Kamatte;
            if (Settings == null)
            {
                Settings = new KamatteSettings();
                Settings.WaitTime = 5;
                Settings.GlobalFilter = "";
                Settings.Targets = new List<TargetUser>();
                var t = new TargetUser();
                t.Id = 0;
                t.Name = "null";
                t.Filter = "*";
                Settings.Targets.Add(t);
            }
            Log(Settings.ToString());

            watchingList = new DictionaryQueue<decimal, TwitterStatus>();

            /* Set timer */
            countClearTimer = TimerUtil.DailyTimer(CountClearTask);
        }
Example #2
0
 /// <summary>
 /// 設定ファイルをリロードする
 /// </summary>
 public void ReloadSetting()
 {
     Log("Settings reloading...");
     Properties.Settings.Default.Reload();
     Settings = Properties.Settings.Default.Kamatte;
     Log(Settings.ToString());
 }