//***************************************************************************************** // Copyright (c) 2000 Michael Kurz // All rights reserved. // If you want to use this source in your applications conatct: // // $FileName : cEditorGeneral.Pkg // $ProjectName : CODEMAX EDITOR // $Author : Michael Kurz // $Created : 02-25-2001 @ 19:00 // // Contents: // Some general used stuff. // // $Rev History // //***************************************************************************************** // Removes the extention of a file. Function FileWithoutExt Global String sFile returns String Integer iPos iL move (TRim(sFile)) to sFile move (Length(sFile)) to iL if (Mid(sFile,1,iL-3)) eq "." move 4 to iPos if (Mid(sFile,1,iL-2)) eq "." move 3 to iPos if (Mid(sFile,1,iL-1)) eq "." move 2 to iPos if (Mid(sFile,1,iL )) eq "." move 1 to iPos if iPos gt 0 move (Left(sFile,iL-iPos)) to sFile Function_Return sFile End_Function Class cTabDialogDummy is a Message // Deinfe an additional KeyBoard handling in TabDialogs. Procedure Tab_1 for DFBaseTabDialog if (Button_Count(Self)) lt 1 Procedure_Return send Request_Switch_To_Tab 0 3 End_Procedure Procedure Tab_2 for DFBaseTabDialog if (Button_Count(Self)) lt 2 Procedure_Return send Request_Switch_To_Tab 1 3 End_Procedure Procedure Tab_3 for DFBaseTabDialog if (Button_Count(Self)) lt 3 Procedure_Return send Request_Switch_To_Tab 2 3 End_Procedure Procedure Tab_4 for DFBaseTabDialog if (Button_Count(Self)) lt 4 Procedure_Return send Request_Switch_To_Tab 3 3 End_Procedure Procedure Tab_5 for DFBaseTabDialog if (Button_Count(Self)) lt 5 Procedure_Return send Request_Switch_To_Tab 4 3 End_Procedure Procedure Tab_6 for DFBaseTabDialog if (Button_Count(Self)) lt 6 Procedure_Return send Request_Switch_To_Tab 5 3 End_Procedure Procedure Tab_7 for DFBaseTabDialog if (Button_Count(Self)) lt 7 Procedure_Return send Request_Switch_To_Tab 6 3 End_Procedure Procedure Tab_8 for DFBaseTabDialog if (Button_Count(Self)) lt 8 Procedure_Return send Request_Switch_To_Tab 7 3 End_Procedure Procedure Tab_9 for DFBaseTabDialog if (Button_Count(Self)) lt 9 Procedure_Return send Request_Switch_To_Tab 8 3 End_Procedure Procedure Construct_Object for DFBaseTabDialog Forward send Construct_Object on_key key_alt+key_f1 send Request_Next_Tab on_key key_alt+key_1 send Tab_1 on_key key_alt+key_2 send Tab_2 on_key key_alt+key_3 send Tab_3 on_key key_alt+key_4 send Tab_4 on_key key_alt+key_5 send Tab_5 on_key key_alt+key_6 send Tab_6 on_key key_alt+key_7 send Tab_7 on_key key_alt+key_8 send Tab_8 on_key key_alt+key_9 send Tab_9 End_Procedure End_Class // Creating and Destroyin a FileOpen- FileSaveDialog. //Function FileDialog for Desktop Integer iSave String titel String hfilter String sFile Returns String // Local String Fname sDir // Local String PropVal // Local Integer retval // Local Integer OpenFileObj // Get_Current_Directory to sDir // if Not iSave Begin // Object OpenFile is a OpenDialog // set Filter_String to hFilter // set Dialog_Caption to titel // set NoChangeDir_State to TRUE // set File_Title to sFile // set Initial_Folder to sDir // move Current_Object to OpenFileObj // End_Object // End // Else Begin // Object SaveFile is a SaveasDialog // set Filter_String to hFilter // set Dialog_Caption to titel // set NoChangeDir_State to TRUE // set File_Title to sFile // set Initial_Folder to sDir // move Current_Object to OpenFileObj // End_Object // End // get Show_Dialog of OpenFileObj to Retval // if RetVal ; // move (File_Name(OpenFileObj)) to fName // send Destroy_Object to OpenFileObj // Function_Return Fname //End_Function