当前位置: 首页>>代码示例>>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;未经允许,请勿转载。