private static void OnCommand_RemoveIssue(CommandEventArgs e) { Mobile m = e.Mobile; if (m == null) { return; } if (!TrackerSystem.Enabled && m.AccessLevel == AccessLevel.Player) { m.SendMessage("The tracker is currently offline."); return; } if (e.Length == 1) { int id = e.GetInt32(0); TrackerEntry entry = TrackerPersistance.FindIssue(id); if (entry != null) { entry.Delete(); e.Mobile.SendMessage("The tracker entry has been removed."); } else { e.Mobile.SendMessage("There was no tracker entry by that id."); } } else { e.Mobile.SendMessage("Usage: [RemoveIssue <IssueID>"); } }
public TrackerPersistance(Serial serial) : base(serial) { m_AllIssues = new Dictionary <int, TrackerEntry>(); m_AllComments = new Dictionary <int, CommentEntry>(); m_Instance = this; }
public CommentEntry(TrackerEntry issue, string submitter, string comment) { m_Issue = issue; m_Submitter = submitter; m_Created = DateTime.UtcNow; m_Comment = comment; m_CommentID = TrackerPersistance.NewComment; TrackerPersistance.AddComment(this); }
public TrackerPersistance() : base(1) { m_AllIssues = new Dictionary <int, TrackerEntry>(); m_AllComments = new Dictionary <int, CommentEntry>(); Movable = false; if (m_Instance == null || m_Instance.Deleted) { m_Instance = this; } else { base.Delete(); } }
public TrackerEntry(string submitter, string subject, string message) { m_Submitter = submitter; m_Subject = subject; m_Message = message; m_IssueID = TrackerPersistance.NewIssue; m_CreationTime = DateTime.Now; m_LastUpdatedTime = m_CreationTime; m_AssignUser = TrackerSystem.FindUser(0); m_Status = TrackerStatus.New; m_Priority = TrackerPriority.None; m_Comments = new List <CommentEntry>(); TrackerPersistance.AddIssue(this); }
public TrackerEntry(GenericReader reader) { m_Comments = new List <CommentEntry>(); int version = reader.ReadInt(); switch (version) { case 0: { m_IssueID = reader.ReadInt(); m_Submitter = reader.ReadString(); m_CreationTime = reader.ReadDateTime(); m_LastUpdatedTime = reader.ReadDateTime(); m_AssignUser = TrackerSystem.FindUser(reader.ReadInt()); m_Message = reader.ReadString(); m_Subject = reader.ReadString(); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { CommentEntry e = new CommentEntry(this, reader); if (m_Comments == null) { m_Comments = new List <CommentEntry>(); } m_Comments.Add(e); } m_Status = TrackerStatus.Find(reader.ReadInt()); m_Priority = TrackerPriority.Find(reader.ReadInt()); break; } } TrackerPersistance.AddIssue(this); }
public CommentEntry(TrackerEntry issue, GenericReader reader) { m_Issue = issue; int version = reader.ReadInt(); switch (version) { case 0: { m_CommentID = reader.ReadInt(); m_Submitter = reader.ReadString(); m_Created = reader.ReadDateTime(); m_Comment = reader.ReadString(); break; } } TrackerPersistance.AddComment(this); }
public TrackerPersistance( Serial serial ) : base( serial ) { m_AllIssues = new Dictionary<int, TrackerEntry>(); m_AllComments = new Dictionary<int, CommentEntry>(); m_Instance = this; }
public TrackerPersistance() : base( 1 ) { m_AllIssues = new Dictionary<int, TrackerEntry>(); m_AllComments = new Dictionary<int, CommentEntry>(); Movable = false; if ( m_Instance == null || m_Instance.Deleted ) m_Instance = this; else base.Delete(); }