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.

260 lines
7.6 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 id="meta1" name="meta1" 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" name="UI_StyleSheet" REL="stylesheet" TYPE="text/css" HREF="../../Css/rc.css">
  11. <Script id="LocalScript" name="LocalScript" 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. TraceFunctEnter("OnApply");
  27. try
  28. {
  29. // We need to change the Voice Compression if a radio button setting has been modified
  30. if ((optStd.checked == true) && (vArgs[0].g_VoipBandwidth == 1))
  31. {
  32. // Caught a change from high to low, set the SamplingRate property
  33. vArgs[0].g_Helpee_oSAFIntercomServer.SamplingRate = 1;
  34. // Change state variable from 1 to 0
  35. vArgs[0].g_VoipBandwidth = 0;
  36. // Send a message to client (helper)
  37. vArgs[0].Helpee_SendControlCommand( c_szVoipBandwidthToLow);
  38. } else if ((optHigh.checked == true) && (vArgs[0].g_VoipBandwidth == 0))
  39. {
  40. // Caught a change from low to high, set the SamplingRate property
  41. vArgs[0].g_Helpee_oSAFIntercomServer.SamplingRate = 2;
  42. // Change state variable from 0 to 1
  43. vArgs[0].g_VoipBandwidth = 1;
  44. // Send a message to client (helper)
  45. vArgs[0].Helpee_SendControlCommand( c_szVoipBandwidthToHigh);
  46. }
  47. }
  48. catch(error)
  49. {
  50. vArgs[0].FatalError(L_RCCTL_Text,error);
  51. }
  52. TraceFunctLeave();
  53. }
  54. /*
  55. Function : Tuning()
  56. Description : Gets called when the Audio Tuning Wizard button is pressed.
  57. */
  58. function Tuning()
  59. {
  60. TraceFunctEnter("Tuning");
  61. lRet = 0;
  62. try
  63. {
  64. vArgs[0].g_Helpee_oSAFIntercomServer.RunSetupWizard();
  65. // Send a message to the client that the SetupWizard succeeded
  66. vArgs[0].Helpee_SendControlCommand( c_szVoipWizardGood);
  67. // set me to good
  68. vArgs[0].g_stateVoipMe = 1;
  69. // Now we make the check to see if we can enable voice.
  70. // If me and you are good < 2 then enable
  71. if ( (vArgs[0].g_stateVoipMe < 2) && (vArgs[0].g_stateVoipYou < 2) )
  72. {
  73. // Enable voice
  74. #ifndef _HSSTOOLBAR
  75. vArgs[0].frames.idFrameTools.btnVoice.disabled = false;
  76. vArgs[0].frames.idFrameTools.txtVoice.disabled = false;
  77. #else
  78. vArgs[0].frames.idFrameTools.EnableButton( "btnVoice" );
  79. #endif
  80. vArgs[0].g_bStartEnabled = true;
  81. vArgs[0].g_bVoIPEnabled = true;
  82. }
  83. }
  84. catch(error)
  85. {
  86. vArgs[0].g_bVoIPEnabled = false;
  87. vArgs[0].DisplayMessage(L_ERRVOIP2_Text);
  88. // set me to bad
  89. vArgs[0].g_stateVoipMe = 2;
  90. // gray voice button
  91. #ifndef _HSSTOOLBAR
  92. vArgs[0].frames.idFrameTools.btnVoice.disabled = true;
  93. vArgs[0].frames.idFrameTools.txtVoice.disabled = true;
  94. #else
  95. vArgs[0].frames.idFrameTools.DisableButton( "btnVoice" );
  96. #endif
  97. //vArgs[0].g_bStartEnabled = false;
  98. // Send a message to the client that the SetupWizard failed
  99. vArgs[0].Helpee_SendControlCommand( c_szVoipWizardBad);
  100. }
  101. TraceFunctLeave();
  102. }
  103. /*
  104. Function : SystemOptions()
  105. Description :
  106. */
  107. function SystemOptions()
  108. {
  109. TraceFunctEnter("SystemOptions");
  110. try
  111. {
  112. //TODO: code goes in here.
  113. }
  114. catch(error)
  115. {
  116. vArgs[0].FatalError("",error);
  117. }
  118. TraceFunctLeave();
  119. }
  120. /*
  121. Function : OnLoad()
  122. Description : Gets called on the load of the page.
  123. Options are initialised based upon the settings recorded.
  124. */
  125. function OnLoad()
  126. {
  127. TraceFunctEnter("OnLoad");
  128. try
  129. {
  130. // Show current compression setting through the 'rdAS' radio button
  131. if (vArgs[0].g_VoipBandwidth == 0)
  132. {
  133. optStd.checked = true;
  134. }
  135. else
  136. {
  137. optHigh.checked = true;
  138. }
  139. // Disable the Audio wizard button if we are on a voice session
  140. if ((vArgs[0].g_bVoipConnected == true))
  141. {
  142. btnATW.disabled = true;
  143. }
  144. else
  145. btnATW.disabled = false;
  146. }
  147. catch(error)
  148. {
  149. idBody.style.visibility = "hidden";
  150. alert( L_ERRACCESSDENIED_Text );
  151. return;
  152. }
  153. TraceFunctLeave();
  154. }
  155. </Script>
  156. </HEAD>
  157. <BODY id="idBody" name="idBody" onLoad="OnLoad();" class="sys-inlineform-bgcolor1">
  158. <Table name="idMainTable" id="idMainTable" cellspacing="0" cellpadding="0" border=0 class="MaxLayout">
  159. <TR>
  160. <TD class="padding6 padding3">
  161. <Table id="T1" name="T1" border=0 cellpadding="0" cellspacing="0" class="MaxLayout">
  162. <TR>
  163. <TD class="padding5 valigntop">
  164. <Fieldset id="F0T1" name="F0T1" class="padding3 padding4 padding6 padding7">
  165. <Legend id="L0F0T1" name="L0F0T1" class="sys-font-body sys-color-body">
  166. Audio
  167. </Legend>
  168. <Table cellpadding=0 cellspacing=0 border=0 name="idContainer" name="idContainer" class="MaxLayout">
  169. <TR>
  170. <TD class="height5">
  171. </TD>
  172. </TR>
  173. <TR>
  174. <TD>
  175. <Input type="radio" name="rdAS" id="optStd" checked>
  176. <Label id="LA0F0T1" name="LA0F0T1" For="optStd" class="sys-font-body sys-color-body">
  177. Standard quality
  178. </Label>
  179. </TD>
  180. </TR>
  181. <TR>
  182. <TD>
  183. <Input type="radio" name="rdAS" id="optHigh">
  184. <Label id="LA1F0T1" name="LA1F0T1" For="optHigh" class="sys-font-body sys-color-body">
  185. High quality (requires a high-speed Internet connection)
  186. </Label>
  187. </TD>
  188. </TR>
  189. <TR>
  190. <TD class="height15">
  191. </TD>
  192. </TR>
  193. <TR>
  194. <TD id="idbtn" name="idbtn" align="right" class="padding2">
  195. <BUTTON name="btnATW" id="btnATW" onClick="Tuning();" class="sys-font-body sys-color-body" accesskey="T">
  196. Audio <U>T</U>uning Wizard ....
  197. </BUTTON>
  198. </TD>
  199. </TR>
  200. </Table>
  201. </Fieldset>
  202. </TD>
  203. </TR>
  204. <TR>
  205. <TD class="height8">
  206. </TD>
  207. </TR>
  208. <TR>
  209. <TD id="TD1" name="TD1" align="right">
  210. <Button id="btnOK" name="btnOK" Onclick="OnApply();window.close();" class="styBtnWidth sys-font-body sys-color-body" accesskey="O"><U>O</U>K</Button>
  211. <Span id="idblankSpace1" name="idblankSpace1" class="width8"></Span>
  212. <Button id="btnCancel" name="btnCancel" OnClick="window.close();" class="styBtnWidth sys-font-body sys-color-body" accesskey="C"><U>C</U>ancel</Button>
  213. <Span id="idblankSpace2" name="idblankSpace2" class="width8"></Span>
  214. <Button id="btnApply" name="btnApply" Onclick="OnApply();" class="styBtnWidth sys-font-body sys-color-body" accesskey="A"><U>A</U>pply</Button>
  215. </TD>
  216. </TR>
  217. </Table>
  218. </TD>
  219. </TR>
  220. </Table>
  221. </BODY>
  222. </HTML>