Example #1
0
        static bool EnumEvents(TreeNode node)
        {
            if (node == null)
            {
                return(true);
            }
            if (node.Left != null)
            {
                if (!EnumEvents(node.Left))
                {
                    return(false);
                }
            }
            LoginEvent e = node.Data as LoginEvent;

            if (e.eventTime > now)
            {
                return(false);
            }
            TreeNode right = node.Right;

            RemoveEvent(e);
            e.FireEvent();
            if (right != null)
            {
                return(EnumEvents(right));
            }
            return(false);
        }
Example #2
0
 public static void AddEvent(LoginEvent e)
 {
     if (e.Node != null)
     {
         return;
     }
     m_numEvents++;
     e.Node = m_tree.AddData(e);
 }
Example #3
0
 public static void RemoveEvent(LoginEvent e)
 {
     if (e.Node == null)
     {
         return;
     }
     m_numEvents--;
     m_tree.RemoveNode(e.Node);
     e.Node = null;
 }