예제 #1
0
        /// <summary>
        /// Delete PMWindow from PMWindowlist
        /// </summary>
        public bool DeletePMWindow(Int16 pId)
        {
            PMWindow PM = this.FindPMWindow(pId);

            PM = null;
            return(PMWindowLister.Remove(pId));
        }
		/// <summary>
		/// Add PMWindow to PMWindowlist (or return PMWindow)
		/// </summary>
		public PMWindow AddPMWindow(Int16 Id)
		{
			PMWindow pl = FindPMWindow(Id);
			
			if (pl == null)
			{
				PMWindow PMWindow = new PMWindow(Id);
				PMWindow.Id = Id;
				PMWindowLister[Id] = PMWindow;
				PMWindowList2.Add(PMWindow);
				return PMWindow;
			}

			return pl;
		}
예제 #3
0
        /// <summary>
        /// Add PMWindow to PMWindowlist (or return PMWindow)
        /// </summary>
        public PMWindow AddPMWindow(Int16 Id)
        {
            PMWindow pl = FindPMWindow(Id);

            if (pl == null)
            {
                PMWindow PMWindow = new PMWindow(Id);
                PMWindow.Id        = Id;
                PMWindowLister[Id] = PMWindow;
                PMWindowList2.Add(PMWindow);
                return(PMWindow);
            }

            return(pl);
        }
        private void SendPM(string[] command)
        {
            Common.Players.GraalPlayer PMPlayer = Framework.FindPlayer(command[1].Trim());

            PMWindowManager = PMWindowList.GetInstance();
            PMWindow PM = PMWindowManager.AddPMWindow(PMPlayer.Id);

            String msg = "";

            for (int i = 2; i < command.Length; i++)
            {
                msg += command[i].Trim() + " ";
            }

            // Turn the string into a CString.
            Core.CString Message = new Core.CString(msg);

            if (PM != null)
            {
                PM.SendMessage(Message);
            }
        }