Example #1
0
 public ButtonPlus( int x, int y, int normalID, int pressedID, int buttonID, string name, TimerStateCallback back, object param )
     : base(x, y, normalID, pressedID, buttonID, GumpButtonType.Reply, 0)
 {
     c_Name = name;
     c_Callback = back;
     c_Param = param;
 }
Example #2
0
		public ChoiceGump( Mobile m, string title, int width, TimerStateCallback callback, Hashtable table ) : base( m, 100, 100 )
		{
			c_Title = title;
			c_Width = width;
			c_Callback = callback;
			c_Table = table;

			NewGump();
		}
Example #3
0
        public void AddButton( int x, int y, int up, int down, string name, TimerStateCallback callback, object arg )
        {
            int id = UniqueButton();

            ButtonPlus button = new ButtonPlus( x, y, up, down, id, name, callback, arg );

            Add( button );

            c_Buttons[id] = button;
        }
		public ResponseGump( Mobile m, int width, int height, string text, string title, TimerStateCallback callback ) : base( m, 100, 100 )
		{
			c_Width = width;
			c_Height = height;
			c_Text = text;
			c_Title = title;
			c_Callback = callback;

			NewGump();
		}
Example #5
0
 public static Timer DelayCall <T>(TimeSpan delay, TimerStateCallback <T> callback, T state)
 {
     return(DelayCall(delay, TimeSpan.Zero, 1, callback, state));
 }
Example #6
0
 public static Timer DelayCall(TimeSpan delay, TimerStateCallback callback, object state)
 {
     return(DelayCall(delay, TimeSpan.Zero, 1, callback, state));
 }
Example #7
0
        public void AddTemplateButton(int x, int y, int w, Template t, string name, string text, TimerStateCallback callback, object arg, bool over)
        {
            int id = UniqueButton();

            ButtonPlus button = new ButtonPlus(x, y, 0x0, 0x0, id, name, callback, arg);

            button.Template = t;
            Add(button);
            c_Buttons[id] = button;

            HtmlPlus html = new HtmlPlus(x, y, w, 21, text, false, false, over);

            html.Template = t;
            Add(html);

            ButtonTemplate.ApplyTemplate(button, html, t);
        }
Example #8
0
 public StateCallTimer(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback callback, object state)
     : base(delay, interval, count)
 {
     fCallback = callback;
     fState    = state;
 }
Example #9
0
        public static Timer DelayCall <T>(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback <T> callback, T state)
        {
            Timer t = new DelayStateCallTimer <T>(delay, interval, count, callback, state);

            if (count == 1)
            {
                t.Priority = ComputePriority(delay);
            }
            else
            {
                t.Priority = ComputePriority(interval);
            }

            t.Start();

            return(t);
        }
Example #10
0
			public DelayStateCallTimer( TimeSpan delay, TimeSpan interval, int count, TimerStateCallback callback, object state ) : base( delay, interval, count )
			{
				m_Callback = callback;
				m_State = state;

				RegCreation();
			}
Example #11
0
 public static Timer DelayCall <T1, T2, T3>(TimeSpan delay, TimerStateCallback <T1, T2, T3> callback, T1 state1, T2 state2, T3 state3)
 {
     return(DelayCall(delay, TimeSpan.Zero, 1, callback, state1, state2, state3));
 }
Example #12
0
 public static Timer DelayCall <T1, T2>(TimeSpan delay, TimeSpan interval, TimerStateCallback <T1, T2> callback, T1 state1, T2 state2)
 {
     return(DelayCall(delay, interval, 0, callback, state1, state2));
 }
Example #13
0
 public static Timer DelayCall <T1, T2>(TimerStateCallback <T1, T2> callback, T1 state1, T2 state2)
 {
     return(DelayCall(TimeSpan.Zero, TimeSpan.Zero, 1, callback, state1, state2));
 }
Example #14
0
        public static Timer DelayCall <T>(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback <T> callback, T state)
        {
            Timer t = new DelayStateCallTimer <T>(delay, interval, count, callback, state)
            {
                Priority = ComputePriority(count == 1 ? delay : interval)
            };

            t.Start();

            return(t);
        }
