|
Lines 135-168
Link Here
|
| 135 |
} |
135 |
} |
| 136 |
|
136 |
|
| 137 |
//--------------------------------------------------------- |
137 |
//--------------------------------------------------------- |
| 138 |
wxString CWKSP_Tool::Get_File_Name(void) |
|
|
| 139 |
{ |
| 140 |
return( m_pTool->Get_File_Name().c_str() ); |
| 141 |
} |
| 142 |
|
| 143 |
//--------------------------------------------------------- |
| 144 |
wxString CWKSP_Tool::Get_Description(void) |
138 |
wxString CWKSP_Tool::Get_Description(void) |
| 145 |
{ |
139 |
{ |
| 146 |
//----------------------------------------------------- |
140 |
//----------------------------------------------------- |
| 147 |
if( !Get_File_Name().IsEmpty() ) |
141 |
if( !m_pTool->Get_File_Name().is_Empty() ) |
| 148 |
{ |
142 |
{ |
|
|
143 |
CSG_String Lib_Name = SG_File_Get_Name(m_pTool->Get_File_Name(), false); |
| 144 |
CSG_String File_Path = SG_File_Make_Path(SG_File_Get_Path(m_pTool->Get_File_Name()), Lib_Name, ""); |
| 145 |
|
| 146 |
File_Path = SG_File_Make_Path(File_Path, CSG_String::Format("%s_%02d", Lib_Name.c_str(), Get_Index())); |
| 147 |
|
| 149 |
CSG_String Description; |
148 |
CSG_String Description; |
| 150 |
CSG_File Stream; |
149 |
CSG_File Stream; |
| 151 |
|
150 |
|
| 152 |
wxFileName FileName(Get_File_Name()); |
151 |
if( SG_File_Set_Extension(File_Path, "html") && Stream.Open(File_Path, SG_FILE_R) && Stream.Read(Description, Stream.Length()) ) |
| 153 |
FileName.AppendDir (FileName.GetName()); |
|
|
| 154 |
FileName.SetName (wxString::Format("%s_%02d", FileName.GetName().c_str(), Get_Index())); |
| 155 |
|
| 156 |
FileName.SetExt ("html"); |
| 157 |
|
| 158 |
if( Stream.Open(FileName.GetFullPath().wc_str(), SG_FILE_R) && Stream.Read(Description, Stream.Length()) ) |
| 159 |
{ |
152 |
{ |
| 160 |
return( Description.c_str() ); |
153 |
return( Description.c_str() ); |
| 161 |
} |
154 |
} |
| 162 |
|
155 |
|
| 163 |
FileName.SetExt ("htm"); |
156 |
if( SG_File_Set_Extension(File_Path, "htm" ) && Stream.Open(File_Path, SG_FILE_R) && Stream.Read(Description, Stream.Length()) ) |
| 164 |
|
|
|
| 165 |
if( Stream.Open(FileName.GetFullPath().wc_str(), SG_FILE_R) && Stream.Read(Description, Stream.Length()) ) |
| 166 |
{ |
157 |
{ |
| 167 |
return( Description.c_str() ); |
158 |
return( Description.c_str() ); |
| 168 |
} |
159 |
} |