Cleanup of the AboutForm, changed the Style to a "FixedToolWindow", I find this more professional. Changed the AnimatingForm to have a flag, EnableAnimation, which is false by default and makes it possible to make the Form the base form of all GreenshotForm forms. Renamed the conf -> coreConfiguration, as this is already in the base class. Also added some comments.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2367 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-12-07 16:31:20 +00:00
parent b7cfe23605
commit 57e4a8dd73
9 changed files with 89 additions and 33 deletions

View file

@ -33,6 +33,14 @@ namespace GreenshotPlugin.Controls {
private int vRefresh = 0;
private Timer timer = null;
/// <summary>
/// This flag specifies if any animation is used
/// </summary>
protected bool EnableAnimation {
get;
set;
}
/// <summary>
/// Vertical Refresh Rate
/// </summary>
@ -74,12 +82,13 @@ namespace GreenshotPlugin.Controls {
/// Initialize the animation
/// </summary>
protected AnimatingForm() {
timer = new Timer();
timer.Interval = 1000 / VRefresh;
timer.Tick += new EventHandler(timer_Tick);
this.Load += delegate {
timer.Start();
if (EnableAnimation) {
timer = new Timer();
timer.Interval = 1000 / VRefresh;
timer.Tick += new EventHandler(timer_Tick);
timer.Start();
}
};
// Unregister at close