/[Sims3RigEditor]/trunk/gr2lib_cpp/gr2lib_rigeditor_frm.h
ViewVC logotype

Diff of /trunk/gr2lib_cpp/gr2lib_rigeditor_frm.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 12 by william, Sat Jul 31 09:33:11 2010 UTC revision 14 by william, Sun Aug 1 02:15:12 2010 UTC
# Line 16  using namespace std; Line 16  using namespace std;
16    
17  using namespace gr2lib::core;  using namespace gr2lib::core;
18  using namespace gr2lib::core::coretypes::implementation;  using namespace gr2lib::core::coretypes::implementation;
19    using namespace gr2lib::core::apiversion;
20  using namespace System;  using namespace System;
21  using namespace System::ComponentModel;  using namespace System::ComponentModel;
22  using namespace System::Collections;  using namespace System::Collections;
# Line 209  private: Line 209  private:
209  #pragma endregion  #pragma endregion
210  #pragma region MarshalToMananaged  #pragma region MarshalToMananaged
211          ArtToolInfo^ _ArtToolInfo;          ArtToolInfo^ _ArtToolInfo;
212            ExporterInfo^ _ExporterInfo;
213    
214  #pragma region ManagedNativeParsing  #pragma region ManagedNativeParsing
215          array<Object^>^ ConvertToManaged()          array<Object^>^ ConvertToManaged()
# Line 217  private: Line 218  private:
218    
219                  // Art Tool info                  // Art Tool info
220                  ret.Add(ArtToolInfo_ToManaged(_grn_file->GrannyFileInfo->ArtToolInfo));                  ret.Add(ArtToolInfo_ToManaged(_grn_file->GrannyFileInfo->ArtToolInfo));
221                    // Exporter Info
222                    ret.Add(ExporterInfo_ToManaged(_grn_file->GrannyFileInfo->ExporterInfo));
223                  return ret.ToArray();                  return ret.ToArray();
224          }          }
225          void ConvertToNative()          void ConvertToNative()
226          {          {
227                  // Art Tool info                  // Art Tool info
228                  ArtToolInfo_ToNative();                  ArtToolInfo_ToNative();
229                    // Exporter Info
230                    ExporterInfo_ToNative();
231          }          }
232  #pragma endregion  #pragma endregion
233    
234  #pragma region ArtToolInfo  #pragma region ArtToolInfo_ToManaged
235          ArtToolInfo^ ArtToolInfo_ToManaged(granny_art_tool_info* toolinfo)          ArtToolInfo^ ArtToolInfo_ToManaged(granny_art_tool_info* toolinfo)
236          {          {
237                  _ArtToolInfo = gcnew ArtToolInfo();                  _ArtToolInfo = gcnew ArtToolInfo();
# Line 260  private: Line 264  private:
264                  return _ArtToolInfo;                  return _ArtToolInfo;
265          }          }
266  #pragma endregion  #pragma endregion
267    #pragma region ExporterInfo_ToManaged
268            ExporterInfo^ ExporterInfo_ToManaged(granny_exporter_info* toolinfo)
269            {
270                    _ExporterInfo = gcnew ExporterInfo();
271                    // Tool Name
272                    _ExporterInfo->ExporterName = gcnew String(reinterpret_cast<const char*>(toolinfo->ExporterName));
273                    _ExporterInfo->Version = gcnew versiontype(
274                            toolinfo->ExporterMajorRevision,
275                            toolinfo->ExporterMinorRevision,
276                            toolinfo->ExporterCustomization,
277                            toolinfo->ExporterBuildNumber);
278                    //_ExporterInfo->ExtendedData = new IntPtr(toolinfo->ExtendedData.Object);
279                    return _ExporterInfo;
280            }
281    #pragma endregion
282    
283  #pragma region MarshalToNative  #pragma region MarshalToNative
284    
285  #pragma region ArtToolInfo  #pragma region ArtToolInfo_ToNative
286          void ArtToolInfo_ToNative()          void ArtToolInfo_ToNative()
287          {          {
288    
# Line 291  private: Line 310  private:
310    
311          }          }
312  #pragma endregion  #pragma endregion
313    #pragma region ExporterInfo_ToNative
314            void ExporterInfo_ToNative()
315            {
316                    _grn_file->GrannyFileInfo->ExporterInfo->ExporterName = (char*)Marshal::StringToHGlobalAnsi(_ExporterInfo->ExporterName).ToPointer();
317                    _grn_file->GrannyFileInfo->ExporterInfo->ExporterMajorRevision = _ExporterInfo->Version->major;
318                    _grn_file->GrannyFileInfo->ExporterInfo->ExporterMinorRevision = _ExporterInfo->Version->minor;
319                    _grn_file->GrannyFileInfo->ExporterInfo->ExporterCustomization = _ExporterInfo->Version->customization;
320                    _grn_file->GrannyFileInfo->ExporterInfo->ExporterBuildNumber = _ExporterInfo->Version->build;
321                    //_grn_file->GrannyFileInfo->ExporterInfo->ExtendedData
322            }
323    #pragma endregion
324  #pragma endregion  #pragma endregion
325    
326  #pragma endregion  #pragma endregion

Legend:
Removed from v.12  
changed lines
  Added in v.14

  ViewVC Help
Powered by ViewVC 1.1.22