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


C# Timer.GetHashCode方法代码示例

本文整理汇总了C#中Timer.GetHashCode方法的典型用法代码示例。如果您正苦于以下问题:C# Timer.GetHashCode方法的具体用法?C# Timer.GetHashCode怎么用?C# Timer.GetHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Timer的用法示例。


在下文中一共展示了Timer.GetHashCode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetTimer

		internal override void SetTimer (Timer timer)
		{
			IntPtr	FosterParent=GetFosterParent();
			int	index;

			index = timer.GetHashCode();

			lock (timer_list) {
				timer_list[index]=timer;
			}

			if (Win32SetTimer(FosterParent, index, (uint)timer.Interval, IntPtr.Zero) != IntPtr.Zero)
				timer.window = FosterParent;
			else
				timer.window = IntPtr.Zero;
		}
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:16,代码来源:XplatUIWin32.cs

示例2: KillTimer

		internal override void KillTimer (Timer timer)
		{
			int	index;

			index = timer.GetHashCode();

			Win32KillTimer(timer.window, index);

			lock (timer_list) {
				timer_list.Remove(index);
			}
		}
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:12,代码来源:XplatUIWin32.cs

示例3: SuspendRedraw

 /// <summary>
 /// Takes a time-out value which indicates that redraw shall not occur until: (a) the 
 /// corresponding unsuspendRedraw(suspend_handle_id) call has been made, (b) an 
 /// unsuspendRedrawAll() call has been made, or (c) its timer has timed out. In 
 /// environments that do not support interactivity (e.g., print media), then redraw shall 
 /// not be suspended. suspend_handle_id = suspendRedraw(max_wait_milliseconds) and 
 /// unsuspendRedraw(suspend_handle_id) must be packaged as balanced pairs. When you 
 /// want to suspend redraw actions as a collection of SVG DOM changes occur, then 
 /// precede the changes to the SVG DOM with a method call similar to 
 /// suspend_handle_id = suspendRedraw(max_wait_milliseconds) and follow the changes with 
 /// a method call similar to unsuspendRedraw(suspend_handle_id). Note that multiple 
 /// suspendRedraw calls can be used at once and that each such method call is treated
 /// independently of the other suspendRedraw method calls.
 /// </summary>
 /// <param name="max_wait_milliseconds">The amount of time in milliseconds to hold off 
 /// before redrawing the device. Values greater than 60 seconds will be truncated 
 /// down to 60 seconds.</param>
 /// <returns>A number which acts as a unique identifier for the given suspendRedraw() call. This value must be passed as the parameter to the corresponding unsuspendRedraw() method call.</returns>
 public int SuspendRedraw(int maxWaitMilliseconds)
 {
     if (maxWaitMilliseconds > 60000)
     maxWaitMilliseconds = 60000;
       Timer t = new Timer(maxWaitMilliseconds);
       t.AutoReset = false;
       t.Elapsed += new ElapsedEventHandler(this.RedrawTimerElapsed);
       t.Enabled = true;
       redrawTimers.Add(t);
       return t.GetHashCode();
 }
开发者ID:codebutler,项目名称:savagesvg,代码行数:29,代码来源:SvgSvgElement.cs


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