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


C# Help.PageEntry类代码示例

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


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

示例1: OnLoad

		private static void OnLoad()
		{
			Persistence.Deserialize(
				_FilePath,
				reader =>
				{
					var version = reader.ReadInt();
					var count = reader.ReadInt();

					switch (version)
					{
						case 0:
							{
								for (var i = 0; i < count; ++i)
								{
									var sender = reader.ReadMobile();
									var message = reader.ReadString();
									var type = (PageType)reader.ReadInt();
									PageEntry pe = new PageEntry(sender, message, type)
									{
										Handler = reader.ReadMobile(),
										Sent = reader.ReadDateTime(),
										PageLocation = reader.ReadPoint3D(),
										PageMap = reader.ReadMap()
									};
									pe.Stop();

									PageQueue.Enqueue(pe);
								}
							}
							break;
					}
				});
		}
开发者ID:Crome696,项目名称:ServUO,代码行数:34,代码来源:HelpPersistence.cs

示例2: NotifyOps

        // Public Methods
        public static void NotifyOps( PageEntry p )
        {
            string pLocation = Region.Find(p.PageLocation, p.PageMap).Name;
            if ( pLocation == null || pLocation == "" )
                pLocation = "wilderness";

            SendNotice(StaffChannel, String.Format("[{0}] {1} ({2}): {3}", p.Type, p.Sender.Name, pLocation, p.Message));
        }
开发者ID:greeduomacro,项目名称:divinity,代码行数:9,代码来源:IRCBot.cs

