Beispiel #1
0
 private void ShowBanItems(BanVM ban)
 {
     if (ban == null)
     {
         MessageBox.Show("無", "封鎖列表");
     }
     else
     {
         MessageBox.Show(ban.Content, "封鎖列表");
     }
 }
Beispiel #2
0
 public TodoList(int startTime, int endTime, BanVM ban, string tip)
 {
     Keys      = new List <string>();
     Procs     = new List <string>();
     StartTime = DateTime.Today.AddHours(startTime);
     EndTime   = DateTime.Today.AddHours(endTime);
     if (ban != null)
     {
         if (ban.Content != null || ban.Content != "")
         {
             string[] str = ban.Content.Split(';');
             if (str[0] != null || str[0] != "")
             {
                 string[] keyArr = str[0].Split(',');
                 for (int i = 0; i < keyArr.Length; i++)
                 {
                     Keys.Add(keyArr[i].ToLower());
                 }
             }
             if (str[1] != null || str[1] != "")
             {
                 string[] procArr = str[1].Split(',');
                 for (int i = 0; i < procArr.Length; i++)
                 {
                     // 去附檔名
                     int index = procArr[i].IndexOf('.');
                     if (index != -1)
                     {
                         string s = procArr[i].Remove(index);
                         Procs.Add(s.ToLower());
                     }
                 }
             }
         }
     }
     Tip = tip;
 }