Example #15
0
 public InternalPicker(TimerStateCallback callback) : base(0x1018)
 {
     c_Callback = callback;
 }
Example #16
0
 public static void SendTo( Mobile m, string title, int width, TimerStateCallback callback, Hashtable table )
 {
     new ChoiceGump( m, title, width, callback, table );
 }
Example #17
0
		public void AddTemplateButton( int x, int y, int w, Template t, string name, string text, TimerStateCallback callback, object arg )
		{
			AddTemplateButton( x, y, w, t, name, text, callback, arg, true );
		}
Example #18
0
 public static Timer DelayCall <T1, T2, T3, T4>(TimerStateCallback <T1, T2, T3, T4> callback, T1 state1, T2 state2, T3 state3, T4 state4)
 {
     return(DelayCall(TimeSpan.Zero, TimeSpan.Zero, 1, callback, state1, state2, state3, state4));
 }
Example #19
0
		public static Timer DelayCall( TimeSpan delay, TimeSpan interval, TimerStateCallback callback, object state )
		{
			return DelayCall( delay, interval, 0, callback, state );
		}
Example #20
0
 public static Timer DelayCall <T1, T2, T3, T4>(TimeSpan delay, TimeSpan interval, TimerStateCallback <T1, T2, T3, T4> callback, T1 state1, T2 state2, T3 state3, T4 state4)
 {
     return(DelayCall(delay, interval, 0, callback, state1, state2, state3, state4));
 }
Example #21
0
 // Methods
 public DelayStateCallTimer(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback callback, object state) : base(delay, interval, count)
 {
     this.m_Callback = callback;
     this.m_State    = state;
     this.RegCreation();
 }
Example #22
0
        public static Timer DelayCall <T1, T2, T3, T4>(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback <T1, T2, T3, T4> callback, T1 state1, T2 state2, T3 state3, T4 state4)
        {
            Timer t = new DelayStateCallTimer <T1, T2, T3, T4>(delay, interval, count, callback, state1, state2, state3, state4)
            {
                Priority = ComputePriority(count == 1 ? delay : interval)
            };

            t.Start();

            return(t);
        }
Example #23
0
        /// <summary>
        /// Invokes repeatedly the specified callback function on the specified interval and/or delay.
        /// </summary>
        /// <param name="delay">Specifies the amount of time to wait before invoking the first callback.</param>
        /// <param name="interval">Specifies the interval of the repetition.</param>
        /// <param name="count">Specifies the maximum amount of calls. (0 = unlimited)</param>
        /// <param name="callback">Specifies the callback to invoke.</param>
        /// <param name="state">Specifies a state object which will be passed to the callback function.</param>
        /// <returns>Returns the timer object used for this operation.</returns>
        public static Timer PeriodicCall <T>(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback <T> callback, T state)
        {
            Timer t = new StateCallTimer <T>(delay, interval, 0, callback, state);

            t.Priority = (count == 1) ? GetPriority(delay) : GetPriority(interval);
            t.Start();
            return(t);
        }
Example #24
0
        public static Timer DelayCall <T>(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback <T> callback, T state)
        {
            Timer t = new DelayStateCallTimer <T>(delay, interval, count, callback, state);

            t.Start();

            return(t);
        }
Example #25
0
 public void AddTemplateButton(int x, int y, int w, Template t, string name, string text, TimerStateCallback callback, object arg)
 {
     AddTemplateButton(x, y, w, t, name, text, callback, arg, true);
 }
Example #26
0
 public ButtonPlus(int x, int y, int normalID, int pressedID, int buttonID, string name, TimerStateCallback back, object param) : base(x, y, normalID, pressedID, buttonID, GumpButtonType.Reply, 0)
 {
     c_Name     = name;
     c_Callback = back;
     c_Param    = param;
 }
Example #27
0
 public void AddButton(int x, int y, int up, int down, TimerStateCallback callback, object arg)
 {
     AddButton(x, y, up, down, "None", callback, arg);
 }