示例3: PageInfo

        public PageInfo( PageEntry entry )
        {
            m_PageType = entry.Type;

            m_TimeSent = entry.Sent;
            m_SentBy = GetAccount( entry.Sender );

            m_Message = entry.Message;
            m_Responses = new ResponseInfoCollection();
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:10,代码来源:PageInfo.cs

示例4: Enqueue

		public static void Enqueue( PageEntry entry )
		{
			m_List.Add( entry );
			m_KeyedBySender[entry.Sender] = entry;

			bool isStaffOnline = false;

			foreach ( NetState ns in NetState.Instances )
			{
				Mobile m = ns.Mobile;

				if ( m != null && m.AccessLevel >= AccessLevel.Counselor && m.AutoPageNotify && !IsHandling( m ) )
					m.SendMessage( "A new page has been placed in the queue." );

				if ( m != null && m.AccessLevel >= AccessLevel.Counselor && m.AutoPageNotify && m.LastMoveTime >= (DateTime.Now - TimeSpan.FromMinutes( 10.0 )) )
					isStaffOnline = true;
			}

			if ( !isStaffOnline )
				entry.Sender.SendMessage( "We are sorry, but no staff members are currently available to assist you.  Your page will remain in the queue until one becomes available, or until you cancel it manually." );

			if ( Email.FromAddress != null && Email.SpeechLogPageAddresses != null && entry.SpeechLog != null )
				SendEmail( entry );
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:24,代码来源:PageQueue.cs

示例5: Remove

		public static void Remove( PageEntry e )
		{
			if ( e == null )
				return;

			e.Stop();

			m_List.Remove( e );
			m_KeyedBySender.Remove( e.Sender );

			if ( e.Handler != null )
				m_KeyedByHandler.Remove( e.Handler );
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:13,代码来源:PageQueue.cs

示例6: IndexOf

		public static int IndexOf( PageEntry e )
		{
			return m_List.IndexOf( e );
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:4,代码来源:PageQueue.cs

示例7: OnHandlerChanged

		public static void OnHandlerChanged( Mobile old, Mobile value, PageEntry entry )
		{
			if ( old != null )
				m_KeyedByHandler.Remove( old );

			if ( value != null )
				m_KeyedByHandler[value] = entry;
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:8,代码来源:PageQueue.cs

示例8: InternalTimer

			public InternalTimer( PageEntry entry ) : base( TimeSpan.FromSeconds( 1.0 ), StatusDelay )
			{
				m_Entry = entry;
			}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:4,代码来源:PageQueue.cs

示例9: PageSpyReport

        //Al: Send PageSpyReport if:
        //      -Spy is GM or higher
        //      -The spy's accesslevel is higher than the answerer's
        //      -PageSpy is set to true
        private void PageSpyReport(PageEntry entry, Mobile answerer, string reply)
        {
            if (answerer == null || entry.Sender == null) return;

            foreach (NetState state in NetState.Instances)
            {
                Mobile m = state.Mobile;
                if (m != null && !m.Deleted && m is PlayerMobile)
                {
                    PlayerMobile pm = (PlayerMobile)m;
                    if (pm.PageSpy && m.AccessLevel >= AccessLevel.GameMaster && m.AccessLevel > answerer.AccessLevel)
                    {
                        m.SendMessage(467, "Page by {0} (acc: {1}):", entry.Sender.Name, entry.Sender.Account);
                        m.SendMessage(entry.Message);
                        m.SendMessage(467, "Response by {0} (acc: {1}):", answerer.Name, answerer.Account);
                        m.SendMessage(reply);
                    }
                }
            }
        }
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:24,代码来源:PageQueueGump.cs

示例10: PageEntryGump

		public PageEntryGump( Mobile m, PageEntry entry ) : base( 30, 30 )
		{
			try
			{
				m_Mobile = m;
				m_Entry = entry;

				int buttons = 0;

				int bottom = 356;

				AddPage( 0 );

				AddImageTiled( 0, 0, 410, 456, 0xA40 );
				AddAlphaRegion( 1, 1, 408, 454 );

				AddPage( 1 );

				AddLabel( 18, 18, 2100, "Sent:" );
				AddLabelCropped( 128, 18, 264, 20, 2100, entry.Sent.ToString() );

				AddLabel( 18, 38, 2100, "Sender:" );
				AddLabelCropped( 128, 38, 264, 20, 2100, String.Format( "{0} {1} [{2}]", entry.Sender.RawName, entry.Sender.Location, entry.Sender.Map ) );

				AddButton( 18, bottom - (buttons * 22), 0xFAB, 0xFAD, 8, GumpButtonType.Reply, 0 );
				AddImageTiled( 52, bottom - (buttons * 22) + 1, 340, 80, 0xA40/*0xBBC*//*0x2458*/ );
				AddImageTiled( 53, bottom - (buttons * 22) + 2, 338, 78, 0xBBC/*0x2426*/ );
				AddTextEntry( 55, bottom - (buttons++ * 22) + 2, 336, 78, 0x480, 0, "" );

				AddButton( 18, bottom - (buttons * 22), 0xFA5, 0xFA7, 0, GumpButtonType.Page, 2 );
				AddLabel( 52, bottom - (buttons++ * 22), 2100, "Predefined Response" );

				if ( entry.Sender != m )
				{
					AddButton( 18, bottom - (buttons * 22), 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
					AddLabel( 52, bottom - (buttons++ * 22), 2100, "Go to Sender" );
				}

				AddLabel(  18, 58, 2100, "Handler:" );

				if ( entry.Handler == null )
				{
                    AddLabelCropped(128, 58, 264, 20, 2100, "Unhandled");

					AddButton( 18, bottom - (buttons * 22), 0xFB1, 0xFB3, 5, GumpButtonType.Reply, 0 );
					AddLabel( 52, bottom - (buttons++ * 22), 2100, "Delete Page" );

                    AddButton(18, bottom - (buttons * 22), 0xFB7, 0xFB9, 4, GumpButtonType.Reply, 0);
                    AddLabel(52, bottom - (buttons++ * 22), 2100, "Handle Page");
				}
				else
				{
					AddLabelCropped( 128, 58, 264, 20, m_AccessLevelHues[(int)entry.Handler.AccessLevel], entry.Handler.Name );

					if ( entry.Handler != m )
					{
						AddButton( 18, bottom - (buttons * 22), 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0 );
						AddLabel( 52, bottom - (buttons++ * 22), 2100, "Go to Handler" );

                        if (m.AccessLevel >= AccessLevel.Seer) //Taran: Seers and above can always delete pages
                        {
                            AddButton(18, bottom - (buttons * 22), 0xFB1, 0xFB3, 5, GumpButtonType.Reply, 0);
                            AddLabel(52, bottom - (buttons++ * 22), 2100, "Delete Page");
                        }
					}
					else
					{
						AddButton( 18, bottom - (buttons * 22), 0xFA2, 0xFA4, 6, GumpButtonType.Reply, 0 );
						AddLabel( 52, bottom - (buttons++ * 22), 2100, "Abandon Page" );

						AddButton( 18, bottom - (buttons * 22), 0xFB7, 0xFB9, 7, GumpButtonType.Reply, 0 );
						AddLabel( 52, bottom - (buttons++ * 22), 2100, "Page Handled" );
					}
				}

				AddLabel(  18, 78, 2100, "Page Location:" );
				AddLabelCropped( 128, 78, 264, 20, 2100, String.Format( "{0} [{1}]", entry.PageLocation, entry.PageMap ) );

				AddButton( 18, bottom - (buttons * 22), 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 );
				AddLabel( 52, bottom - (buttons++ * 22), 2100, "Go to Page Location" );

				if ( entry.SpeechLog != null )
				{
					AddButton( 18, bottom - (buttons * 22), 0xFA5, 0xFA7, 10, GumpButtonType.Reply, 0 );
					AddLabel( 52, bottom - (buttons++ * 22), 2100, "View Speech Log" );
				}

				AddLabel(  18, 98, 2100, "Page Type:" );
				AddLabelCropped( 128, 98, 264, 20, 2100, PageQueue.GetPageTypeName( entry.Type ) );

				AddLabel(  18, 118, 2100, "Message:" );
				AddHtml(  128, 118, 250, 100, entry.Message, true, true );

				AddPage( 2 );

				ArrayList preresp = PredefinedResponse.List;

				AddButton( 18, 18, 0xFAE, 0xFB0, 0, GumpButtonType.Page, 1 );
				AddButton( 410 - 18 - 32, 18, 0xFAB, 0xFAC, 9, GumpButtonType.Reply, 0 );

//.........这里部分代码省略.........
开发者ID:FreeReign,项目名称:imaginenation,代码行数:101,代码来源:PageQueueGump.cs

示例11: Enqueue

        public static void Enqueue(PageEntry entry)
        {
            m_List.Add(entry);
            m_KeyedBySender[entry.Sender] = entry;

            bool isStaffOnline = false;

            foreach (NetState ns in NetState.Instances)
            {
                Mobile m = ns.Mobile;

                #region Page In Queue Gump
                if (m != null && m.IsStaff() && m.AutoPageNotify && !IsHandling(m))
                {
                    m.CloseGump(typeof(PageInQueueGump));
                    m.SendGump(new PageInQueueGump(m));
                    //m.SendMessage( "A new page has been placed in the queue." );
                }
                #endregion

                if (m != null && m.IsStaff() && m.AutoPageNotify && m.LastMoveTime - Core.TickCount < 600000)
                {
                    isStaffOnline = true;
                }
            }

            if (!isStaffOnline)
            {
                entry.Sender.SendMessage(
                    "We are sorry, but no staff members are currently available to assist you.  Your page will remain in the queue until one becomes available, or until you cancel it manually.");
            }

            if (Email.FromAddress != null && Email.SpeechLogPageAddresses != null && entry.SpeechLog != null)
            {
                SendEmail(entry);
            }
        }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:37,代码来源:PageQueue.cs

示例12: Remove

        public static void Remove( PageEntry e )
        {
            if ( e == null )
                return;

            e.Stop();

            m_List.Remove( e );
            m_KeyedBySender.Remove( e.Sender );

            if ( e.Handler != null )
                m_KeyedByHandler.Remove( e.Handler );

            if ( m_List.Count == 0 )
            {
                foreach ( GameClient ns in GameServer.Instance.Clients )
                {
                    Mobile m = ns.Mobile;

                    if ( m != null && m.AccessLevel >= AccessLevel.Counselor )
                        m.CloseGump( typeof( PagePendingGump ) );
                }
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:24,代码来源:PageQueue.cs

示例13: Enqueue

        public static void Enqueue( PageEntry entry )
        {
            m_List.Add( entry );
            m_KeyedBySender[entry.Sender] = entry;

            //bool isStaffOnline = false;

            foreach ( GameClient ns in GameServer.Instance.Clients )
            {
                Mobile m = ns.Mobile;

                if ( m != null && m.AccessLevel >= AccessLevel.Counselor && m.AutoPageNotify && !IsHandling( m ) )
                {
                    m.SendMessage( "A new page has been placed in the queue." );

                    if ( !m.HasGump( typeof( PagePendingGump ) ) )
                        m.SendGump( new PagePendingGump() );
                }

                //if ( m != null && m.AccessLevel >= AccessLevel.Counselor && m.AutoPageNotify && m.LastMoveTime >= ( DateTime.Now - TimeSpan.FromMinutes( 10.0 ) ) )
                //	isStaffOnline = true;
            }

            //if ( !isStaffOnline )
            //	entry.Sender.SendMessage( "We are sorry, but no staff members are currently available to assist you.  Your page will remain in the queue until one becomes available, or until you cancel it manually." );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:26,代码来源:PageQueue.cs

示例14: PageEntryGump

        public PageEntryGump( Mobile m, PageEntry entry )
            : base(30, 30)
        {
            try
            {
                m_Mobile = m;
                m_Entry = entry;

                int buttons = 0;

                int bottom = 356;

                AddPage( 0 );

                AddImageTiled( 0, 0, 410, 486, 2624 );
                AddAlphaRegion( 0, 0, 410, 486 );

                AddPage( 1 );

                AddHtml( 18, 18, 110, 20, Color( "Sent", LabelColor32 ), false, false );
                AddHtml( 128, 18, 264, 20, Color( entry.Sent.ToString(), LabelColor32 ), false, false );

                AddHtml( 18, 38, 110, 20, Color( "Sender", LabelColor32 ), false, false );
                AddHtml( 128, 38, 264, 20, Color( String.Format( "{0} {1} [{2}]", entry.Sender.RawName, entry.Sender.Location, entry.Sender.Map ), LabelColor32 ), false, false );

                // Response Textbox
                AddButton( 18, bottom - ( buttons * 22 ), 0xFAB, 0xFAD, 8, GumpButtonType.Reply, 0 );
                AddImageTiled( 52, bottom - ( buttons * 22 ) + 1, 340, 110, 0xA40 );
                AddImageTiled( 53, bottom - ( buttons * 22 ) + 2, 338, 108, 0xBBC );
                AddTextEntry( 55, bottom - ( buttons++ * 22 ) + 2, 336, 108, 0x480, 0, "" );

                AddButton( 18, bottom - ( buttons * 22 ), 0xFA5, 0xFA7, 0, GumpButtonType.Page, 2 );
                AddHtml( 52, bottom - ( buttons++ * 22 ), 200, 20, Color( "Predefined Response", LabelColor32 ), false, false );

                if ( entry.Sender != m )
                {
                    AddButton( 18, bottom - ( buttons * 22 ), 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
                    AddHtml( 52, bottom - ( buttons++ * 22 ), 200, 20, Color( "Go to Sender", LabelColor32 ), false, false );
                }

                AddHtml( 18, 58, 110, 20, Color( "Handler:", LabelColor32 ), false, false );

                if ( entry.Handler == null )
                {
                    AddHtml( 128, 58, 264, 20, Color( "Unhandled", LabelColor32 ), false, false );

                    AddButton( 18, bottom - ( buttons * 22 ), 0xFB1, 0xFB3, 5, GumpButtonType.Reply, 0 );
                    AddHtml( 52, bottom - ( buttons++ * 22 ), 200, 20, Color( "Delete Page", LabelColor32 ), false, false );

                    AddButton( 18, bottom - ( buttons * 22 ), 0xFB7, 0xFB9, 4, GumpButtonType.Reply, 0 );
                    AddHtml( 52, bottom - ( buttons++ * 22 ), 200, 20, Color( "Handle Page", LabelColor32 ), false, false );
                }
                else
                {
                    AddLabelCropped( 128, 58, 264, 20, m_AccessLevelHues[(int) entry.Handler.AccessLevel], entry.Handler.Name );

                    if ( entry.Handler != m )
                    {
                        AddButton( 18, bottom - ( buttons * 22 ), 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0 );
                        AddHtml( 52, bottom - ( buttons++ * 22 ), 200, 20, Color( "Go to Handler", LabelColor32 ), false, false );
                    }
                    else
                    {
                        AddButton( 18, bottom - ( buttons * 22 ), 0xFA2, 0xFA4, 6, GumpButtonType.Reply, 0 );
                        AddHtml( 52, bottom - ( buttons++ * 22 ), 200, 20, Color( "Abandon Page", LabelColor32 ), false, false );

                        AddButton( 18, bottom - ( buttons * 22 ), 0xFB7, 0xFB9, 7, GumpButtonType.Reply, 0 );
                        AddHtml( 52, bottom - ( buttons++ * 22 ), 200, 20, Color( "Page Handled", LabelColor32 ), false, false );
                    }
                }

                AddHtml( 18, 78, 110, 20, Color( "Page Location:", LabelColor32 ), false, false );
                AddHtml( 128, 78, 264, 20, Color( String.Format( "{0} [{1}]", entry.PageLocation, entry.PageMap ), LabelColor32 ), false, false );

                AddButton( 18, bottom - ( buttons * 22 ), 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 );
                AddHtml( 52, bottom - ( buttons++ * 22 ), 200, 20, Color( "Go to Page Location", LabelColor32 ), false, false );

                if ( entry.SpeechLog != null )
                {
                    AddButton( 18, bottom - ( buttons * 22 ), 0xFA5, 0xFA7, 10, GumpButtonType.Reply, 0 );
                    AddHtml( 52, bottom - ( buttons++ * 22 ), 200, 20, Color( "View Speech Log", LabelColor32 ), false, false );
                }

                AddHtml( 18, 98, 110, 20, Color( "Page Type:", LabelColor32 ), false, false );
                AddHtml( 128, 98, 264, 20, Color( PageQueue.GetPageTypeName( entry.Type ), LabelColor32 ), false, false );

                AddHtml( 18, 118, 110, 20, Color( "Message:", LabelColor32 ), false, false );
                AddHtml( 128, 118, 250, 100, entry.Message, true, true );

                AddPage( 2 );

                ArrayList preresp = PredefinedResponse.List;

                AddButton( 18, 18, 0xFAE, 0xFB0, 0, GumpButtonType.Page, 1 );
                AddButton( 410 - 18 - 32, 18, 0xFAB, 0xFAC, 9, GumpButtonType.Reply, 0 );

                if ( preresp.Count == 0 )
                {
                    AddHtml( 52, 18, 300, 20, Color( "There are no predefined responses.", LabelColor32 ), false, false );
                }
//.........这里部分代码省略.........
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:101,代码来源:PageQueueGump.cs

示例15: Enqueue

        public static void Enqueue( PageEntry entry )
        {
            m_List.Add( entry );
            m_KeyedBySender[entry.Sender] = entry;

            foreach ( NetState ns in NetState.Instances )
            {
                Mobile m = ns.Mobile;

                if ( m != null && m.AccessLevel >= AccessLevel.Counselor && m.AutoPageNotify && !IsHandling( m ) )
                    m.SendAsciiMessage( "A new page has been placed in the queue." );
            }
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:13,代码来源:PageQueue.cs


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