コード例 #1
0
ファイル: ReferralRewardsGump.cs プロジェクト: rokann/JustUO
		public ReferralRewardDescriptionGump(ReferralRewardItems r) : base(610, 30)
		{
			AddBackground(0, 0, 200, 400, 0x2436);
			AddHtml(20, 20, 160, 50, String.Format("<basefont color=cyan><center><Big><B>{0}", r.Name), false, false);
			AddLabel(38, 60, 32, String.Format("Cost: {0} {1}", r.Cost, (r.Cost != 1 ? "Referral Points" : "Referral Point")));
			// display the item's image
			if (r.ItemID > 0)
			{
				AddItem(80, 90, r.ItemID, r.Hue);
			}

			AddHtml(20, 125, 160, 245, String.Format("<basefont color=white><center>{0}", r.Description), false, false);
		}
コード例 #2
0
ファイル: ReferralRewardsGump.cs プロジェクト: rokann/JustUO
		// This will log the purchase to a text file.
		public static void LogPurchase(ReferralRewardItems r, Mobile from, NetState state, bool received)
		{
			try
			{
				using (StreamWriter sw = new StreamWriter("ReferralRewards.log", true))
				{
					sw.WriteLine("{0} [{1} {2}] \"{3}\" buys \"{4}\" for {5}EC.{6}", DateTime.Now.ToString("MM/dd/yyyy hh:mm:sstt"),
						state, @from.Account, @from.RawName, r.Name, r.Cost, (received ? "" : " ***ERROR: Not Received***"));
				}
			}
			catch
			{
			}
		}