Code Viewer

./WindowHandlers/PrefGeneral_handler.js File Size: 3.89 KB

  1. /*
  2. *
  3. *      PrefGeneral.xml : PrefGeneral
  4. *     
  5. */
  6.  
  7. function OnPrefGeneralEvent_CtrlClicked(pPlusWnd, sControlId) {
  8.         switch (sControlId) {
  9.                 case 'BtnSave' :
  10.                         Preferences_Save('PrefGeneral');
  11.                 case 'BtnBack' :
  12.                         Preferences_ShowChild('PrefDashboard');
  13.                         break;
  14.                 case 'BtnBrowse':
  15.                         pPlusWnd.SetControlText('tSaveDirectory', BrowseForFolder());
  16.                         break;
  17.                 case 'cPreviews':
  18.                         _win32.EnableWindow(objChildWindows['PrefFtp'].GetControlHandle('cUploadScreenshots'), !pPlusWnd.Button_IsChecked(sControlId));
  19.                         break;
  20.                 case 'lnkTags':
  21.                         _win32.MessageBoxW(pPlusWnd.Handle, _lang.text['MsgBoxTags'], _lang.text['MsgBoxTagsFilename_Title'], 32);
  22.                         break;
  23.         }
  24. }
  25.  
  26. function OnPrefGeneralEvent_EditTextChanged(pPlusWnd, sControlId) {
  27.         if (sControlId === 'tTimeDelay') {
  28.                 var RangeMin = 0, RangeMax = 3600;
  29.                 var nValue = 1*pPlusWnd.GetControlText(sControlId);
  30.                 if (nValue < RangeMin)
  31.                         pPlusWnd.SetControlText(sControlId, RangeMin);
  32.                 else if (nValue > RangeMax)
  33.                         pPlusWnd.SetControlText(sControlId, RangeMax);
  34.         }
  35. }
  36.  
  37. function OnPrefGeneralEvent_ComboSelChanged(pPlusWnd, sControlId) {
  38.         if (sControlId === 'cFileType') {
  39.                 var bEnable = pPlusWnd.Combo_GetCurSel(sControlId) === /* JPEG */ 1;
  40.                 _win32.EnableWindow(pPlusWnd.GetControlHandle('lblQuality'), bEnable);
  41.                 _win32.EnableWindow(pPlusWnd.GetControlHandle('lblQualityPercent'), bEnable);
  42.                 _win32.EnableWindow(pPlusWnd.GetControlHandle('sldrQuality'), bEnable);
  43.         }
  44. }
  45.  
  46. function OnPrefGeneralEvent_MessageNotification(pPlusWnd, nMessage, wParam, lParam) {
  47.         switch (nMessage) {
  48.                 case _win32._const._WM_NOTIFY:
  49.                         var NMHDR = Interop.Allocate(12);
  50.                         _win32.RtlMoveMemory(NMHDR.DataPtr, lParam, 12);
  51.                         if (NMHDR.ReadDWORD(0) === pPlusWnd.GetControlHandle('sldrQuality') && NMHDR.ReadDWORD(8) === _win32._const._NM_RELEASEDCAPTURE)
  52.                                 pPlusWnd.SetControlText('lblQualityPercent', pPlusWnd.SendControlMessage('sldrQuality', _win32._const._TBM_GETPOS, 0, 0) + '%');
  53.                         break;
  54.         }
  55. }

Version

  • 5.0.0070_20100325_publicbeta1

Developers

Project Details

  • Folders8
  • Files122
  • Total Lines11,867
  • Repository Version70

User Count

  • 162