public ViewTrackerEntryGump(Mobile from, TrackerEntry entry, int page)
            : base(50, 50)
        {
            TrackerSystem.CloseGumps(from);

            m_Page  = page;
            m_Entry = entry;

            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;

            AddPage(0);

            AddBackground(0, 0, 600, 600, 9200);

            int x = 10;
            int y = 10;

            // add html area
            AddHtml(x, y, 285, 75, String.Format("<BASEFONT COLOR={0}>Created By: {1}<BR>Added On: {2}<BR>Last Updated: {3}</BASEFONT>", HeaderColor, entry.Submitter, entry.CreationTime.ToShortDateString(), entry.LastUpdatedTime.ToShortDateString()), false, false);
            AddHtml(x + 195, y, 285, 75, String.Format("<BASEFONT COLOR={0}>Assigned To: {1}<BR>Status: {2}<BR>Priority: {3}</BASEFONT>", HeaderColor, entry.AssignedTo.Name, entry.Status.ToString(), entry.Priority.ToString()), false, false);

            y += 70;

            AddHtml(x, y, 580, 200, entry.Message, true, true);               // Message

            y += 205;

            AddHtml(x, y, 580, 275, CreateComments(entry), true, true);                 // Comments

            y += 285;
            x += 5;
            AddLabel(x, y, Hue, @"Add Comment");
            x += 85;
            AddButton(x, y, 4029, 4030, 1, GumpButtonType.Reply, 0);

            if (from.AccessLevel >= AccessLevel.GameMaster)
            {
                x += 60;
                AddLabel(x, y, Hue, @"Assign");
                x += 40;
                AddButton(x, y, 4026, 4027, 2, GumpButtonType.Reply, 0);

                x += 35;
                AddLabel(x, y, Hue, @"Status");
                x += 45;
                AddButton(x, y, 4026, 4027, 3, GumpButtonType.Reply, 0);

                x += 35;
                AddLabel(x, y, Hue, @"Priority");
                x += 50;
                AddButton(x, y, 4026, 4027, 4, GumpButtonType.Reply, 0);
            }

            AddLabel(490, y, Hue, @"Main Menu");
            AddButton(555, y, 4011, 4012, 1000, GumpButtonType.Reply, 0);
        }
        public TrackerTemplateGump(Mobile from, int page)
            : base(50, 50)
        {
            TrackerSystem.CloseGumps(from);

            Closable   = true;
            Dragable   = true;
            Disposable = true;
            Resizable  = false;

            m_Entries = TrackerEntries;
            m_Entries.Sort();

            Initialize(page);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        public AddCommentGump(Mobile from, TrackerEntry entry, int page)
            : base(30, 20)
        {
            TrackerSystem.CloseGumps(from);

            m_Page  = page;
            m_Entry = entry;

            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;

            AddPage(0);
            AddBackground(6, 22, 423, 171, 9200);
            AddAlphaRegion(17, 48, 399, 114);
            AddTextEntry(21, 52, 394, 108, 254, 0, "");
            AddButton(383, 166, 4014, 4015, 1, GumpButtonType.Reply, 0);
            AddLabel(18, 26, 254, "Please fill out the box below.");
        }
Esempio n. 6
0
        public AddIssueGump(Mobile from, int page)
            : base(20, 20)
        {
            m_Page = page;

            TrackerSystem.CloseGumps(from);

            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;

            AddPage(0);
            AddBackground(12, 63, 493, 277, 9200);
            AddLabel(18, 68, 254, "Please make sure the issue isnt already listed in [viewissues before you create");
            AddLabel(15, 83, 254, " a new issue entry.");
            AddLabel(20, 109, 254, "Title");
            AddAlphaRegion(20, 133, 471, 20);
            AddTextEntry(20, 133, 471, 20, 254, 0, "");
            AddLabel(20, 157, 254, "Description");
            AddAlphaRegion(20, 178, 469, 129);
            AddTextEntry(20, 178, 469, 129, 254, 1, "");
            AddButton(427, 310, 247, 248, 3, GumpButtonType.Reply, 0);
        }