//**************************************************************************** // $Module type: CLASS // $Module name: cViewDataButton.pkg // $Author : Nils G. Svedmyr // Created : 2002-08-15 @ 13:15 // // Description : // // $Rev History // 2002-08-15 Module header created //**************************************************************************** //Use cBitmapButton.pkg Use cBitmapButton.pkg Use SyncFuncs.pkg Register_Procedure DoStartViewData // Visual DataFlex 12.0 Migration Utility, added March 28, 2007: 15:13:24 #IF (!@ >= 120) { OverrideProperty=Bitmap InitialValue="ViewData16.bmp" } { OverrideProperty=piTransparentColor InitialValue=clWhite } { OverrideProperty=Label InitialValue="&View Data" } { OverrideProperty=Status_Help InitialValue="View data for the selected database table." } { OverrideProperty=Bitmap_Style InitialValue=Bitmap_Actual } { OverrideProperty=Bitmap_Style DesignTime=False } #ENDIF Class cViewDataButton is a cBitmapButton Procedure Construct_Object Forward Send Construct_Object // Visual DataFlex 12.0 Migration Utility, added March 28, 2007: 15:13:25 #IF (!@ >= 120) { InitialValue=True } #ENDIF Property Boolean pbFrom True Property Handle phoDD (Main_DD(Self)) End_Procedure // Construct_Object Procedure End_Construct_Object Forward Send End_Construct_Object End_Procedure // End_Construct_Object Procedure DoUpdateData Integer iFromFile Integer iToFile Boolean bFrom Boolean bFromLocal Get pbFrom To bFromLocal If (bFrom <> bFromLocal) Procedure_Return If bFromLocal Forward Set Enabled_State To iFromFile Else Forward Set Enabled_State To iToFile End_Procedure // DoUpdateData Procedure DoEnableDisable Integer iValue String sTable Integer iFile iOpen If (pbFrom(Self)) Begin Get Field_Current_Value Of (Main_DD(Self)) Field SncTable.FromFile To iFile Get Field_Current_Value Of (Main_DD(Self)) Field SncTable.Fromdatatable To sTable End // If (pbFrom(Self)) Begin Else Begin Get Field_Current_Value Of (Main_DD(Self)) Field SncTable.ToFile To iFile Get Field_Current_Value Of (Main_DD(Self)) Field SncTable.Todatatable To sTable End // Else Begin Move (Trim(sTable)) To sTable If iFile Get_Attribute DF_FILE_OPENED Of iFile To iOpen Forward Set Enabled_State To (iValue > 0 And Length(sTable) > 0 And iOpen) End_Procedure // DoEnableDisable Procedure Set Enabled_State Integer iFlag Forward Set Enabled_State To iFlag End_Procedure // Set Enabled_State Integer iFlag Procedure DoViewData Boolean bMultiType Integer iItem Returns String Handle hoDD Integer iFile iState iType String sRetval sTable sPath Get phoDD To hoDD If (pbFrom(Self)) Begin Get Field_Current_Value Of hoDD Field SncTable.FromFile To iFile Get Field_Current_Value Of hoDD Field Snctable.FrFileOemToAnsi To iState Get Field_Current_Value Of hoDD Field Snctable.FromDataTable To sTable Get Field_Current_Value Of hoDD Field Snctable.FromFilePath To sPath Get Field_Current_Value Of hoDD Field Snctable.FromDbType To iType End // If (pbFrom(Self)) Begin Else Begin Get Field_Current_Value Of hoDD Field SncTable.ToFile To iFile Get Field_Current_Value Of hoDD Field SncTable.ToFileOemToAnsi To iState Get Field_Current_Value Of hoDD Field Snctable.ToDataTable To sTable Get Field_Current_Value Of hoDD Field Snctable.ToFilePath To sPath Get Field_Current_Value Of hoDD Field Snctable.ToDbType To iType End // Else Begin If (iType = 1 Or iType = 6) Move (Trim(sPath) + "\" + Trim(sTable)) To sTable If iFile Get msg_DoStartViewData iFile iState bMultiType iItem sTable To sRetval If (Length(sRetval) > 0) Procedure_Return sRetval End_Procedure // DoViewData // Procedure Set pbToolTips Boolean bState // Handle ho // If (bState = False) Begin // Get phoToolBar To ho // Set pbToolTips Of ho To False // End // If (bState = False) Begin // End_Procedure // Set pbToolTips End_Class // cViewDataButton