ndt-dev - [ndt-dev] [ndt] r942 committed - Added text indicating percentage of tests completed in flash client
Subject: NDT-DEV email list created
List archive
[ndt-dev] [ndt] r942 committed - Added text indicating percentage of tests completed in flash client
Chronological Thread
- From:
- To:
- Subject: [ndt-dev] [ndt] r942 committed - Added text indicating percentage of tests completed in flash client
- Date: Thu, 20 Feb 2014 11:01:54 +0000
Revision: 942
Author:
Date: Thu Feb 20 11:01:38 2014 UTC
Log: Added text indicating percentage of tests completed in flash client
http://code.google.com/p/ndt/source/detail?r=942
Modified:
/branches/FlashIssue115/flash-client/src/GUI.as
/branches/FlashIssue115/flash-client/src/NDTPController.as
=======================================
--- /branches/FlashIssue115/flash-client/src/GUI.as Sun Feb 2 19:14:17 2014 UTC
+++ /branches/FlashIssue115/flash-client/src/GUI.as Thu Feb 20 11:01:38 2014 UTC
@@ -46,6 +46,7 @@
private var _startButton:Sprite;
private var _consoleText:TextField;
+ private var _progressText:TextField;
private var _resultsTextField:TextField;
private var _summaryResultText:String;
private var _resultsButton:Sprite;
@@ -158,10 +159,29 @@
_consoleText.x = 0.02 * _stageWidth;
_consoleText.y = 0.02 * _stageHeight;
_consoleText.width = 0.96 * _stageWidth;
- _consoleText.height = 0.96 * _stageHeight;
+ _consoleText.height = 0.9 * _stageHeight;
+
+ _progressText = new TextField();
+ _progressText.x = 0.02 * _stageWidth;
+ _progressText.y = 0.95 * _stageHeight;
+ _progressText.width = 0.96 * _stageWidth;
+ _progressText.height = 0.06 * _stageHeight;
+ var textFormat:TextFormat = new TextFormat();
+ textFormat.size = 14;
+ textFormat.font = "Verdana";
+ textFormat.color = 0x000000;
+ textFormat.align = TextFormatAlign.RIGHT;
+ _progressText.defaultTextFormat = textFormat;
+ updateProgressText(0);
+
this.addChild(_consoleText);
+ this.addChild(_progressText);
_callerObj.startNDTTest();
}
+
+ public function updateProgressText(progress:int):void {
+ _progressText.text = "Tests completed: " + progress + "%";
+ }
private function hideInitialScreen():void {
while (this.numChildren > 0)
=======================================
--- /branches/FlashIssue115/flash-client/src/NDTPController.as Sun Feb 2 19:14:17 2014 UTC
+++ /branches/FlashIssue115/flash-client/src/NDTPController.as Thu Feb 20 11:01:38 2014 UTC
@@ -42,6 +42,7 @@
private var _remoteTestResults:String;
private var _testsToRun:Array;
private var _testStage:int;
+ private var _currentTest:int = 0;
public function NDTPController(hostname:String) {
_hostname = hostname;
@@ -113,9 +114,14 @@
}
public function runTests():void {
- if (_testsToRun.length > 0) {
- var currentTest:int = parseInt(_testsToRun.shift());
- switch (currentTest) {
+ if (Main.guiEnabled) {
+ Main.gui.updateProgressText(_currentTest / _testsToRun.length * 100);
+ }
+
+ if (_testsToRun.length > _currentTest) {
+ var currentTestCode:int = parseInt(_testsToRun[_currentTest]);
+ _currentTest++;
+ switch (currentTestCode) {
case TestType.C2S:
var c2s:TestC2S = new TestC2S(_ctlSocket, _hostname, this);
c2s.run();
@@ -244,6 +250,7 @@
TestResults.interpretResults();
if (Main.guiEnabled) {
+ Main.gui.updateProgressText(100);
Main.gui.displayResults();
}
}
- [ndt-dev] [ndt] r942 committed - Added text indicating percentage of tests completed in flash client, ndt, 02/20/2014
Archive powered by MHonArc 2.6.16.