本文整理汇总了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.");
}
}
}
示例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 );
}
示例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;
}
示例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;
}
示例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) );
}
}
示例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)
{
示例7: OPENBROWSER
public static void OPENBROWSER(TriggerObject trigObject, Mobile mob, string url)
{
if (mob != null && url != null)
{
mob.LaunchBrowser(url);
}
}
示例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;
}
}
}
示例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 );
}
}
示例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.");
}
}
示例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) );
}
}