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.Administrator )
			{
				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 );
		}
Exemplo n.º 2
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." );
		}
		public static string CreateComments( TrackerEntry entry )
		{
			StringBuilder sb = new StringBuilder();

			sb.Append( "<center>Comments<br>----------------------------------------------------------------------------</center>" );

			List<CommentEntry> entries = entry.Comments;

			if ( entries == null )
				entries = new List<CommentEntry>();

			for ( int i = 0; i < entries.Count; i++ )
			{
				CommentEntry c = entries[i];
				if ( c != null )
					sb.AppendFormat( "Comment by: {0} - {1} {2}<br><br>{3}<center><br>----------------------------------------------------------------------------<br></center>",
						c.Submitter, c.Created.ToShortDateString(), c.Created.ToShortTimeString(), c.Comment );
			}

			return sb.ToString();
		}
Exemplo n.º 4
0
		public static void AddIssue( TrackerEntry entry )
		{
			m_Instance.m_AllIssues[entry.IssueID] = entry;
		}
Exemplo n.º 5
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			if ( version >= 0 )
			{
				int count = reader.ReadInt();

				m_AllIssues = new Dictionary<int, TrackerEntry>( count );
				for ( int i = 0; i < count; i++ )
				{
					TrackerEntry entry = new TrackerEntry( reader );
					m_AllIssues[entry.IssueID] = entry;
				}
			}
		}