コード例 #1
0
 private CEvent CreateCommentEvent(string userName, string comment)
 {
     // Create the Fix event.
     CEvent de = new CEvent();
     de.name = "Comment";
     de.user = userName;
     de.date = DateTime.Now;
     de.notes = comment;
     return de;
 }
コード例 #2
0
 private CEvent CreateReopenEvent(string userName)
 {
     // Create the Fix event.
     CEvent de = new CEvent();
     de.name = "Re-Open";
     de.resultingstate = "Open";
     de.user = userName;
     de.date = DateTime.Now;
     de.notes = "";
     return de;
 }
コード例 #3
0
        private void AppendEvent(CDefect def, CEvent de)
        {
            // Add the event to defect's eventlist.
            if (def.eventlist == null || def.eventlist.Length == 0)
            {  // No events, so we can just create a new list.
                def.eventlist = new CEvent[1];
                def.eventlist[0] = de;
            }
            else
            {  // Append new event to end of existing list.
                ArrayList list = new ArrayList();
                for (int i = 0; i < def.eventlist.Length; ++i)
                    list.Add(def.eventlist[i]);

                // add new event to list
                list.Add(de);

                def.eventlist = new CEvent[def.eventlist.Length + 1];

                for (int i = 0; i < list.Count; ++i)
                    def.eventlist[i] = (CEvent)list[i];
            }
        }