This commit is made due to BUG-1775. Although it might not fix it, it ensures that every window has an icon and only than when it loaded. Also added improved error handling.

This commit is contained in:
Robin 2015-04-17 11:06:57 +02:00
parent eed5b66116
commit 7938ab5dad
29 changed files with 32 additions and 34 deletions

View file

@ -18,17 +18,20 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Windows.Forms;
using GreenshotPlugin.Core;
using GreenshotPlugin.UnmanagedHelpers;
using Greenshot.IniFile;
using log4net;
namespace GreenshotPlugin.Controls {
/// <summary>
/// Extend this Form to have the possibility for animations on your form
/// </summary>
public class AnimatingForm : GreenshotForm {
private static readonly ILog LOG = LogManager.GetLogger(typeof(AnimatingForm));
private const int DEFAULT_VREFRESH = 60;
private int vRefresh = 0;
private Timer timer = null;
@ -110,7 +113,11 @@ namespace GreenshotPlugin.Controls {
/// <param name="sender"></param>
/// <param name="e"></param>
void timer_Tick(object sender, EventArgs e) {
Animate();
try {
Animate();
} catch (Exception ex) {
LOG.Warn("An exception occured while animating:", ex);
}
}
/// <summary>