Samples Silverlight The next function ensures that the values are read and output. It is important here that the address of the variable is correctly specified by Machine.pro for reading. function processReqChange() { /* readyStates:
0 = uninitialized 1 = loading 2 = loaded 3 = interactive 4 = complete */ if (req.readyState == 4) { // only if "OK"if (req.status == 200) { response = req.responseXML.documentElement; inuse = false; try//check if there was an error in the request { errortext = response.getElementsByTagName('faultstring')[0].firstChild.data; try { errorcode = response.getElementsByTagName('errorcode')[0].firstChild.data; } catch (e){errorcode="-";} alert(errortext + " ("+errorcode+")"); return; } catch (e) { errorcode=0; } var data; try// if the server returns a element decode it, otherwise (write request) do nothing { data = response.getElementsByTagName('ppData')[0].firstChild.data; mode = "read"; } catch (e) { data = ""; mode = ""; } if (mode=="read") { try { data = b64t2d(data); //decode result string steps = toInt(data.substr(1, 2)); bool = toInt(data.substr(5,2)); bool2 = toInt(data.substr(4,2)); count = toInt(data.substr(3, 2)); speed = toInt(data.substr(6, 2)); } catch (e) { alert("Parsing Failed:" + e); return; } vProgressbar.Width = 306.321/100*steps*4; if (bool2 != "1") { vCount.Text = count.toString();} if (bool == "1") TX1000 26 Version:
1.2