コード例 #1
0
ファイル: ActionStack.cs プロジェクト: KanColleSoftFan/KKLBot
 public static void AddAction(StackAction act)
 {
     try
     {
         actionList.Add(act);
         actionList.Sort((x,y)=>x.ExecuteDate.CompareTo(y.ExecuteDate));
         LogWriter.WriteLogSucces(string.Format("Action {0} added to stack. Time of execution: {1}", act.GetType(), act.ExecuteDate.ToString("hh:mm:ss")));
     }
     catch(Exception ex)
     {
         LogWriter.WriteLogOnException(ex);
         AddAction(act);
     }
 }
コード例 #2
0
ファイル: ActionStack.cs プロジェクト: KanColleSoftFan/KKLBot
 static void RemoveAction(StackAction act)
 {
     if (actionList.Remove(act)==false)
        throw new Exception("Cant remove action from stack after execurion");
 }