コード例 #1
0
ファイル: Class.cs プロジェクト: Amit-B/alarm
        public List <XmlNode> GetLastItems(Notification.NotificationTypes gettype, int count)
        {
            List <XmlNode> returnedList = new List <XmlNode>();

            for (int i = 0; i < count; i++)
            {
                if (gettype == Notification.NotificationTypes.Any || ConvertToNotification(items[i]).type == gettype)
                {
                    returnedList.Add(items[i]);
                }
            }
            return(returnedList);
        }
コード例 #2
0
ファイル: Class.cs プロジェクト: Amit-B/alarm
        public static int NumOfNotType(Notification.NotificationTypes type)
        {
            switch (type)
            {
            case Notification.NotificationTypes.Alarm: return(1);

            case Notification.NotificationTypes.Emergency: return(2);

            case Notification.NotificationTypes.Security: return(3);

            case Notification.NotificationTypes.Any: return(4);

            default: return(0);
            }
        }
コード例 #3
0
 public void Log(string message, Notification.NotificationTypes notificationType)
 {
     Log(new Notification(message, notificationType));
 }