|
using System;
using System.Drawing;
namespace CP.Apps.ScreenSaver
{
public interface IEffectManager
{
event EventHandler NoEffect;
Color BackColor
{
get;
set;
}
System.Drawing.Rectangle DisplayArea
{
get;
}
IEffect Effect
{
get;
set;
}
void ProgressEffect();
}
public class EffectCompleteEventArgs : EventArgs
{
private IEffectManager effectManager;
private System.Drawing.Graphics graphics;
public EffectCompleteEventArgs(IEffectManager mgr, Graphics g)
{
this.effectManager = mgr;
this.graphics = g;
}
public IEffectManager EffectManager
{
get
{
return effectManager;
}
}
public System.Drawing.Graphics Graphics
{
get
{
return this.graphics;
}
}
}
public delegate void EffectCompleteEventHandler(object sender, EffectCompleteEventArgs e);
/// <summary>
/// Encapsulates an effect that happens on the screen saver like animation etc.
/// </summary>
public interface IEffect
{
event EffectCompleteEventHandler EffectComplete;
void Draw(Graphics g);
bool Progress();
void End(Graphics g, IEffectManager em);
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.