//============================================================================= // Project : SigCj - VDF Classes for Codejock // File : SigCjCalendar_Properties.dg // Description : VDF Class for Codejock control // // Revision : $Rev: $ // $Date: $ // $Author: $ // // Requirements : Visual DataFlex 14.1+ // Codejock SuitePro - Version 13.4.0+ // // Copyright : Copyright © 2009-2012 VDF SIG UK, All rights reserved. // Visual DataFlex Special Interest Group UK. // http://www.vdfsig.co.uk/ // // This file is part of SigCj. // // SigCj is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation, either version // 2.1 of the License, or (at your option) any later version. // // SigCj is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // If you have the complete SigCj workspace then a copy of the // GNU Lesser General Public License is in the Docs folder. If // not, see . // //============================================================================= Use Windows.pkg Use cCJGrid.pkg Use cCJGridColumn.pkg Use cSigCjCalendar_Public.pkg Object oSigCjCalendar_CustomProperties_Panel is a ModalPanel Set Size to 185 236 Set Label to "Change this 'Label' property..." Set piMinSize to 89 211 Set Location to 2 2 Set Border_Style To Border_Thick Property tdSigCjCal_Dialog_CustomProperty ptDialog_CustomProperty Object oCJGrid1 is a cCJGrid Set Size to 149 215 Set Location to 7 10 Object oCJGridColumn1 is a cCJGridColumn Set piWidth to 100 Set psCaption to "Name" End_Object Object oCJGridColumn2 is a cCJGridColumn Set piWidth to 100 Set psCaption to "Value" End_Object Procedure Activating Integer iLoop iCount tDataSourceRow[] tDataSource tdSigCjCal_Dialog_CustomProperty tDialog_CustomProperty Forward Send Activating Get ptDialog_CustomProperty to tDialog_CustomProperty Move (SizeOfArray( tDialog_CustomProperty.tCustomProperties) - 1) to iCount For iLoop from 0 to iCount Move tDialog_CustomProperty.tCustomProperties[iLoop].sName to tDataSource[iLoop].sValue[0] Move tDialog_CustomProperty.tCustomProperties[iLoop].sValue to tDataSource[iLoop].sValue[1] Loop Send InitializeData tDataSource End_Procedure Procedure Retrieve_Data Integer iLoop iCount tDataSourceRow[] tDataSource tdSigCjCal_Dialog_CustomProperty tDialog_CustomProperty tdSigCjCal_Dialog_CustomProperty tDialog_CustomProperty_Temp Get ptDialog_CustomProperty to tDialog_CustomProperty_Temp Move tDialog_CustomProperty_Temp.eAction to tDialog_CustomProperty.eAction Get DataSource of (phoDataSource(Self)) to tDataSource Move (SizeOfArray(tDataSource) - 1) to iCount For iLoop from 0 to iCount If (Trim(tDataSource[iLoop].sValue[0]) <> "") Begin Move tDataSource[iLoop].sValue[0] to tDialog_CustomProperty.tCustomProperties[iLoop].sName Move tDataSource[iLoop].sValue[1] to tDialog_CustomProperty.tCustomProperties[iLoop].sValue End Loop Set ptDialog_CustomProperty to tDialog_CustomProperty End_Procedure End_Object Object oOK_Btn is a Button Set Label to "&OK" Set Location to 167 127 Set peAnchors To anBottomRight Procedure OnClick tdSigCjCal_Dialog_CustomProperty tDialog_CustomProperty Send Retrieve_Data of oCJGrid1 Get ptDialog_CustomProperty to tDialog_CustomProperty Move eCal_Dialog_Action_Edit to tDialog_CustomProperty.eAction Set ptDialog_CustomProperty to tDialog_CustomProperty Send Close_Panel End_Procedure End_Object Object oCancel_Btn is a Button Set Label to "&Cancel" Set Location to 167 182 Set peAnchors to anBottomRight Procedure OnClick tdSigCjCal_Dialog_CustomProperty tDialog_CustomProperty Get ptDialog_CustomProperty to tDialog_CustomProperty Move eCal_Dialog_Action_None to tDialog_CustomProperty.eAction Set ptDialog_CustomProperty to tDialog_CustomProperty Send Close_Panel End_Procedure End_Object On_Key Key_Alt+Key_O Send KeyAction of oOK_Btn On_Key Key_Alt+Key_C Send KeyAction of oCancel_Btn Function Show_Dialog tdSigCjCal_Dialog_CustomProperty tDialog_CustomProperty Returns tdSigCjCal_Dialog_CustomProperty Set ptDialog_CustomProperty of oSigCjCalendar_CustomProperties_Panel to tDialog_CustomProperty Send Popup of oSigCjCalendar_CustomProperties_Panel Get ptDialog_CustomProperty of oSigCjCalendar_CustomProperties_Panel to tDialog_CustomProperty Function_Return tDialog_CustomProperty End_Function End_Object