From 886079b1c55fb241399e5edaf4cd3b3942bbeab7 Mon Sep 17 00:00:00 2001 From: "Valeriano A.R" Date: Wed, 24 Jun 2015 14:34:22 +0200 Subject: [PATCH] Cards: Properties from timming configurability. --- Scrummer/Controls/CardBoardControl.cs | 18 ++++++++++++++++++ Scrummer/Scripts/05. Cards.js | 8 ++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Scrummer/Controls/CardBoardControl.cs b/Scrummer/Controls/CardBoardControl.cs index d367589..8571508 100644 --- a/Scrummer/Controls/CardBoardControl.cs +++ b/Scrummer/Controls/CardBoardControl.cs @@ -20,6 +20,10 @@ namespace Scrummer.Controls private int _timePoolData = 10000; + private int _timeRefresh = 20; + + private int _timeRefreshDisconnected = 5000; + #endregion #region Properties @@ -48,6 +52,18 @@ namespace Scrummer.Controls set { _timePoolData = value; } } + public int TimeRefresh + { + get { return _timeRefresh; } + set { _timeRefresh = value; } + } + + public int TimeRefreshDisconnected + { + get { return _timeRefreshDisconnected; } + set { _timeRefreshDisconnected = value; } + } + #endregion #region Control Life cycle @@ -82,6 +98,8 @@ namespace Scrummer.Controls sbCfg.AppendFormat(" IDCardEvent: \"\",\n"); sbCfg.AppendFormat(" ServiceUrl: \"{0}\",\n", _serviceUrl); sbCfg.AppendFormat(" TimePoolData: {0},\n", _timePoolData); + sbCfg.AppendFormat(" TimeRefresh: {0},\n", _timeRefresh); + sbCfg.AppendFormat(" TimeRefreshDisconnected: {0},\n", _timeRefreshDisconnected); sbCfg.AppendFormat(" Texts: {{\n"); sbCfg.AppendFormat(" Toolbox: \"Toolbox\",\n"); sbCfg.AppendFormat(" AddCard: \"+ Add card\",\n"); diff --git a/Scrummer/Scripts/05. Cards.js b/Scrummer/Scripts/05. Cards.js index a873c1c..60f48f2 100644 --- a/Scrummer/Scripts/05. Cards.js +++ b/Scrummer/Scripts/05. Cards.js @@ -106,8 +106,6 @@ Toolbox.prototype = { pos.x += this.divToolbox.offsetLeft; pos.y += this.divToolbox.offsetTop + this.divToolbox.offsetHeight; var card = new Card(this.cfg, 0, "", "", pos.x, pos.y); - //card.SetDeleteCallback(bindedCardDelete); - //cfg.Cards.push(card); card.InsertInContainer(this.cfg.divBoard); card.EnterEditionMode(); return false; @@ -596,7 +594,7 @@ function RunCardBoard(cfg) { // Reset pool window.setTimeout(function () { RequestCardEventData(); - }, 20); + }, cfg.TimeRefresh); }; var ErrorCardEventData = function () { cfg.Connected = false; @@ -604,7 +602,7 @@ function RunCardBoard(cfg) { // Retry window.setTimeout(function () { RequestCardEventData(); - }, 5000); + }, cfg.TimeRefreshDisconnected); }; // Pool data @@ -618,5 +616,3 @@ function RunCardBoard(cfg) { }; RequestCardEventData(); } - -