當前位置: 首頁>>代碼示例>>C#>>正文


C# Mobile.CloseGump方法代碼示例

本文整理匯總了C#中Server.Mobile.CloseGump方法的典型用法代碼示例。如果您正苦於以下問題:C# Mobile.CloseGump方法的具體用法?C# Mobile.CloseGump怎麽用?C# Mobile.CloseGump使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Mobile的用法示例。


在下文中一共展示了Mobile.CloseGump方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: RewardConfirmGump

        public RewardConfirmGump( Mobile from, RewardEntry entry )
            : base(0, 0)
        {
            m_From = from;
            m_Entry = entry;

            from.CloseGump( typeof( RewardConfirmGump ) );

            AddPage( 0 );

            AddBackground( 10, 10, 500, 300, 2600 );

            AddHtmlLocalized( 30, 55, 300, 35, 1006000, false, false ); // You have selected:

            if ( entry.NameString != null )
                AddHtml( 335, 55, 150, 35, entry.NameString, false, false );
            else
                AddHtmlLocalized( 335, 55, 150, 35, entry.Name, false, false );

            AddHtmlLocalized( 30, 95, 300, 35, 1006001, false, false ); // This will be assigned to this character:
            AddLabel( 335, 95, 0, from.Name );

            AddHtmlLocalized( 35, 160, 450, 90, 1006002, true, true ); // Are you sure you wish to select this reward for this character?  You will not be able to transfer this reward to another character on another shard.  Click 'ok' below to confirm your selection or 'cancel' to go back to the selection screen.

            AddButton( 60, 265, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 95, 266, 150, 35, 1006044, false, false ); // Ok

            AddButton( 295, 265, 4017, 4019, 0, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 330, 266, 150, 35, 1006045, false, false ); // Cancel
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:30,代碼來源:RewardConfirmGump.cs

示例2: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{	
			if ( from.InRange( GetWorldLocation(), 2 ) )
			{
				if ( BlueMageControl.IsBlueMage( from ) )
				{
					if ( from.HasGump( typeof( BlueQuitGump ) ) )
						from.CloseGump( typeof( BlueQuitGump ) );

					from.SendGump( new BlueQuitGump( from ) );
				}
				else
				{
					if ( from.AccessLevel == AccessLevel.Player )
						from.SendMessage( "Please speak to Ben in New Haven" );
					else
					{
						if ( from.HasGump( typeof( BlueAcceptGump ) ) )
							from.CloseGump( typeof( BlueAcceptGump ) );
						
						from.SendGump( new BlueAcceptGump( from ) );
					}
				}
			}

		}
開發者ID:greeduomacro,項目名稱:cov-shard-svn-1,代碼行數:26,代碼來源:BlueJoinStone.cs

示例3: Close

        public static void Close( Mobile m, bool closeAll )
        {
            m.CloseGump( typeof( ChatGumpDisplay ) );

            if( closeAll )
                m.CloseGump( typeof( ChatGumpEntry ) );
        }
開發者ID:ITLongwell,項目名稱:Ulmeta,代碼行數:7,代碼來源:ChatGump.cs

示例4: HousePlacementCategoryGump

        public HousePlacementCategoryGump( Mobile from )
            : base(50, 50)
        {
            m_From = from;

            from.CloseGump( typeof( HousePlacementCategoryGump ) );
            from.CloseGump( typeof( HousePlacementListGump ) );

            AddPage( 0 );

            AddBackground( 0, 0, 270, 145, 5054 );

            AddImageTiled( 10, 10, 250, 125, 2624 );
            AddAlphaRegion( 10, 10, 250, 125 );

            AddHtmlLocalized( 10, 10, 250, 20, 1060239, LabelColor, false, false ); // <CENTER>HOUSE PLACEMENT TOOL</CENTER>

            AddButton( 10, 110, 4017, 4019, 0, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 45, 110, 150, 20, 3000363, LabelColor, false, false ); // Close

            AddButton( 10, 40, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 45, 40, 200, 20, 1060390, LabelColor, false, false ); // Classic Houses

            AddButton( 10, 60, 4005, 4007, 2, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 45, 60, 200, 20, 1060391, LabelColor, false, false ); // 2-Story Customizable Houses

            AddButton( 10, 80, 4005, 4007, 3, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 45, 80, 200, 20, 1060392, LabelColor, false, false ); // 3-Story Customizable Houses
        }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:29,代碼來源:HousePlacementTool.cs

示例5: HairstylistBuyGump

		public HairstylistBuyGump( Mobile from, Mobile mercenary ) : base( 50, 50 )
		{
			m_From = from;
			m_Merc = mercenary;

			from.CloseGump( typeof( Xanthos.Evo.HairstylistBuyGump ) );
			from.CloseGump( typeof( ChangeHairHueGump ) );
			from.CloseGump( typeof( ChangeHairstyleGump ) );

			bool isFemale = ( m_Merc.Female || m_Merc.Body.IsFemale );

			int rows = 0;
			for ( int i = 0; i < m_SellList.Length; ++i )
			{
				if ( m_SellList[i].Layer != Layer.FacialHair || !isFemale )
					++rows;
			}

			AddPage( 0 );
			AddBackground( 50, 10, 450, 100 + (rows * 25), 2600 );
			AddHtmlLocalized( 100, 40, 350, 20, 1018356, false, false ); // Choose your hairstyle change:

			for ( int i = 0, index = 0; i < m_SellList.Length; ++i )
			{
				if ( m_SellList[i].Layer != Layer.FacialHair || !isFemale )
				{
					AddHtml( 140, 75 + (index * 25), 300, 20, m_SellList[i].TitleString, false, false );
					AddButton( 100, 75 + (index++ * 25), 4005, 4007, 1 + i, GumpButtonType.Reply, 0 );
				}
			}
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:31,代碼來源:MercenaryGumps.cs

示例6: AddStashColumnGump

		//constructor
		public AddStashColumnGump( Mobile owner, StashEntry stashentry ) : base( 500, 20 )
		{
			_StashEntry = stashentry;
			
			_Owner = owner;
			
			//clear old gumps that are up
			_Owner.CloseGump( typeof( AddStashColumnGump ) );
			
			//set up the page
			AddPage(0);
            
			//determine page layout, sizes, and what gets displayed where
			DeterminePageLayout();

			//add the background			            
            AddBackground(0, 0, _Width, _Height, 9270);
            AddImageTiled(11, 10, _Width - 23, _Height - 20, 2624);
            AddAlphaRegion(11, 10, _Width - 22, _Height - 20);
            
            AddTitle();
            
            //if there was a problem when adding the property listing
            if( !AddColumnEntries() )
            {
	            //clear old gumps that are up
				_Owner.CloseGump( typeof( AddStashColumnGump ) );
	            return;
            }
		}
開發者ID:Tukaramdas,項目名稱:ServUO-EC-Test-Fork,代碼行數:31,代碼來源:AddStashColumnGump.cs

示例7: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			Map map = from.Map;

			if ( map == null || map == Map.Internal )
				return;

			if ( from.AccessLevel >= AccessLevel.GameMaster )
			{
				from.CloseGump( typeof( HolidayTreeAddonChoiceGump ) );
				from.SendGump( new HolidayTreeAddonChoiceGump( from, this ) );
			}
			else
			{

				if ( !IsChildOf( from.Backpack ) )
					from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
				else if ( !from.InRange( this.GetWorldLocation(), 1 ) )
					from.SendLocalizedMessage( 500446 ); // That is too far away.
				else if ( DateTime.Now.Month != 12 )
					from.SendLocalizedMessage( 1005700 ); // You will have to wait till next December to put your tree back up for display.
				else
				{
					from.CloseGump( typeof( HolidayTreeAddonChoiceGump ) );
					from.SendGump( new HolidayTreeAddonChoiceGump( from, this ) );
				}
			}
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:28,代碼來源:HoldayTreeAddonDeed.cs

示例8: EventPrizeConfirmGump

        public EventPrizeConfirmGump(Mobile mobile, PrizeDefinition prizeDefinition) : base(110, 100)
        {
            m_prizeDefinition = prizeDefinition;

            mobile.CloseGump(typeof(EventPrizeConfirmGump));
            mobile.CloseGump(typeof(EventPrizeGump));

            Closable = true;

            AddPage(0);

            AddBackground(0, 0, 420, 280, 5054);

            AddImageTiled(10, 10, 400, 20, 2624);
            AddAlphaRegion(10, 10, 400, 20);

            AddHtml(10, 10, 400, 20, "<BASEFONT COLOR=#FFFF00><CENTER>Event Prize Confirmation</CENTER></BASEFONT>", false, false);

            AddImageTiled(10, 40, 400, 200, 2624);
            AddAlphaRegion(10, 40, 400, 200);

            AddHtml(10, 40, 400, 200, String.Format(ms_confirmationString,m_prizeDefinition.Name, m_prizeDefinition.PriceString), false, true);

            AddImageTiled(10, 250, 400, 20, 2624);
            AddAlphaRegion(10, 250, 400, 20);

            AddButton(10, 250, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddHtmlLocalized(40, 250, 170, 20, 1011036, 32767, false, false); // OKAY

            AddButton(210, 250, 4005, 4007, 0, GumpButtonType.Reply, 0);
            AddHtmlLocalized(240, 250, 170, 20, 1011012, 32767, false, false); // CANCEL
        }
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:32,代碼來源:PrizeGump.cs

示例9: RulesetGump

		public RulesetGump( Mobile from, Ruleset ruleset, RulesetLayout page, DuelContext duelContext, bool readOnly ) : base( readOnly ? 310 : 50, 50 )
		{
			m_From = from;
			m_Ruleset = ruleset;
			m_Page = page;
			m_DuelContext = duelContext;
			m_ReadOnly = readOnly;

			Dragable = !readOnly;

			from.CloseGump( typeof( RulesetGump ) );
			from.CloseGump( typeof( DuelContextGump ) );
			from.CloseGump( typeof( ParticipantGump ) );

			RulesetLayout depthCounter = page;
			int depth = 0;

			while ( depthCounter != null )
			{
				++depth;
				depthCounter = depthCounter.Parent;
			}

			int count = page.Children.Length + page.Options.Length;

			AddPage( 0 );

			int height = 35 + 10 + 2 + (count * 22) + 2 + 30;

			AddBackground( 0, 0, 260, height, 9250 );
			AddBackground( 10, 10, 240, height - 20, 0xDAC );

			AddHtml( 35, 25, 190, 20, Center( page.Title ), false, false );

			int x = 35;
			int y = 47;

			for ( int i = 0; i < page.Children.Length; ++i )
			{
				AddGoldenButton( x, y, 1 + i );
				AddHtml( x + 25, y, 250, 22, page.Children[i].Title, false, false );

				y += 22;
			}

			for ( int i = 0; i < page.Options.Length; ++i )
			{
				bool enabled = ruleset.Options[page.Offset + i];

				if ( readOnly )
					AddImage( x, y, enabled ? 0xD3 : 0xD2 );
				else
					AddCheck( x, y, 0xD2, 0xD3, enabled, i );

				AddHtml( x + 25, y, 250, 22, page.Options[i], false, false );

				y += 22;
			}
		}
開發者ID:jackuoll,項目名稱:Pre-AOS-RunUO,代碼行數:59,代碼來源:RulesetGump.cs

示例10: OnUse

		public static TimeSpan OnUse( Mobile m )
		{
			m.SendLocalizedMessage( 1011350 ); // What do you wish to track?

			m.CloseGump( typeof( TrackWhatGump ) );
			m.CloseGump( typeof( TrackWhoGump ) );
			m.SendGump( new TrackWhatGump( m ) );

			return TimeSpan.FromSeconds( 10.0 ); // 10 second delay before beign able to re-use a skill
		}
開發者ID:zerodowned,項目名稱:angelisland,代碼行數:10,代碼來源:Tracking.cs

示例11: SmallMobileBODAcceptGump

		public SmallMobileBODAcceptGump( Mobile from, SmallMobileBOD deed ) : base( 50, 50 )
		{
			m_From = from;
			m_Deed = deed;

			m_From.CloseGump( typeof( LargeBODAcceptGump ) );
			m_From.CloseGump( typeof( SmallMobileBODAcceptGump ) );

			AddPage( 0 );

			AddBackground( 25, 10, 430, 264, 5054 );

			AddImageTiled( 33, 20, 413, 245, 2624 );
			AddAlphaRegion( 33, 20, 413, 245 );

			AddImage( 20, 5, 10460 );
			AddImage( 430, 5, 10460 );
			AddImage( 20, 249, 10460 );
			AddImage( 430, 249, 10460 );

			AddHtmlLocalized( 190, 25, 120, 20, 1045133, 0x7FFF, false, false ); // A bulk order
			AddHtmlLocalized( 40, 48, 350, 20, 1045135, 0x7FFF, false, false ); // Ah!  Thanks for the goods!  Would you help me out?

			AddLabel( 40, 72, 1152, @"Amount to tame:"); // Amount to make:
			AddLabel( 250, 72, 1152, deed.AmountMax.ToString() );

			AddHtmlLocalized( 40, 96, 120, 20, 1045136, 0x7FFF, false, false ); // Item requested:
			AddItem( 385, 96, deed.Graphic );

			string s = deed.AnimalName;

			int capsbreak = s.IndexOfAny("ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray(),1);

			if( capsbreak > -1 )
			{
				string secondhalf = s.Substring( capsbreak );
 				string firsthalf = s.Substring(0, capsbreak );

				string newname = firsthalf + " " + secondhalf;

				AddLabel( 40, 120, 1152, newname.ToString() );
			}
			else
			{
				AddLabel( 40, 120, 1152, deed.AnimalName.ToString() );
			}

			AddHtmlLocalized( 40, 216, 350, 20, 1045139, 0x7FFF, false, false ); // Do you want to accept this order?

			AddButton( 100, 240, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 135, 240, 120, 20, 1006044, 0x7FFF, false, false ); // Ok

			AddButton( 275, 240, 4005, 4007, 0, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 310, 240, 120, 20, 1011012, 0x7FFF, false, false ); // CANCEL
		}
開發者ID:greeduomacro,項目名稱:cov-shard-svn-1,代碼行數:55,代碼來源:SmallMobileBODAcceptGump.cs

示例12: SmallMobileBODGump

		public SmallMobileBODGump( Mobile from, SmallMobileBOD deed ) : base( 25, 25 )
		{
			m_From = from;
			m_Deed = deed;

			m_From.CloseGump( typeof( LargeBODGump ) );
			m_From.CloseGump( typeof( SmallMobileBODGump ) );

			AddPage( 0 );

			AddBackground( 50, 10, 455, 260, 5054 );
			AddImageTiled( 58, 20, 438, 241, 2624 );
			AddAlphaRegion( 58, 20, 438, 241 );

			AddImage( 45, 5, 10460 );
			AddImage( 480, 5, 10460 );
			AddImage( 45, 245, 10460 );
			AddImage( 480, 245, 10460 );

			AddHtmlLocalized( 225, 25, 120, 20, 1045133, 0x7FFF, false, false ); // A bulk order

			AddLabel( 75, 48, 0x480, @"Amount to tame:"); // Amount to make:
			AddLabel( 275, 48, 1152, deed.AmountMax.ToString() );

			AddHtmlLocalized( 275, 76, 200, 20, 1045153, 0x7FFF, false, false ); // Amount finished:
			AddHtmlLocalized( 75, 72, 120, 20, 1045136, 0x7FFF, false, false ); // Item requested:

			AddItem( 410, 72, deed.Graphic );

			string s = deed.AnimalName;

			int capsbreak = s.IndexOfAny("ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray(),1);

			if( capsbreak > -1 )
			{
				string secondhalf = s.Substring( capsbreak );
 				string firsthalf = s.Substring(0, capsbreak );

				string newname = firsthalf + " " + secondhalf;

				AddLabel( 75, 96, 0x480, newname.ToString() );
			}
			else
			{
				AddLabel( 75, 96, 0x480, deed.AnimalName.ToString() );
			}
			AddLabel( 275, 96, 0x480, deed.AmountCur.ToString() );

			AddButton( 125, 192, 4005, 4007, 2, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 160, 192, 300, 20, 1045154, 0x7FFF, false, false ); // Combine this deed with the item requested.

			AddButton( 125, 216, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 160, 216, 120, 20, 1011441, 0x7FFF, false, false ); // EXIT
		}
開發者ID:greeduomacro,項目名稱:cov-shard-svn-1,代碼行數:54,代碼來源:SmallMobileBODGump.cs

示例13: OnDoubleClick

		public override void OnDoubleClick(Mobile from)
		{
			if(!IsChildOf(from.Backpack))
				from.SendLocalizedMessage(500325); // I am too far away to do that.
			else if(IsInPuzzleRoom(from))
			{
                from.CloseGump(typeof(PuzzleChest.PuzzleGump));
                from.CloseGump(typeof(PuzzleChest.StatusGump));
				from.CloseGump(typeof(MazePuzzleGump));
				from.SendGump(new MazePuzzleGump(from, this, m_Path, m_Progress));
			}
		}
開發者ID:Crome696,項目名稱:ServUO,代碼行數:12,代碼來源:MazePuzzleItem.cs

示例14: SmallBODAcceptGump

        public SmallBODAcceptGump( Mobile from, SmallBOD deed )
            : base(50, 50)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump( typeof( LargeBODAcceptGump ) );
            m_From.CloseGump( typeof( SmallBODAcceptGump ) );

            AddPage( 0 );

            AddBackground(25, 10, 430, 264, 9270);

            AddImageTiled( 33, 20, 413, 245, 2624 );
            AddAlphaRegion( 33, 20, 413, 245 );

            AddImage( 20, 5, 10460 );
            AddImage( 430, 5, 10460 );
            AddImage( 20, 249, 10460 );
            AddImage( 430, 249, 10460 );

            AddHtmlLocalized( 190, 25, 120, 20, 1045133, 0x7FFF, false, false ); // A bulk order
            AddHtmlLocalized( 40, 48, 350, 20, 1045135, 0x7FFF, false, false ); // Ah!  Thanks for the goods!  Would you help me out?

            AddHtmlLocalized( 40, 72, 210, 20, 1045138, 0x7FFF, false, false ); // Amount to make:
            AddLabel( 250, 72, 1152, deed.AmountMax.ToString() );

            AddHtmlLocalized( 40, 96, 120, 20, 1045136, 0x7FFF, false, false ); // Item requested:
            AddItem( 385, 96, deed.Graphic );
            AddHtmlLocalized( 40, 120, 210, 20, deed.Number, 0xFFFFFF, false, false );

            if ( deed.RequireExceptional || deed.Material != BulkMaterialType.None )
            {
                AddHtmlLocalized( 40, 144, 210, 20, 1045140, 0x7FFF, false, false ); // Special requirements to meet:

                if ( deed.RequireExceptional )
                    AddHtmlLocalized( 40, 168, 350, 20, 1045141, 0x7FFF, false, false ); // All items must be exceptional.

                if ( deed.Material != BulkMaterialType.None )
                    AddHtmlLocalized( 40, deed.RequireExceptional ? 192 : 168, 350, 20, GetMaterialNumberFor( deed.Material ), 0x7FFF, false, false ); // All items must be made with x material.
            }

            AddHtmlLocalized( 40, 216, 350, 20, 1045139, 0x7FFF, false, false ); // Do you want to accept this order?

            AddButton( 100, 240, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 135, 240, 120, 20, 1006044, 0x7FFF, false, false ); // Ok

            AddButton( 275, 240, 4005, 4007, 0, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 310, 240, 120, 20, 1011012, 0x7FFF, false, false ); // CANCEL
        }
開發者ID:greeduomacro,項目名稱:DimensionsNewAge,代碼行數:50,代碼來源:SmallBODAcceptGump.cs

示例15: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if (!IsChildOf(from.Backpack))
			{
				from.SendLocalizedMessage(1042001);
			}
			else
			{
				from.CloseGump( typeof( dj_gump_ship1 ) );
				from.CloseGump( typeof( dj_gump_ship2 ) );
				from.CloseGump( typeof( dj_gump_ship3 ) );
				from.SendGump( new dj_gump_ship1( from ) );
			}
		}
開發者ID:Tukaramdas,項目名稱:ServUO-EC-Test-Fork,代碼行數:14,代碼來源:SeaNavigator.cs


注:本文中的Server.Mobile.CloseGump方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。