Example #28
0
 public DelayStateCallTimer(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback callback, object state)
     : base(delay, interval, count)
 {
     Callback = callback;
     State = state;
 }
Example #29
0
 public static Timer DelayCall(TimeSpan delay, TimeSpan interval, TimerStateCallback callback, object state)
 {
     return(DelayCall(delay, interval, 0, callback, state));
 }
 public static Timer DelayCall <T1, T2, T3, T4>(
     TimeSpan delay, TimeSpan interval,
     TimerStateCallback <T1, T2, T3, T4> callback, T1 t1, T2 t2, T3 t3, T4 t4
     ) =>
 DelayCall(delay, interval, 0, callback, t1, t2, t3, t4);
Example #31
0
 public InternalPicker( TimerStateCallback callback )
     : base(0x1018)
 {
     c_Callback = callback;
 }
 public static Timer DelayCall <T>(TimerStateCallback <T> callback, T state) =>
 DelayCall(TimeSpan.Zero, TimeSpan.Zero, 1, callback, state);
Example #33
0
		public void AddButton( int x, int y, int up, int down, TimerStateCallback callback, object arg )
		{
			AddButton( x, y, up, down, "None", callback, arg );
		}
 public static Timer DelayCall <T1, T2>(TimeSpan delay, TimerStateCallback <T1, T2> callback, T1 t1, T2 t2) =>
 DelayCall(delay, TimeSpan.Zero, 1, callback, t1, t2);
Example #35
0
		public void AddTemplateButton( int x, int y, int w, Template t, string name, string text, TimerStateCallback callback, object arg, bool over )
		{
			int id = UniqueButton();

			ButtonPlus button = new ButtonPlus( x, y, 0x0, 0x0, id, name, callback, arg );
			button.Template = t;
			Add( button );
			c_Buttons[id] = button;

			HtmlPlus html = new HtmlPlus( x, y, w, 21, text, false, false, over );
			html.Template = t;
			Add( html );

			ButtonTemplate.ApplyTemplate( button, html, t );
		}
 public static Timer DelayCall <T1, T2>(
     TimeSpan delay, TimeSpan interval, TimerStateCallback <T1, T2> callback,
     T1 t1, T2 t2
     ) => DelayCall(delay, interval, 0, callback, t1, t2);
Example #37
0
		public static Timer DelayCall( TimeSpan delay, TimerStateCallback callback, object state )
		{
			return DelayCall( delay, TimeSpan.Zero, 1, callback, state );
		}
 public static Timer DelayCall <T1, T2, T3>(TimerStateCallback <T1, T2, T3> callback, T1 t1, T2 t2, T3 t3) =>
 DelayCall(TimeSpan.Zero, TimeSpan.Zero, 1, callback, t1, t2, t3);
Example #39
0
		public static Timer DelayCall( TimeSpan delay, TimeSpan interval, int count, TimerStateCallback callback, object state )
		{
			Timer t = new DelayStateCallTimer( delay, interval, count, callback, state );

			if ( count == 1 )
				t.Priority = ComputePriority( delay );
			else
				t.Priority = ComputePriority( interval );

			t.Start();

			return t;
		}
Example #40
0
 public static Timer DelayCall <T>(TimeSpan delay, TimeSpan interval, TimerStateCallback <T> callback, T state)
 {
     return(DelayCall(delay, interval, 0, callback, state));
 }
Example #41
0
 public static void SendTo( Mobile m, int width, int height, string text, string title, TimerStateCallback callback )
 {
     new ResponseGump( m, width, height, text, title, callback );
 }
Example #42
0
 public static Server.Timer DelayCall(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback callback, object state)
 {
     Server.Timer timer1 = new DelayStateCallTimer(delay, interval, count, callback, state);
     if (count == 1)
     {
         timer1.Priority = Server.Timer.ComputePriority(delay);
     }
     else
     {
         timer1.Priority = Server.Timer.ComputePriority(interval);
     }
     timer1.Start();
     return(timer1);
 }