当前位置: 首页>>代码示例>>C#>>正文


C# Mobile.LaunchBrowser方法代码示例

本文整理汇总了C#中Mobile.LaunchBrowser方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.LaunchBrowser方法的具体用法?C# Mobile.LaunchBrowser怎么用?C# Mobile.LaunchBrowser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mobile的用法示例。


在下文中一共展示了Mobile.LaunchBrowser方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnVote

		public virtual void OnVote(Mobile from, VoteStatus status)
		{
			if (status == VoteStatus.Success && VoteSite.Valid)
			{
				if (_Messages)
				    from.SendMessage("Thank you for voting on {0}!", VoteConfig.Instance.DefaultName);

                if (VoteConfig.Instance.DefaultGold > 0)
                {
                    from.AddToBackpack(new Gold(VoteConfig.Instance.DefaultGold));
                    from.SendAsciiMessage("{0} gold has been added to your backpack", VoteConfig.Instance.DefaultGold);
                    from.PlaySound(55);
                }

                //from.LaunchBrowser("http://www.gamesites200.com/ultimaonline/in.php?id=2224"); Not allowed to have this :(
			    from.LaunchBrowser(VoteConfig.Instance.DefaultURL);
				VoteHelper.SetLastVoteTime(from, VoteSite);

            }
			else if (status == VoteStatus.TooEarly)
			{
				if (_Messages)
				{
					TimeSpan timeLeft = VoteHelper.GetTimeLeft(from, VoteSite);
                    from.SendMessage(0x22, "Sorry, you can not vote on {0} for {1}.", VoteConfig.Instance.DefaultName, VoteHelper.GetFormattedTime(timeLeft));
				}
			}
			else if (status == VoteStatus.Invalid)
			{
				if (_Messages)
				{
					from.SendMessage(0x22, "Sorry, voting is currently unavailable.");
				}
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:35,代码来源:VoteItem.cs

示例2: OnDoubleClick

 public override void OnDoubleClick( Mobile from )
 {
     if ( !from.InRange( GetWorldLocation(), 2 ) )
         from.SendLocalizedMessage( 500446 ); // That is too far away.
     else
         from.LaunchBrowser( m_sUrl );
 }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:7,代码来源:WebStone.cs

示例3: OnMoveOver

		public override bool OnMoveOver( Mobile m )
		{
			if ( m.Alive )
			{
				m.PlaySound( 0x214 );
				m.FixedEffect( 0x376A, 10, 16 );

				int i = 0;
				
				while (i < 52)
				{
					///
				i++;
				}
                                  m.LaunchBrowser( "annox.no-ip.com" ); 
           }
			else
			{
				//m.SendLocalizedMessage(2, "Your dead and can't use this" ); 
			}

			return true;
		}
开发者ID:greeduomacro,项目名称:annox,代码行数:23,代码来源:WebGate.cs

示例4: OnMoveOver

        public override bool OnMoveOver(Mobile m)
        {
            if (m.Alive)
            {
                m.PlaySound(0x214);
                m.FixedEffect(0x376A, 10, 16);

                int i = 0;

                while (i < 52)
                {
                    ///
                    i++;
                }
                m.LaunchBrowser("http://www.uogateway.com/shard.php?id=231&act=vote");
            }
            else
            {
                //m.SendLocalizedMessage(2, "Your dead and can't use this" ); 
            }

            return true;
        }
开发者ID:greeduomacro,项目名称:annox,代码行数:23,代码来源:VotingWebGate.cs

示例5: CreateReward

        public static void CreateReward(EventRewardInfo info, Mobile m)
        {
            if (m == null)
                return;

            Item item = null;
            switch (info.IncrID)
            {
                case 0: item = new MagicSewingKit(1); break;
                case 1:
                    string str = "PottedCactus";
                    int randint = Utility.Random(6);
                    if (randint > 0)
                        str = str + randint.ToString();

                    Type type = ScriptCompiler.FindTypeByName(str);
                    item = (Item)Activator.CreateInstance(type);
                    item.Weight = 100;
                    break;
                case 2:
                    if (Utility.RandomBool())
                        item = new PottedTree();
                    else
                        item = new PottedTree1();
                    break;
                case 3:
                    switch (Utility.Random(3))
                    {
                        case 0: item = new PottedPlant(); break;
                        case 1: item = new PottedPlant1(); break;
                        case 2: item = new PottedPlant2(); break;
                    }
                    break;
                case 4: item = new SpecialHairDye(); break;
                case 5: item = new SpecialBeardDye(); break;
                case 6: item = new TempHorseEthereal(50);
                        item.Hue = Utility.Random(795, 7);
                        break;
                case 7: item = new FireworksWand(99); break;
                case 8: item = new LayeredSashDeed(); break;
                case 9: item = new SkillBall(1); break;
                case 10: item = new SkillBall(5); break;
                case 11: item = new SkillBall(10); break;
                case 12: item = new SkillBall(25); break;
                case 13: item = new SkillBall(50); break;
                case 14: item = new PersonalisationDeed(); break;
                case 15: item = new CrystalPedestalAddonDeed(); break;
                case 16: item = new FountainStoneAddonDeed(); break;
                case 17: item = new FountainSandstoneAddonDeed(); break;
                case 18: item = new SquirrelStatueEastDeed(); break;
                case 19: item = new SquirrelStatueSouthDeed(); break;
                case 20: item = new ArcanistStatueEastDeed(); break;
                case 21: item = new ArcanistStatueSouthDeed(); break;
                case 22: item = new WarriorStatueEastDeed(); break;
                case 23: item = new WarriorStatueSouthDeed(); break;
                case 24: item = new TempRobe(31);
                        ((BaseClothing)item).Attributes.RegenHits = 3;
                        break;
                case 25: item = new TempCloak(31);
                        ((BaseClothing)item).Attributes.RegenHits = 3;
                        break;
                case 26: item = new CampfireDeed(); break;
                case 27: item = new FireDeed(); break;
                case 28: item = new SoulstoneFragment();
                        ((SoulstoneFragment)item).Account = m.Account.Username;
                        break;
                case 29: item = new NameChangeDeed(); break;
                case 30: item = new SexChangeDeed(); break;
                case 31: item = new KillResetDeedAOS(); break;
                case 32: item = new PetBondingDeed(); break;
                case 33: item = new WarHorseBondingDeed(); break;
                case 34: item = new AntiBlessDeed(); break;
                case 35: item = new WhisperingRose(m.Name); break;
                case 36: item = new WeddingDeed(); break;
                case 37: item = new KillBook();
                        ((KillBook)item).BookOwner = m;
                        break;
            }

            if (item != null)
            {
                m.AddToBackpack(item);
                m.SendMessage("The reward item has been placed into your backpack, have fun!");
            }
            else
            {
                m.SendMessage("That item is not available. Please report the bug at the site that will open in your browser.");
                m.LaunchBrowser( "http://bug.casiopia.net/" );
                m.AddToBackpack( new CopperBar(info.Price) );
            }
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:91,代码来源:EventRewardSystem.cs

示例6: SpawnTypeKeyword


//.........这里部分代码省略.........
                                        status_str = gumptypestr + " is not a Gump type";
                                        newtag.Delete();
                                        return false;
                                    }
                                }
                            }
                            TheSpawn.SpawnedObjects.Add(newtag);

                            break;
                        }
                    case typeKeyword.BROWSER:
                        {
                            // the syntax is BROWSER/url
                            string[] arglist = ParseSlashArgs(substitutedtypeName, 2);
                            string url;

                            if (arglist.Length > 1)
                            {
                                if (arglist[1] != null && arglist[1].Length > 0 && arglist[1][0] == '@')
                                {
                                    url = arglist[1].Substring(1);
                                }
                                else
                                    url = arglist[1];
                            }
                            else
                            {
                                status_str = "invalid BROWSER specification";
                                return false;
                            }

                            if (triggermob != null && !triggermob.Deleted && (triggermob is PlayerMobile))
                            {
                                triggermob.LaunchBrowser(url);
                            }

                            TheSpawn.SpawnedObjects.Add(new KeywordTag(substitutedtypeName, spawner));

                            break;
                        }
                    case typeKeyword.SENDMSG:
                        {
                            // the syntax is SENDMSG[,hue]/string
                            string[] arglist = ParseSlashArgs(substitutedtypeName, 3);
                            // check for literal
                            string msgText;
                            int hue = 0x3B2;
                            int font = 3;

                            if (arglist.Length > 0)
                            {
                                string[] keywordargs = ParseString(arglist[0], 2, ",");
                                if (keywordargs.Length > 1)
                                {
                                    try
                                    {
                                        hue = int.Parse(keywordargs[1]);
                                    }
                                    catch
                                    {
                                        status_str = "invalid hue arg to SENDMSG";
                                    }
                                }
                            }
                            if (arglist.Length > 1)
                            {
开发者ID:m309,项目名称:ForkUO,代码行数:67,代码来源:BaseXmlSpawner.cs

示例7: OPENBROWSER

			public static void OPENBROWSER(TriggerObject trigObject, Mobile mob, string url)
			{
				if (mob != null && url != null)
				{
					mob.LaunchBrowser(url);
				}
			}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:7,代码来源:UberScriptFunctions.cs

示例8: OnResponse

		public override void OnResponse( NetState sender, RelayInfo info )
		{	
			m_From = sender.Mobile;
			
			string page = "You open the homepage.";

			switch( info.ButtonID )
			{
				case 0:
				{
					m_From.PlaySound( 46 );
					break;
				}	
				
				case 1:
				{
						m_From.PlaySound( 579 );
                        m_From.LaunchBrowser(string.Format("http://in-uo.net/"));
                        m_From.SendAsciiMessage( page );

					break;
				}
				
				case 2:
				{
						m_From.PlaySound( 579 );
                        m_From.LaunchBrowser(string.Format("http://in-uo.net/forums/index.php"));
                        m_From.SendAsciiMessage( page );

					break;
				}
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:33,代码来源:WebStone.cs

示例9: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
		if ( lastused + delay > DateTime.Now )
				{
					from.SendMessage( "Your request is already being processed. Please wait 5 seconds between uses." ); 
					return;
				}
		else
		{
		lastused = DateTime.Now;
		from.LaunchBrowser( m_URL );	
		}
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:13,代码来源:webbook.cs

示例10: OpenBrowser_Callback

        public static void OpenBrowser_Callback(Mobile from, bool okay, object state)
        {
            object[] states = (object[])state;
            Mobile gm = (Mobile)states[0];
            string url = (string)states[1];
            bool echo = (bool)states[2];

            if (okay)
            {
                if (echo)
                    gm.SendMessage("{0} : has opened their web browser to : {1}", from.Name, url);

                from.LaunchBrowser(url);
            }
            else
            {
                if (echo)
                    gm.SendMessage("{0} : has chosen not to open their web browser to : {1}", from.Name, url);

                from.SendMessage("You have chosen not to open your web browser.");
            }
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:22,代码来源:Commands.cs

示例11: CreateItem


//.........这里部分代码省略.........
                        item = new RefreshPotion();
                        break;
                case 16: for (int i=0; i < 2; i++) //The last potion is dropped later
                        {
                            item = new RefreshPotion();
                            m.AddToBackpack(item);
                        }
                        item = new LesserCurePotion();
                        break;
                case 17: for (int i=0; i < 2; i++) //The last potion is dropped later
                        {
                            item = new RefreshPotion();
                            m.AddToBackpack(item);
                        }
                        item = new LesserHealPotion();
                        break;
                case 18: for (int i=0; i < 2; i++) //The last potion is dropped later
                        {
                            item = new RefreshPotion();
                            m.AddToBackpack(item);
                        }
                        item = new NightSightPotion();
                        break;
                case 19: item = new Bandage(50); break;
                case 20: item = new Bandage(200); break;
                case 21: item = new Bandage(1000); break;
                case 22: item = new Arrow(100); break;
                case 23: item = new Arrow(1000); break;
                case 24: item = new Bolt(100); break;
                case 25: item = new Bolt(1000); break;
                case 26: bc = new Horse(); break;
                case 27: bc = new PackLlama(); break;
                case 28: item = new Club();
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 29: item = new WarFork();
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 30: item = new Katana();
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 31: item = new Bow();
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 32: item = new MetalKiteShield();
                        BaseRunicTool.ApplyAttributesTo((BaseShield)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 33: item = new WoodenShield();
                        BaseRunicTool.ApplyAttributesTo((BaseShield)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 34: item = new LeatherChest();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 35: item = new LeatherGloves();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 36: item = new LeatherGorget();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 37: item = new LeatherLegs();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 38: item = new LeatherCap();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 39: item = new LeatherArms();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 40: item = new Gold(300); break;
                case 41: item = new Gold(3000); break;
                case 42: item = new Server.Engines.BulkOrders.BulkOrderBook(); break;
                case 43: item = new Drums();
                        ((BaseInstrument)item).Quality = InstrumentQuality.Exceptional;
                        break;
                case 44: item = new TambourineTassel();
                        ((BaseInstrument)item).Quality = InstrumentQuality.Exceptional;
                        break;
                case 45: item = new Server.Multis.SmallDragonBoatDeed(); break;
                case 46: item = new Server.Multis.LargeDragonBoatDeed(); break;
            }

            if (item != null)
            {
                m.AddToBackpack(item);
                m.SendMessage("Here are the goods you requested.");
            }
            else if (bc != null)
            {
                bc.Controlled = true;
                bc.ControlMaster = m;
                bc.MoveToWorld( m.Location, m.Map );
                m.SendMessage("Here is the pet you requested.");
            }
            else
            {
                m.SendMessage("That item is not available. Please report the bug at the site that will open in your browser.");
                m.LaunchBrowser( "http://bug.casiopia.net/" );
                m.AddToBackpack( new VeriteGem(info.Price) );
            }
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:101,代码来源:LLVendorItems.cs


注:本文中的Mobile.LaunchBrowser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。