Exemplo n.º 1
0
		public CharacterControlGump( Account first, Account second, string ErrorMessage, SwapInfo s ) : base( 50, 50 )
		{
			Closable=true;
			Disposable=false;
			Dragable=true;
			Resizable=false;

			a1=first;
			a2=second;
			swap = s;

			AddPage(0);

			#region Gump Prettification
			AddBackground(16, 12, 350, 450, 9270);

			AddImage(190, 22, 9273);
			AddImage(128, 385, 9271);
			AddImage(180, 22, 9275);
			AddImage(190, 100, 9273);
			AddImage(180, 100, 9275);
			AddImage(233, 385, 9271);
			AddImage(26, 385, 9271);

			AddAlphaRegion(15, 10, 352, 454);


			#endregion

			if( !InSwapMode )
			{
				AddButton(176, 49, 4023, 4025, 1, GumpButtonType.Reply, 0); //Okay for acct names button

				AddHtml( 30, 395, 325, 56,  Color( Center( ErrorMessage ), 0xFF0000 ) , false, false);


				AddImageTiled( 33, 50, 140, 20, 0xBBC );
				AddImageTiled( 209, 50, 140, 20, 0xBBC );

				AddTextEntry(33, 50, 140, 20, 1152, 2, "");
				AddTextEntry(209, 50, 140, 20, 1152, 3, "");
			}

			AddLabel(58, 28, 1152, (first == null) ? "1st Acct Name" : first.ToString() );
			AddLabel(232, 28, 1152, (second == null) ? "2nd Acct Name" : second.ToString());

			#region Create Character Buttons
			int x = 50; //x is 225 for 2nd...

			for( int h = 0; h < 2; h++ )
			{
				if( first != null )
				{
					int y = 87;
					for( int i = 0; i < 6; i++ )	//6 because of 6th char slot and we can handle nulls & out of bounds fine
					{
						Mobile m = first[i];

						if( m == null ) continue;

						if( !(InSwapMode && swap.AlreadyChose( first )) )
							AddButton( x-20, y+3, 5601, 5605, 10*i + h*100 + 5, GumpButtonType.Reply, 0);	//The Swap Select button

						AddLabel( x, y, 1152, String.Format( "{0} (0x{1:X})", m.Name, m.Serial.Value ) );

						int labelY = y+23;
						int buttonY = y+27;

						AddLabel( x+1, labelY, 1152, "Swap" );

						if( second != null && !InSwapMode  && HasSpace( second ) != 0 )
							AddButton( x-15, buttonY, 11400, 11402, 10*i + h*100 + 6, GumpButtonType.Reply, 0 );
						else
							AddImage( x-15, buttonY, 11412 );


						AddLabel( x+54, labelY, 1152, "Del" );
						if( !InSwapMode )
							AddButton( x+36, buttonY, 11400, 11402, 10*i + h*100 + 7, GumpButtonType.Reply, 0 );
						else
							AddImage( x+36, buttonY, 11412 );


						AddLabel( x+95, labelY, 1152, "Move");

						if( !InSwapMode && second != null && HasSpace( second ) >=0 )
							AddButton( x+78, buttonY, 11400, 11402, 10*i + h*100 + 8, GumpButtonType.Reply, 0 );
						else
							AddImage( x+78, buttonY, 11412 );

						y += 48;
					}
				}

				x+=175;

				Account temp = first;
				first = second;
				second = temp;
			}
			#endregion
		}
Exemplo n.º 2
0
		private void EmailCleanupWarning(Account a)
		{
			try
			{	// only on the production shard
				if (TestCenter.Enabled == false)
					if (a.EmailAddress != null && SmtpDirect.CheckEmailAddy(a.EmailAddress, false) == true)
					{
						string subject = "Angel Island: Your account will be deleted in about 5 days";
						string body = String.Format("\nThis message is to inform you that your account '{0}' will be deleted on {1} if it remains unused.\n\nIf you decide not to return to Angel Island, we would like wish you well and thank you for playing our shard.\n\nBest Regards,\n  The Angel Island Team\n\n", a.ToString(), DateTime.Now + TimeSpan.FromDays(5));
						Emailer mail = new Emailer();
						mail.SendEmail(a.EmailAddress, subject, body, false);
					}
			}
			catch (Exception ex)
			{
				LogHelper.LogException(ex);
			}
		}