Server.Gumps.PlayerVendorOwnerGump.PlayerVendorOwnerGump C# (CSharp) Méthode

PlayerVendorOwnerGump() public méthode

public PlayerVendorOwnerGump ( PlayerVendor vendor ) : System
vendor Server.Mobiles.PlayerVendor
Résultat System
		public PlayerVendorOwnerGump( PlayerVendor vendor ) : base( 50, 200 )
		{
			m_Vendor = vendor;

			int perDay = m_Vendor.ChargePerDay;

			AddPage( 0 );
			AddBackground( 25, 10, 530, 140, 5054 );

			AddHtmlLocalized( 425, 25, 120, 20, 1019068, false, false ); // See goods
			AddButton( 390, 25, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 425, 48, 120, 20, 1019069, false, false ); // Customize
			AddButton( 390, 48, 4005, 4007, 2, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 425, 72, 120, 20, 1011012, false, false ); // CANCEL
			AddButton( 390, 71, 4005, 4007, 0, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 40, 72, 260, 20, 1038321, false, false ); // Gold held for you:
			AddLabel( 300, 72, 0, m_Vendor.HoldGold.ToString() );
			AddHtmlLocalized( 40, 96, 260, 20, 1038322, false, false ); // Gold held in my account:
			AddLabel( 300, 96, 0, m_Vendor.BankAccount.ToString() );

			//AddHtmlLocalized( 40, 120, 260, 20, 1038324, false, false ); // My charge per day is:
			// Localization has changed, we must use a string here
			AddHtml( 40, 120, 260, 20, "My charge per day is:", false, false );
			AddLabel( 300, 120, 0, perDay.ToString() );

			double days = (m_Vendor.HoldGold + m_Vendor.BankAccount) / ((double)perDay);

			AddHtmlLocalized( 40, 25, 260, 20, 1038318, false, false ); // Amount of days I can work: 
			AddLabel( 300, 25, 0, ((int)days).ToString() );
			AddHtmlLocalized( 40, 48, 260, 20, 1038319, false, false ); // Earth days: 
			AddLabel( 300, 48, 0, ((int)(days / 12.0)).ToString() );
		}