本文整理汇总了C#中Server.Mobile.LaunchBrowser方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.LaunchBrowser方法的具体用法?C# Mobile.LaunchBrowser怎么用?C# Mobile.LaunchBrowser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobile
的用法示例。
在下文中一共展示了Mobile.LaunchBrowser方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OpenBrowser_Callback
public static void OpenBrowser_Callback( Mobile from, bool okay, object state )
{
object[] states = (object[])state;
string url = (string)states[0];
if ( okay )
from.LaunchBrowser( url );
else
from.SendMessage( "You have chosen not to open your web browser." );
}
示例2: OpenBrowser_Callback
private static void OpenBrowser_Callback( Mobile m, bool okay, object unused )
{
if ( okay )
{
m.SendAsciiMessage( Ad_OkMsg );
m.LaunchBrowser( Ad_Url );
}
else
{
m.SendAsciiMessage( Ad_CancelMsg );
}
}
示例3: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if( m_Voteds.Contains( from ))
{
from.SendMessage( 63,"You have already voted." );
return;
}
if (from != null && from.Alive)
{
m_Voteds.Add(from);
from.SendGump(new StoneGump(from, this));
from.LaunchBrowser("http://www.joinuo.com/Vote/608");
from.SendMessage(1153, "Thank you for supporting us. ");
}
}
示例4: 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];
if ( okay )
{
gm.SendMessage( "{0} : has opened their web browser to : {1}", from.Name, url );
from.LaunchBrowser( url );
}
else
{
from.SendMessage( "You have chosen not to open your web browser." );
gm.SendMessage( "{0} : has chosen not to open their web browser to : {1}", from.Name, url );
}
}
示例5: 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)
{
if (arglist[1] != null && arglist[1].Length > 0 && arglist[1][0] == '@')
{
arglist = ParseSlashArgs(substitutedtypeName, 2);
示例6: 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}!", VoteSite.Name);
from.LaunchBrowser(VoteSite.URL);
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}.", VoteSite.Name, VoteHelper.GetFormattedTime(timeLeft));
}
}
else if (status == VoteStatus.Invalid)
{
if (_Messages)
{
from.SendMessage(0x22, "Sorry, voting is currently unavailable.");
}
}
}
示例7: SendLinkTo
/// <summary>
/// Sends the associated web link to a mobile
/// </summary>
/// <param name="m">The mobile that should receive the web link</param>
public void SendLinkTo( Mobile m )
{
if ( m != null && m.NetState != null )
{
if ( m_WebLink != null && m_WebLink.Length > 0 )
{
m.LaunchBrowser( string.Format( "http://{0}", m_WebLink ) );
}
}
}
示例8: UserAFK
private void UserAFK(Mobile m)
{
if (m == null)
return;
m.CloseGump(typeof(AFKCPassPhraseGump));
m.Say("I'm AFK!");
Account mAccount = m.Account as Account;
if (mAccount != null)
{
CommandLogging.WriteLine(m, "{0} {1} {2} ", m.AccessLevel, CommandLogging.Format(m), "Failed AFK Check.");
string text = String.Format("{0} AFK Check-{1}: **Failed** Retries={2}/{3} Seconds={4}/{5}", DateTime.Now, m.Name, m_RetryCount, m_MaxRetries, m_TotalSeconds, m_MaxSeconds);
mAccount.Comments.Add(new AccountComment("AFK Checker", text));
if (m_Jail)
MoveToJail(m);
else if (m_MoveToMap != null && m_MoveTo != Point3D.Zero)
{
m.MoveToWorld(m_MoveTo, m_MoveToMap);
Effects.SendBoltEffect(m, true, 0);
Effects.PlaySound(new Point3D(m.X, m.Y, m.Z), m.Map, 0x307);
}
if (m_Website != null)
{
try { m.LaunchBrowser(m_Website); }
catch { }
}
if (m_Kick)
{
m_KickTimer = new KickTimer(m, TimeSpan.FromSeconds(5));
m_KickTimer.Start();
}
if (m_Staff != null && !m_Staff.Deleted && m_Staff.Map != Map.Internal)
{
m_Staff.SendMessage(37, "*{0} FAILED AFK Check*", m.Name);
m_Staff.CloseGump(typeof(AFKCancelGump));
}
}
}
示例9: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
from.LaunchBrowser( Website );
}
示例10: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
string url = "http://www.defianceuo.com/forums/viewtopic.php?t=446";
from.LaunchBrowser( url );
}
示例11: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
from.LaunchBrowser("http://in-uo.net/info/guides");
//from.CloseGump(typeof(PlayerGuidegump));
//from.SendGump(new PlayerGuidegump());
}
示例12: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
from.LaunchBrowser( m_Url );
}