예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="city"></param>
        /// <param name="page"></param>
        /// <param name="session"></param>
        private KinCityControlGump(KinFactionCities city, int page, GumpSession session, Mobile from)
            : base(page, session, from)
        {
            //This ctor gets called the first time the gump is opened
            m_Data = KinCityManager.GetCityData(city);
            if (m_Data == null)
            {
                return;
            }

            Session["City"] = city;

            //If in the vote stage, sett page to 5 now
            if (m_Data.IsVotingStage)
            {
                Page = 5;
            }

            SetCurrentPage();
            if (MasterPage != null)
            {
                MasterPage.Create();
                if (CurrentPage != null)
                {
                    this.AddPage(1);
                }
            }
            if (CurrentPage != null)
            {
                CurrentPage.Create();
            }
        }
예제 #2
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="city"></param>
		/// <param name="page"></param>
		/// <param name="session"></param>
		private KinGuardPostGump(KinGuardPost guardPost, int page, GumpSession session, Mobile from)
			: base(page, session, from)
		{
			if (Session["GuardPost"] == null)
			{
				Session["GuardPost"] = guardPost;
				SetCurrentPage();
				if (CurrentPage != null) CurrentPage.Create();
			}
			
		}
예제 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="city"></param>
 /// <param name="page"></param>
 /// <param name="session"></param>
 private KinGuardPostGump(KinGuardPost guardPost, int page, GumpSession session, Mobile from)
     : base(page, session, from)
 {
     if (Session["GuardPost"] == null)
     {
         Session["GuardPost"] = guardPost;
         SetCurrentPage();
         if (CurrentPage != null)
         {
             CurrentPage.Create();
         }
     }
 }
예제 #4
0
        public CommitGumpBase(int page, GumpSession session, Mobile from)
            : base(25, 25)
        {
            this.Closable   = true;
            this.Disposable = true;
            this.Dragable   = true;
            this.Resizable  = true;
            m_Page          = page;
            m_From          = from;
            if (session == null)
            {
                //First time creation
                //Create session object and populate entity register
                m_EntityRegister = new Dictionary <int, Type>();
                m_GumpSession    = new GumpSession();
                RegisterEntities();

                m_GumpSession["COMMIT_ENTITY_REGISTER"] = m_EntityRegister;

                //Let the subclass create the pages the first time so its ctor has a chance to fire
            }
            else
            {
                //Restore session and entity register
                m_GumpSession    = session;
                m_EntityRegister = m_GumpSession["COMMIT_ENTITY_REGISTER"] as Dictionary <int, Type>;
                //Set the type of current page to be created
                SetCurrentPage();
                //Create master and current if they exist
                if (MasterPage != null)
                {
                    MasterPage.Create();
                    if (CurrentPage != null)
                    {
                        this.AddPage(1);
                    }
                }
                if (CurrentPage != null)
                {
                    CurrentPage.Create();
                }
            }
        }
예제 #5
0
 public KinGuardPostGump(int page, GumpSession session, Mobile from)
     : this(null, page, session, from)
 {
 }
예제 #6
0
		public KinGuardPostGump(int page, GumpSession session, Mobile from)
			: this(null, page, session, from)
		{

		}
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="KinCityControlGump"/> class.
 /// </summary>
 /// <param name="page">The page.</param>
 /// <param name="session">The session.</param>
 public KinCityControlGump(int page, GumpSession session, Mobile from)
     : base(page, session, from)
 {
     //This ctor is called from a continuation
 }
예제 #8
0
		public CommitGumpBase(int page, GumpSession session, Mobile from)
			: base(25, 25) 
		{
			this.Closable = true;
			this.Disposable = true;
			this.Dragable = true;
			this.Resizable = true;
			m_Page = page;
			m_From = from;
			if (session == null)
			{
				//First time creation
				//Create session object and populate entity register
				m_EntityRegister = new Dictionary<int, Type>();
				m_GumpSession = new GumpSession();
				RegisterEntities();
			
				m_GumpSession["COMMIT_ENTITY_REGISTER"] = m_EntityRegister;

				//Let the subclass create the pages the first time so its ctor has a chance to fire
			}
			else
			{
				//Restore session and entity register
				m_GumpSession = session;
				m_EntityRegister = m_GumpSession["COMMIT_ENTITY_REGISTER"] as Dictionary<int, Type>;
				//Set the type of current page to be created 
				SetCurrentPage();
				//Create master and current if they exist
				if (MasterPage != null)
				{
					MasterPage.Create();
					if (CurrentPage != null) this.AddPage(1);
				}
				if (CurrentPage != null) CurrentPage.Create();
			}
			

		}