コード例 #1
0
            private void                BlinkCallback(object state)
            {
                try
                {
                    LineDisplaySimulator sim = wr.Target as LineDisplaySimulator;
                    if (sim != null)
                    {
                        if (sim.State != ControlState.Closed && sim.DeviceEnabled)
                        {
                            // toggle the BlinkOn variable and update the device
                            sim.blinkon = !sim.blinkon;

                            sim.Window.Blink(sim.blinkon);
                        }
                    }
                }
                catch
                {
                    // Eat all exceptions here because the timer may get called while the device
                    // is shutting down or when ScreenMode is changing and the simulator window is
                    // be destroyed and recreated.
                }
            }
コード例 #2
0
 public BlinkTimerClass(LineDisplaySimulator sim)
 {
     wr         = new WeakReference(sim);
     blinkTimer = new System.Threading.Timer(new TimerCallback(BlinkCallback), null, Timeout.Infinite, Timeout.Infinite);
 }
コード例 #3
0
ファイル: LineDisplay.cs プロジェクト: ahaha0807/num_banda
			public BlinkTimerClass(LineDisplaySimulator sim)
			{
				wr = new WeakReference(sim);
				blinkTimer = 	new System.Threading.Timer(new TimerCallback(BlinkCallback), null, Timeout.Infinite, Timeout.Infinite);
			}
コード例 #4
0
 public LineDisplaySimulatorWindow(LineDisplaySimulator serviceObject) : base(serviceObject)
 {
     Invoke(new MethodDelegate(InitializeComponent));
 }
コード例 #5
0
ファイル: LineDisplay.cs プロジェクト: ahaha0807/num_banda
		public LineDisplaySimulatorWindow(LineDisplaySimulator serviceObject) : base(serviceObject)
		{
			Invoke(new MethodDelegate(InitializeComponent));
		}