• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# LoginEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中LoginEventArgs的典型用法代码示例。如果您正苦于以下问题:C# LoginEventArgs类的具体用法?C# LoginEventArgs怎么用?C# LoginEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LoginEventArgs类属于命名空间,在下文中一共展示了LoginEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: UserInfoControl_UpItem

 void UserInfoControl_UpItem(object sender, LoginEventArgs e)
 {
     if (UpItem != null)
     {
         UpItem(sender , e);
     }
 }
开发者ID:jxdong1013,项目名称:archivems,代码行数:7,代码来源:UserInfoControlHost.cs


示例2: OnLogin

		public static void OnLogin(LoginEventArgs e)
		{
			AnimalFormContext context = AnimalForm.GetContext(e.Mobile);

			if (context != null && context.SpeedBoost)
				e.Mobile.Send(SpeedControl.MountSpeed);
		}
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:7,代码来源:AnimalForm.cs


示例3: EventSink_Login

        private static void EventSink_Login( LoginEventArgs args )
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;

            Mobile m = args.Mobile;

            m.SendMessage( 55, "Khaeros Shard: Welcome to our World");
            m.SendMessage( 55, "There {1} currently {2} player{3} online...",
                args.Mobile.Name,
                userCount == 1 ? "is" : "are",
                userCount, userCount == 1 ? "" : "s",
                itemCount, itemCount == 1 ? "" : "s",
                mobileCount, mobileCount == 1 ? "" : "s" );

            string text = "";
            text = text + TimeSystem.Formatting.GetDescriptiveTime(m);

            m.SendMessage(55, text);

            m.SendMessage( 33, "We hope you enjoy your time!");

            //******Edit: Added in********
                        if ( m.AccessLevel >= AccessLevel.Counselor )
                        {
                            Server.Engines.Help.PageQueue.Pages_OnCalled( m );
                        }
            //******************************
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:30,代码来源:LoginStats.cs


