//TH-Header //***************************************************************************************** // Copyright (c) 2014 KURANT Project // All rights reserved. // // $FileName : todo.DG // $ProjectName : The Hammer 2.0 // $Authors : Wil van Antwerpen, Michael Kurz, Sergey V. Natarov, Bernhard Ponemayr // $Created : 01.25.2014 01:08 // $Type : LGPL // // Contents: ToDo Records // //***************************************************************************************** //TH-RevisionStart //TH-RevisionEnd Use THTODO.DD Object oToDo Is a dbModalPanel #IF (!@ >= 140) Set pbSizeToClientArea to False #ENDIF Property Integer piEditView public 0 Set Label To "ToDo Records" Set Size To 180 335 Set Location To 32 30 Set Border_Style To Border_Dialog Object Thtodo_DD Is a Thtodo_DataDictionary End_Object // Thtodo_DD Set Main_DD To (Thtodo_DD(Self)) Set Server To (Thtodo_DD(Self)) Object Thtodo_Title Is a dbForm Entry_Item Thtodo.Title Set Label To "TODO:" Set Size To 13 167 Set Location To 4 31 Set Label_Col_Offset To 2 Set Label_Justification_Mode To jMode_Right End_Object // Thtodo_Title Object Thtodo_Type Is a dbComboForm Entry_Item Thtodo.Type Set Label To "Type" Set Size To 13 103 Set Location To 4 223 Set Form_Border To 0 Set Label_Col_Offset To 2 Set Label_Justification_Mode To jMode_Right Set Entry_State To FALSE Register_Object THTODO_FILE Procedure OnChange Send Update_Dlg_Display End_Procedure Procedure Entry_Display Integer iPara0 Integer iPara1 Forward Send Entry_Display iPara0 iPara1 Send Update_Dlg_Display End_Procedure Procedure Update_Dlg_Display String sVal Integer hoID Get Field_Current_Value Of (Thtodo_DD(Self)) Field Thtodo.Type To sVal Delegate Get piEditView To hoID If (sVal="GLOBAL") Set Enabled_State To False Else Set Enabled_State To True If ((sVal='FILE')Or(sVal="")) Begin Set Enabled_State Of (Thtodo_File(Self)) To True Set label Of (Thtodo_File(Self)) To "File" If (Trim(Value(thtodo_file(Self),0))="") Begin If (hoID) Set Changed_Value Of (thtodo_file(Self)) Item 0 To (psFileName(oEdit(hoID))) End End If (sVal='PROJECT') Begin Set Enabled_State Of (Thtodo_File(Self)) To True Set label Of (Thtodo_File(Self)) To "Workspace" Set Changed_Value Of (thtodo_file(Self)) Item 0 To "" If (Trim(Value(thtodo_file(Self),0))="") Begin Get psCurWrkSpace Of ghoWorkSpaceHandlerEx To sVal Set Changed_Value Of (thtodo_file(Self)) Item 0 To sVal End End If (sVal='GLOBAL') Begin Set Enabled_State Of (Thtodo_File(Self)) To False Set label Of (Thtodo_File(Self)) To "" Set Changed_Value Of (thtodo_file(Self)) Item 0 To "" End If (sVal='NOTE') Begin Set Enabled_State Of (Thtodo_File(Self)) To False Set label Of (Thtodo_File(Self)) To "" Set Changed_Value Of (thtodo_file(Self)) Item 0 To "" End End_Procedure End_Object // Thtodo_Type Object oDbEdit2 Is a dbEdit Entry_Item Thtodo.Descr Set Size To 75 295 Set Location To 21 31 End_Object // oDbEdit2 Object Thtodo_Edate Is a dbForm Entry_Item Thtodo.Edate Set Label To "Estimation date " Set Size To 13 66 Set Location To 100 259 Set Label_Col_Offset To 2 Set Label_Justification_Mode To jMode_Right End_Object // Thtodo_Edate Object Thtodo_File Is a dbForm Entry_Item Thtodo.File Set Label To "File" Set Size To 13 193 Set Location To 135 132 Set Label_Col_Offset To 2 Set Label_Justification_Mode To jMode_Right Set Prompt_Button_Mode To pb_PromptOn End_Object // Thtodo_File Object Thtodo_Completed Is a dbCheckBox Entry_Item Thtodo.Completed Set Label To "Completed" Set Size To 13 60 Set Location To 151 132 End_Object // Thtodo_Completed Object Thtodo_User Is a dbForm Set Enabled_State To False Entry_Item ("by "+Trim(Thtodo.User)) Set Size To 13 66 Set Location To 117 132 Set Label_Col_Offset To 2 Set Label_Justification_Mode To jMode_Right End_Object // Thtodo_User Object Thtodo_LastUser Is a dbForm Set Enabled_State To False Set Label To "Modified" Entry_Item ("by "+Trim(Thtodo.LastUser)) Set Size To 13 66 Set Location To 117 259 Set Label_Col_Offset To 2 Set Label_Justification_Mode To jMode_Right End_Object // Thtodo_User Object Thtodo_Sdate Is a dbForm Set Enabled_State To False Entry_Item Thtodo.Sdate Set Label To "Recorded" Set Size To 13 66 Set Location To 100 132 Set Label_Col_Offset To 2 Set Label_Justification_Mode To jMode_Right End_Object // Thtodo_Sdate Procedure popup Integer iRec Integer iEdit If (iEdit) Set piEditView To iEdit Send Clear To (Thtodo_DD(Self)) Set Label To "Todo Records [Create New Record]" If (iRec) Begin Move iRec To thtodo.Recnum Send Find To (Thtodo_DD(Self)) Eq 0 Set Label To "Todo Records [Edit Record]" End Forward Send popup End_Procedure End_Object // oToDo