Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

301 lines
9.9 KiB

  1. <HTML>
  2. <HEAD>
  3. #include "header.inc"
  4. #include "debug_js.inc"
  5. #include "constants.inc"
  6. <TITLE>Remote Assistance Settings</TITLE>
  7. <meta http-equiv="MSThemeCompatible" content="Yes">
  8. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  9. <LINK id="UI_StyleSheet1" REL="stylesheet" TYPE="text/css" HREF="hcp://system/css/shared.css">
  10. <LINK id="UI_StyleSheet" REL="stylesheet" TYPE="text/css" HREF="../../Css/rc.css">
  11. <Script id="script1" name="script1" Language="javascript">
  12. var vArgs=window.dialogArguments;
  13. var L_ERRACCESSDENIED_Text = "Directly launching this page is not allowed. ";
  14. var L_RCCTL_Text = "Remote Assistance failed. Please try again. ";
  15. //
  16. // VOIP Messages
  17. //
  18. var L_ERRVOIP2_Text = c_szVoiceError;
  19. /*
  20. Function : OnApply()
  21. Description : Gets called when the Apply button is pressed.
  22. This apply the settings based upon the options selected
  23. */
  24. function OnApply()
  25. {
  26. InitTrace();
  27. TraceFunctEnter("OnApply");
  28. try
  29. {
  30. if (optSS.checked)
  31. {
  32. vArgs[0].frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.EnableSmartSizing=true;
  33. vArgs[0].frames.idFrameStatus.Helper_UpdateMode(1);
  34. vArgs[1].SetProfileString("Scaling", 1);
  35. }
  36. else if(optAS.checked)
  37. {
  38. vArgs[0].frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.EnableSmartSizing=false;
  39. vArgs[0].frames.idFrameStatus.Helper_UpdateMode(0);
  40. vArgs[1].SetProfileString("Scaling", 0);
  41. }
  42. // We need to change the Voice Compression if a radio button setting has been modified
  43. if ((optStd.checked == true) && (vArgs[0].g_VoipBandwidth == 1))
  44. {
  45. // Caught a change from high to low, set the SamplingRate property
  46. vArgs[0].g_oSAFRemoteAssistanceHelper.m_oSAFIntercomClient.SamplingRate = 1;
  47. // Send a message to the server (helpee)
  48. vArgs[0].Helper_SendControlCommand( c_szVoipBandwidthToLow)
  49. // Change state variable from 1 to 0
  50. vArgs[0].g_VoipBandwidth = 0;
  51. } else if ((optHigh.checked == true) && (vArgs[0].g_VoipBandwidth == 0))
  52. {
  53. // Caught a change from low to high, set the SamplingRate property
  54. vArgs[0].g_oSAFRemoteAssistanceHelper.m_oSAFIntercomClient.SamplingRate = 2;
  55. // Send a message to the server (helpee)
  56. vArgs[0].Helper_SendControlCommand( c_szVoipBandwidthToHigh)
  57. // Change state variable from 0 to 1
  58. vArgs[0].g_VoipBandwidth = 1;
  59. }
  60. }
  61. catch(error)
  62. {
  63. vArgs[0].FatalError(L_RCCTL_Text,error);
  64. }
  65. TraceFunctLeave();
  66. }
  67. /*
  68. Function : Tuning()
  69. Description : Gets called when the Audio Tuning Wizard button is pressed.
  70. */
  71. function Tuning()
  72. {
  73. TraceFunctEnter("Tuning");
  74. var lRet = 0;
  75. try
  76. {
  77. vArgs[0].g_oSAFRemoteAssistanceHelper.m_oSAFIntercomClient.RunSetupWizard();
  78. // Send a message to the server that the SetupWizard succeeded
  79. vArgs[0].Helper_SendControlCommand( c_szVoipWizardGood);
  80. // set me to good
  81. vArgs[0].g_stateVoipMe = 1;
  82. // Now we make the check to see if we can enable voice.
  83. // If me and you are good < 2 then enable
  84. if ( (vArgs[0].g_stateVoipMe < 2) && (vArgs[0].g_stateVoipYou < 2) )
  85. {
  86. // Ungray voice button
  87. #ifdef _OLDTOOLBAR
  88. vArgs[0].frames.idFrameTools.btnVoice.disabled = false;
  89. #else
  90. vArgs[0].frames.idFrameTools.idTB.SetState( "btnVoice", true );
  91. #endif
  92. vArgs[0].g_bStartEnabled = true;
  93. vArgs[0].g_bVoIPEnabled = true;
  94. }
  95. }
  96. catch(error)
  97. {
  98. vArgs[0].g_bVoIPEnabled = false;
  99. vArgs[0].DisplayMessage(L_ERRVOIP2_Text);
  100. // set me to bad
  101. vArgs[0].g_stateVoipMe = 2;
  102. // gray voice button
  103. #ifdef _OLDTOOLBAR
  104. vArgs[0].frames.idFrameTools.btnVoice.disabled = true;
  105. #else
  106. vArgs[0].frames.idFrameTools.idTB.SetState( "btnVoice", false );
  107. #endif
  108. // vArgs[0].g_bStartEnabled = false;
  109. // Send a message to the server that the SetupWizard failed
  110. vArgs[0].Helper_SendControlCommand( c_szVoipWizardBad);
  111. }
  112. TraceFunctLeave();
  113. }
  114. /*
  115. Function : OnLoad()
  116. Description : Gets called on the load of the page.
  117. Options are initialised based upon the settings recorded.
  118. */
  119. function OnLoad()
  120. {
  121. TraceFunctEnter("OnLoad");
  122. try
  123. {
  124. if (vArgs[1].GetProfileString("Scaling")==1)
  125. {
  126. optSS.checked=true;
  127. }
  128. else
  129. {
  130. optAS.checked=true;
  131. }
  132. // Show current compression setting through the 'rdAS' radio button
  133. if (vArgs[0].g_VoipBandwidth == 0)
  134. {
  135. optStd.checked = true;
  136. }
  137. else
  138. {
  139. optHigh.checked = true;
  140. }
  141. // Disable the Audio wizard button if we are on a voice session
  142. if ((vArgs[0].g_bVoipConnected == true))
  143. {
  144. btnATW.disabled = true;
  145. }
  146. else
  147. btnATW.disabled = false;
  148. }
  149. catch(error)
  150. {
  151. idBody.style.visibility = "hidden";
  152. alert( L_ERRACCESSDENIED_Text );
  153. return;
  154. }
  155. TraceFunctLeave();
  156. }
  157. </Script>
  158. </HEAD>
  159. <BODY onLoad="OnLoad();" id="idBody" name="idBody" class="sys-inlineform-bgcolor1">
  160. <Table name="idMainTable" id="idMainTable" cellspacing="0" cellpadding="0" border=0 class="MaxLayout">
  161. <TR>
  162. <TD class="padding6 padding3">
  163. <Table id="T1" name="T1" border=0 cellpadding="0" cellspacing="0" class="MaxLayout">
  164. <TR>
  165. <TD class="padding5 valigntop">
  166. <Fieldset id="F0TD0TR1TD0TR0T0" name="F0TD0TR1TD0TR0T0" class="padding3 padding4 padding6 padding7">
  167. <Legend id="L0TD0TR1TD0TR0T0" name="L0TD0TR1TD0TR0T0" class="sys-font-body sys-color-body">
  168. Audio
  169. </Legend>
  170. <Table cellpadding=0 cellspacing=0 border=0 name="idContainer1" name="idContainer1" class="MaxLayout">
  171. <TR>
  172. <TD class="height5">
  173. </TD>
  174. </TR>
  175. <TR>
  176. <TD>
  177. <Input type="radio" name="rdAS" id="optStd" checked>
  178. <Label id="LA0rdAS" name="LA0rdAS" For="optStd" class="sys-font-body sys-color-body">
  179. Standard quality
  180. </Label>
  181. </TD>
  182. </TR>
  183. <TR>
  184. <TD>
  185. <Input type="radio" name="rdAS" id="optHigh">
  186. <Label id="L0rdAS" name="L0rdAS" For="optHigh" class="sys-font-body sys-color-body">
  187. High quality (requires a high-speed Internet connection)
  188. </Label>
  189. </TD>
  190. </TR>
  191. <TR>
  192. <TD class="height15">
  193. </TD>
  194. </TR>
  195. <TR>
  196. <TD id="idbtn" name="idbtn" align="right" class="padding2">
  197. #if 0
  198. <Div id="D3" name="D3">
  199. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  200. </Div>
  201. #endif
  202. <Button name="btnATW" id="btnATW" onClick="Tuning();" class="sys-font-body sys-color-body" accesskey="T">
  203. Audio <u id="btnATWT1" name="btnATWT1">T</u>uning Wizard ....
  204. </Button>
  205. </TD>
  206. </TR>
  207. </Table>
  208. </Fieldset>
  209. </TD>
  210. </TR>
  211. <TR id="TR2TD0TR0T0" name="TR2TD0TR0T0">
  212. <TD id="TD0TR2TD0TR0T0" name="TD0TR2TD0TR0T0" class="padding5 valigntop">
  213. <Fieldset id="F0TD0TR2TD0TR0T0" name="F0TD0TR2TD0TR0T0" class="padding3 padding4 padding6 padding7">
  214. <Legend id="L0F0TD0TR2TD0TR0T0" name="L0F0TD0TR2TD0TR0T0" class="sys-font-body sys-color-body">
  215. Default screen view
  216. </Legend>
  217. <Table cellpadding=0 cellspacing=0 border=0 name="idContainer2" name="idContainer2" class="MaxLayout">
  218. <TR>
  219. <TD class="height5">
  220. </TD>
  221. </TR>
  222. <TR>
  223. <TD>
  224. <Input type="radio" name="rdSS" id="optSS" checked>
  225. <Label id="LA0F0TD0TR2TD0TR0T0" name="LA0F0TD0TR2TD0TR0T0" For="optSS" class="sys-font-body sys-color-body">
  226. Scale to window
  227. </Label>
  228. </TD>
  229. </TR>
  230. <TR>
  231. <TD>
  232. <Input type="radio" name="rdSS" id="optAS">
  233. <Label id="LA1F0TD0TR2TD0TR0T0" name="LA1F0TD0TR2TD0TR0T0" For="optAS" class="sys-font-body sys-color-body">
  234. Actual size
  235. </Label>
  236. </TD>
  237. </TR>
  238. </Table>
  239. </Fieldset>
  240. </TD>
  241. </TR>
  242. <TR>
  243. <TD class="height8">
  244. </TD>
  245. </TR>
  246. <TR id="TR3TD0TR0T0" name="TR3TD0TR0T0">
  247. <TD id="TD0TR3TD0TR0T0" name="TD0TR3TD0TR0T0" align="right">
  248. <Button id="btnOK" name="btnOK" Onclick="OnApply();window.close();" class="styBtnWidth sys-font-body sys-color-body" accesskey="O"><U>O</U>K</Button>
  249. <Span id="idblankSpace1" name="idblankSpace1" class="width8"></Span>
  250. <Button id="btnCancel" name="btnCancel" OnClick="window.close();" class="styBtnWidth sys-font-body sys-color-body" accesskey="C"><U>C</U>ancel</Button>
  251. <Span id="idblankSpace2" name="idblankSpace2" class="width8"></Span>
  252. <Button id="btnApply" name="btnApply" Onclick="OnApply();" class="styBtnWidth sys-font-body sys-color-body" accesskey="A"><U>A</U>pply</Button>
  253. </TD>
  254. </TR>
  255. </Table>
  256. </TD>
  257. </TR>
  258. </Table>
  259. </BODY>
  260. </HTML>