示例4: OnLogin

        private static void OnLogin(LoginEventArgs e)
        {
            var pm = e.Mobile as PlayerMobile;
            if (pm == null || !pm.IsYoung() || pm.IsYoung() && pm.Guild != null)
            {
                return;
            }

            if (NewGuildPersistence.Instance == null)
            {
                var NGP = new NewGuildPersistence();
            }

            if (NewGuildPersistence.Instance != null && NewGuildPersistence.JoinedIPs != null)
            {
                var loginIPs = ((Account) e.Mobile.Account).LoginIPs.ToArray();
                if (loginIPs.Any(ip => NewGuildPersistence.JoinedIPs.Contains(ip)))
                {
                    return;
                }
            }

            var g = (Guild) BaseGuild.FindByAbbrev("New");
            if (g != null)
            {
                e.Mobile.SendGump(new NewPlayerGuildJoinGump(g, e.Mobile));
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:28,代码来源:NewGuildJoin.cs


示例5: OnLogin

 private static void OnLogin(LoginEventArgs e)
 {
     if (e != null && e.Mobile != null && e.Mobile is PlayerMobile && UsedGump != null && !UsedGump.Contains(e.Mobile as PlayerMobile))
     {
         e.Mobile.SendGump(new AprilFoolsGump1());
     }
 }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:7,代码来源:AprilFoolsLogin.cs


示例6: EventSink_Login

        private static void EventSink_Login( LoginEventArgs args )
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;
            int spellCount = Spells.SpellRegistry.Count;

            Mobile m = args.Mobile;

            if ( m.AccessLevel > AccessLevel.Player )
            {
                    m.SendAsciiMessage( "Welcome, {0}! There {1} currently {2} user{3} online, with {4} item{5} and {6} mobile{7} in the world.",
                    args.Mobile.Name,
                    userCount == 1 ? "is" : "are",
                    userCount, userCount == 1 ? "" : "s",
                    itemCount, itemCount == 1 ? "" : "s",
                    mobileCount, mobileCount == 1 ? "" : "s" );
            }
            else
            {
                m.SendAsciiMessage( "There {0} currently {1} user{2} online.",
                    userCount == 1 ? "is" : "are",
                    userCount,
                    userCount != 1 ? "s" : "" );
            }
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:26,代码来源:LoginStats.cs


示例7: EventSink_Login

        private static void EventSink_Login( LoginEventArgs args )
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;
            int staffCount = 0;

            Mobile m = args.Mobile;

            // By Silver
            if ( m.AccessLevel < AccessLevel.GameMaster )
            {
                foreach ( NetState ns in NetState.Instances )
                {
                    Mobile mob = ns.Mobile;

                    if( mob != null && mob.AccessLevel >= AccessLevel.Counselor )
                        staffCount++;
                }

                userCount -= staffCount;
            }

            m.SendMessage( "Welcome, {0}! There {1} currently {2} player{3} online, with {4} item{5} and {6} mobile{7} in the world.",
                args.Mobile.Name,
                userCount == 1 ? "is" : "are",
                userCount, userCount == 1 ? "" : "s",
                itemCount, itemCount == 1 ? "" : "s",
                mobileCount, mobileCount == 1 ? "" : "s" );
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:30,代码来源:LoginStats.cs


示例8: UserInfoControl_DownItem

 void UserInfoControl_DownItem(object sender, LoginEventArgs e)
 {
     if (DownItem != null)
     {
         DownItem(sender , e);
     }
 }
开发者ID:jxdong1013,项目名称:archivems,代码行数:7,代码来源:UserInfoControlHost.cs


示例9: EventSink_Login

private static void EventSink_Login( LoginEventArgs args ) 
  

{ 
  


Mobile m = args.Mobile; 
  


int userCount = NetState.Instances.Count;
  
  


World.Broadcast( 0x35, true, "{0} has now logged in! There {1} now {2} player{3} online!", args.Mobile.Name,
  


userCount == 1 ? "is" : "are",
  


userCount, userCount == 1 ? "" : "s" );
  

}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:28,代码来源:Announce.cs


示例10: EventSink_Login

		private static void EventSink_Login( LoginEventArgs args )
		{
			int userCount = NetState.Instances.Count;
			int itemCount = World.Items.Count;
			int mobileCount = World.Mobiles.Count;
            int count = 0;

            Mobile owner = args.Mobile;

            List<NetState> states = NetState.Instances;

            for (int i = 0; i < states.Count; ++i)
            {
                Mobile m = states[i].Mobile;

                if (m != null && (m == owner || !m.Hidden || owner.AccessLevel >= m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains(owner))))
                {
                    ++count;
                }
            }

            owner.SendMessage("Welcome {0}! There {1} currently {2} user{3} online and {4} item{5} in the world.",
                args.Mobile.Name,
                count == 1 ? "is" : "are",
                count, count == 1 ? "" : "s",
                itemCount, itemCount == 1 ? "" : "s");
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:27,代码来源:LoginStats.cs


示例11: OnLogin

		private static void OnLogin( LoginEventArgs e )
		{
			Mobile from = e.Mobile;

			if ( from != null )
			{
				Map map = from.Map;

				if ( map == null )
					return;

				Dictionary<Serial, Mobile>.Enumerator mobs = World.Mobiles.GetEnumerator();
				List<Mobile> pets = new List<Mobile>();
				while (mobs.MoveNext()) pets.Add(mobs.Current.Value);
				mobs.Dispose();
				
				for(int i=0;i<pets.Count;i++)
				{
					Mobile pet = pets[i];
					
					if ( pet is BaseCreature )
					{
						BaseCreature bc = (BaseCreature)pet;
						
						if(bc != null && bc.Map == Map.Internal && bc.Controlled && bc.ControlMaster == from && !IsMounted(bc))
						{
							pet.Map = map;
							pet.CantWalk = false;
						}
					}
				}
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:33,代码来源:DisconnectPet.cs


示例12: GetProgress

		protected virtual int GetProgress(ConquestState state, LoginEventArgs args)
		{
            if (state.User == null)
                return 0;

            if (args == null || args.Mobile is PlayerMobile && args.Mobile.Account != state.User.Account)
			{
				return 0;
			}

			if (Map != null && Map != Map.Internal && (args.Mobile.Map == null || args.Mobile.Map != Map))
			{
				if (MapChangeReset)
				{
					return -state.Progress;
				}

				return 0;
			}

			if (!String.IsNullOrWhiteSpace(Region) && (args.Mobile.Region == null || !args.Mobile.Region.IsPartOf(Region)))
			{
				if (RegionChangeReset)
				{
					return -state.Progress;
				}

				return 0;
			}

			return 1;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:32,代码来源:LoginConquest.cs


示例13: EventSink_Login

        private static void EventSink_Login( LoginEventArgs args )
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;

            Mobile m = args.Mobile;

            m.SkillsCap = 55000;

            for (int i = 0; i < m.Skills.Length; ++i)
            {
                m.Skills[i].Cap = 1000;

                if (m.Skills[i].Base > 100)
                    m.Skills[i].Base = 100;
            }

            //m.SendMessage( "Welcome, {0}! There {1} currently {2} user{3} online, with {4} item{5} and {6} mobile{7} in the world.",
            //    args.Mobile.Name,
            //    userCount == 1 ? "is" : "are",
            //    userCount, userCount == 1 ? "" : "s",
            //    itemCount, itemCount == 1 ? "" : "s",
            //    mobileCount, mobileCount == 1 ? "" : "s" );

            m.SendMessage(365, string.Format("Bem-vindo ao DimensNewAge {0}.", args.Mobile.Name));
            m.SendMessage(365, string.Format("Neste momento existem {0} usuarios online.", userCount >= 2 ? userCount + 1 : userCount));
            m.SendMessage(365, string.Format("Temos '{0}' Itens e '{1}' Mobs pelo mundo.", itemCount, mobileCount));
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:29,代码来源:LoginStats.cs


示例14: OnLogin

        public static void OnLogin(LoginEventArgs e)
        {
            BaseHouse house = BaseHouse.FindHouseAt(e.Mobile);

            if (house != null && !house.Public && !house.IsFriend(e.Mobile))
                e.Mobile.Location = house.BanLocation;
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:7,代码来源:HouseRegion.cs


示例15: EventSink_Login

		private static void EventSink_Login( LoginEventArgs e )
		{
			Account acct = e.Mobile.Account as Account;

			if ( acct == null )
				return;

			DateTime now = DateTime.Now;

			for ( int i = 0; i < m_Givers.Count; ++i )
			{
				GiftGiver giver = m_Givers[i];

				if ( now < giver.Start || now >= giver.Finish )
					continue; // not in the correct timefream

				if ( acct.Created > (giver.Start - giver.MinimumAge) )
					continue; // newly created account

				if ( acct.LastLogin >= giver.Start )
					continue; // already got one

				giver.DelayGiveGift( TimeSpan.FromSeconds( 5.0 ), e.Mobile );
			}

			acct.LastLogin = now;
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:27,代码来源:GiftGiving.cs


示例16: ProviderLoaded

        public override void ProviderLoaded(object sender, ProviderLoadedEventArgs e)
        {
            base.ProviderLoaded(sender, e);

            string sessionId = null;
            switch (e.RequestCode)
            {
                case RC_LOGIN:
                    if (e.IsSuccess)
                    {
                        sessionId = Parser.GetSessionId();
                    }
                    break;
                default:
                    break;
            }

            if (LoginEvent != null)
            {
                LoginEventArgs eventArgs = new LoginEventArgs(sessionId);
                eventArgs.LoadEventArgs(e);

                LoginEvent(this, eventArgs);
            }
        }
开发者ID:soxfmr,项目名称:CourseSystem,代码行数:25,代码来源:LoginProvider.cs


示例17: UserInfoControl_UserClick

 void UserInfoControl_UserClick(object sender, LoginEventArgs e)
 {
     if (UserClick != null)
     {
         UserClick(this, e );
     }
 }
开发者ID:jxdong1013,项目名称:archivems,代码行数:7,代码来源:UserInfoControlHost.cs


示例18: LoginControl_LoginEvent

        /// <summary>
        /// OnLogin
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected virtual void LoginControl_LoginEvent(object sender, LoginEventArgs e)
        {
            if (e.Principal != null)
            {
                System.Threading.Thread.CurrentPrincipal = e.Principal;
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                switch (e.LoginFailType)
                {
                    case LoginFailType.Fail:
                        MessageForm.ShowError("�û������������");
                        break;
                    case LoginFailType.AlreadyLogin:
                        MessageForm.ShowError("�����������ط���¼�����ȵdz���ȴ�һ��ʱ�䡣");
                        break;
                    case LoginFailType.Exception:
                        MessageForm.ShowError("����δ֪����" + e.Message);
                        break;
                    case LoginFailType.UIError:
                        break;
                    default:
                        throw new ArgumentException("Invalid LoginEventArgs");
                }

                this.DialogResult = DialogResult.Retry;
            }
        }
开发者ID:urmilaNominate,项目名称:mERP-framework,代码行数:34,代码来源:LoginForm.cs


示例19: OnLogin

		public static void OnLogin( LoginEventArgs e )
		{
			TransformContext context = TransformationSpellHelper.GetContext( e.Mobile );

			if( context != null && context.Type == typeof( ReaperFormSpell ) )
				e.Mobile.Send( SpeedControl.WalkSpeed );
		}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:7,代码来源:ReaperForm.cs


示例20: OnLogin

        public static void OnLogin(LoginEventArgs e)
        {
            Mobile from = e.Mobile;

            if (from == null || from.IsPlayer())
                return;

            if (HasDisconnected(from))
            {
                if (!m_MoveHistory.ContainsKey(from))
                    m_MoveHistory[from] = new LocationInfo(from.Location, from.Map);

                LocationInfo dest = GetRandomDestination();

                from.Location = dest.Location;
                from.Map = dest.Map;
            }
            else if (m_MoveHistory.ContainsKey(from))
            {
                LocationInfo orig = m_MoveHistory[from];
                from.SendMessage("Your character was moved from {0} ({1}) due to a detected client crash.", orig.Location, orig.Map);

                m_MoveHistory.Remove(from);
            }
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:25,代码来源:PreventInaccess.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LoginModel类代码示例发布时间:2022-05-24
下一篇:
C# Login类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap