private void StartPulseTimer() { if (_cPulseTimer == null) { _bPulseTimerOn = true; if (_cAnimationDc != null) _cAnimationDc.Dispose(); _cAnimationDc = new cStoreDc(); _cAnimationDc.Width = _cControlDc.Width; _cAnimationDc.Height = _cControlDc.Height; BitBlt(_cAnimationDc.Hdc, 0, 0, _cControlDc.Width, _cControlDc.Height, _cControlDc.Hdc, 0, 0, 0xCC0020); // timer setup _cPulseTimer = new FadeTimer(this); _cPulseTimer.Tick += _cPulseTimer_Tick; _cPulseTimer.Complete += _cPulseTimer_Complete; _cPulseTimer.Interval = (int)AnimationSpeed; _cPulseTimer.Fade(FadeTimer.FadeType.Loop); } }
/// <summary> /// Create the bitmaps, temp dc, and Start the Fade Timer /// </summary> private void StartSwishTimer() { if (_cSwishTimer == null) { _bSwishTimerOn = true; CreateSwish(); // set up the dc if (_cTempDc != null) _cTempDc.Dispose(); _cTempDc = new cStoreDc(); _cTempDc.Width = _cButtonDc.Width; _cTempDc.Height = _cButtonDc.Height; // blit in clean button BitBlt(_cTempDc.Hdc, 0, 0, _cButtonDc.Width, _cButtonDc.Height, _cButtonDc.Hdc, 0, 0, 0xCC0020); // reset stage _tSwishStage = new SwishStage(false); // timer setup _cSwishTimer = new FadeTimer(this); _cSwishTimer.Tick += new FadeTimer.TickDelegate(_cSwishTimer_Tick); _cSwishTimer.Complete += new FadeTimer.CompleteDelegate(_cSwishTimer_Complete); _cSwishTimer.Interval = 10; _cSwishTimer.Fade(FadeTimer.FadeType.Loop); } }
/// <summary> /// Create the images and initiate Fader class /// </summary> private void StartResizeTimer(bool sizein) { if (_cResizeTimer != null) StopResizeTimer(); // start the timer if (_cResizeTimer == null) { CreateResize(); _bResizeTimerOn = true; _cResizeTimer = new FadeTimer(this); _cResizeTimer.Tick += new FadeTimer.TickDelegate(_cResizeTimer_Tick); _cResizeTimer.Complete += new FadeTimer.CompleteDelegate(_cResizeTimer_Complete); _cResizeTimer.Interval = 10; _cResizeTimer.TickMaximum = 8; if (sizein) { _cResizeTimer.TickCount = 8; _cResizeTimer.Fade(FadeTimer.FadeType.FadeOut); } else { _cResizeTimer.Fade(FadeTimer.FadeType.FadeIn); } } }
/// <summary> /// Setup of buffer dc and Fade timer /// </summary> private void StartSwirlTimer() { if (_cSwirlTimer == null) { _bSwirlTimerOn = true; if (_cTempDc != null) _cTempDc.Dispose(); _cTempDc = new cStoreDc(); _cTempDc.Width = _cButtonDc.Width; _cTempDc.Height = _cButtonDc.Height; BitBlt(_cTempDc.Hdc, 0, 0, _cButtonDc.Width, _cButtonDc.Height, _cButtonDc.Hdc, 0, 0, 0xCC0020); // timer setup _cSwirlTimer = new FadeTimer(this); _cSwirlTimer.Tick += new FadeTimer.TickDelegate(_cSwirlTimer_Tick); _cSwirlTimer.Complete += new FadeTimer.CompleteDelegate(_cSwirlTimer_Complete); if (this.Image != null) { if (Image.Width > 128)//v1.1 added some delay adjsutments ju _cSwirlTimer.Interval = 28; else if (Image.Width < 128) _cSwirlTimer.Interval = 36; else _cSwirlTimer.Interval = 32; } else { _cSwirlTimer.Interval = 32; } _cSwirlTimer.Fade(FadeTimer.FadeType.Loop); } }
/// <summary> /// Create dc, and setup Fade Timer /// </summary> private void StartPulseTimer() { if (_cPulseTimer == null) { _bPulseTimerOn = true; _iPulseTick = 0; if (_cTempDc != null) _cTempDc.Dispose(); _cTempDc = new cStoreDc(); _cTempDc.Width = _cButtonDc.Width; _cTempDc.Height = _cButtonDc.Height; // blit clean image in BitBlt(_cTempDc.Hdc, 0, 0, _cButtonDc.Width, _cButtonDc.Height, _cButtonDc.Hdc, 0, 0, 0xCC0020); // timer setup _cPulseTimer = new FadeTimer(this); _cPulseTimer.Tick += new FadeTimer.TickDelegate(_cPulseTimer_Tick); _cPulseTimer.Complete += new FadeTimer.CompleteDelegate(_cPulseTimer_Complete); _cPulseTimer.Interval = 40; _cPulseTimer.Fade(FadeTimer.FadeType.Loop); } }