Module oSigCJTaskDialog.pkg

     1// Project      : SigCj - VDF Classes for Codejock
     2// File         : oSigCJTaskDialog.dg
     3// Description  : VDF Class for Codejock control
     4//
     5// Revision     : $Rev: 599 $
     6//                $Date: 2009-10-14 05:39:01 -0400 (Wed, 14 Oct 2009) $
     7//                $Author: pak $ Martin Pincott
     8// 
     9// Requirements : Visual DataFlex 12.1+
    10//                Codejock SuitePro - Version 12.0.0+
    11//
    12// Copyright    : (c) 2008 VDF SIG UK
    13//                Visual DataFlex Special Interest Group UK.
    14//                http://www.vdfsig.co.uk/
    15//                dev@vdfsig.co.uk
    16//
    17//                This file is part of SigCj.
    18//
    19//                SigCj is free software: you can redistribute it and/or modify
    20//                it under the terms of the GNU Lesser General Public License 
    21//                as published by the Free Software Foundation, either version 
    22//                2.1 of the License, or (at your option) any later version.
    23//
    24//                SigCj is distributed in the hope that it will be useful, but 
    25//                WITHOUT ANY WARRANTY; without even the implied warranty of
    26//                MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    27//                GNU Lesser General Public License for more details.
    28//
    29//                If you have the complete SigCj workspace then a copy of the  
    30//                GNU Lesser General Public License is in the Docs folder. If  
    31//                not, see <http://www.gnu.org/licenses/>.
    32//    
    33//==============================================================================
    34
    35Use DfAllEnt.pkg
    36Use cSigCJTaskDialog.pkg
    37
    38Object oSigCJTaskDialog is a cSigCJTaskDialog
    39        Property Integer piProcessCounter
    40        
    41        Set phParentHwnd to (Window_Handle(Client_Id(Self)))   
    42        
    43        Procedure OnConstructed
    44            Set pbRadioOptionEnabledState 102 to False
    45        End_Procedure
    46        
    47        Procedure OnTimer Integer iMilliSeconds Boolean ByRef bResetCounter
    48            Integer iCounter
    49            
    50            Move True to bResetCounter
    51            Get piProcessCounter to iCounter
    52            Increment iCounter
    53            Set piProcessCounter to iCounter
    54            Set piProgressBarPos to iCounter
    55            Set psMainInstructionText to (sFormat("Processing... %1%",String(iCounter)))  
    56            If (iCounter=101) Begin
    57                Set psMainInstructionText to "Download Complete 100%" 
    58                Sleep 2
    59                Send ClickButton 1
    60            End
    61        End_Procedure
    62        
    63        Procedure OnComHyperlinkClicked String llURL
    64            Runprogram Background (String("Start" * String(llURL))) 
    65            // (String("Start iexplore.exe" * \String(llURL))) 
    66        End_Procedure
    67        
    68End_Object
    69
    70//Define eBtn_OK                  for OLExtpTaskButtonOk
    71//Define eBtn_Yes                 for OLExtpTaskButtonYes
    72//Define eBtn_No                  for OLExtpTaskButtonNo
    73//Define eBtn_Cancel              for OLExtpTaskButtonCancel
    74//Define eBtn_Retry               for OLExtpTaskButtonRetry
    75//Define eBtn_Close               for OLExtpTaskButtonClose 
    76
    77//#Replace MBR_Ok     1
    78//#Replace MBR_Cancel 2
    79//#Replace MBR_Abort  3
    80//#Replace MBR_Retry  4
    81//#Replace MBR_Ignore 5
    82//#Replace MBR_Yes    6
    83//#Replace MBR_No     7
    84
    85Procedure sigInfo_Box Global String sMessage String sTitle
    86    Integer iRetval
    87    If (num_arguments = 1) Send sigCJInfo_Box of oSigCJTaskDialog sMessage 
    88    Else Send sigCJInfo_Box of oSigCJTaskDialog sMessage sTitle
    89End_Procedure
    90
    91Procedure sigWarning_Box Global String sMessage String sTitle
    92    Integer iRetval
    93    If (num_arguments = 1) Send sigCJWarning_Box of oSigCJTaskDialog sMessage 
    94    Else Send sigCJWarning_Box of oSigCJTaskDialog sMessage sTitle
    95End_Procedure
    96
    97Procedure sigStop_Box Global String sMessage String sTitle
    98    Integer iRetval
    99    If (num_arguments = 1) Send sigCJStop_Box of oSigCJTaskDialog sMessage 
   100    Else Send sigCJStop_Box of oSigCJTaskDialog sMessage sTitle
   101End_Procedure
   102
   103Function sigYesNo_Box Global String sMessage String sTitle Integer eBtn Returns Integer
   104    Integer iRetval
   105    If (num_arguments = 1) Get sigCJYesNo_Box of oSigCJTaskDialog sMessage to iRetval
   106    Else If (num_arguments = 2) Get sigCJYesNo_Box of oSigCJTaskDialog sMessage sTitle to iRetval
   107    Else Get sigCJYesNo_Box of oSigCJTaskDialog sMessage sTitle eBtn to iRetval
   108    Function_Return iRetval
   109End_Function
   110
   111Function sigYesNoCancel_Box Global String sMessage String sTitle Integer eBtn Returns Integer
   112    Integer iRetval
   113    If (num_arguments = 1) Get sigCJYesNoCancel_Box of oSigCJTaskDialog sMessage to iRetval
   114    Else If (num_arguments = 2) Get sigCJYesNoCancel_Box of oSigCJTaskDialog sMessage sTitle to iRetval
   115    Else Get sigCJYesNoCancel_Box of oSigCJTaskDialog sMessage sTitle eBtn to iRetval
   116    Function_Return iRetval
   117End_Function
   118