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

Annotation of /trunk/gr2lib_cpp/gr2lib_rigeditor_frm.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5 - (hide annotations) (download)
Thu Jul 29 17:25:37 2010 UTC (9 years, 6 months ago) by william
File MIME type: text/plain
File size: 4143 byte(s)
initial commit --

** Started implementing native unmanaged <=> managed conversion

1 william 5 #pragma once
2     #include "gr2lib_core.h"
3     #include "gr2lib_core_imports.h"
4    
5     using namespace System;
6     using namespace System::ComponentModel;
7     using namespace System::Collections;
8     using namespace System::Collections::Generic;
9     using namespace System::Windows::Forms;
10     using namespace System::Data;
11     using namespace System::Drawing;
12    
13    
14     namespace gr2lib
15     {
16     namespace core
17     {
18     namespace rigeditor
19     {
20     /// <summary>
21     /// Summary for gr2lib_rigeditor_frm
22     ///
23     /// WARNING: If you change the name of this class, you will need to change the
24     /// 'Resource File Name' property for the managed resource compiler tool
25     /// associated with all .resx files this class depends on. Otherwise,
26     /// the designers will not be able to interact properly with localized
27     /// resources associated with this form.
28     /// </summary>
29     public ref class gr2lib_rigeditor_frm : public System::Windows::Forms::Form
30     {
31     public:
32     gr2lib_rigeditor_frm(void)
33     {
34     InitializeComponent();
35     //
36     //TODO: Add the constructor code here
37     //
38     }
39     gr2lib_rigeditor_frm(grannyfile* grn_file)
40     {
41     InitializeComponent();
42     // parse art tool info
43    
44     ArtToolInfo^ _ArtToolInfo = gcnew ArtToolInfo();
45     _ArtToolInfo->FromArtToolName = gcnew String(reinterpret_cast<const char*>(grn_file->GrannyFileInfo->ArtToolInfo->FromArtToolName));
46    
47     Vector3* Origin = new Vector3(
48     grn_file->GrannyFileInfo->ArtToolInfo->Origin[0],
49     grn_file->GrannyFileInfo->ArtToolInfo->Origin[1],
50     grn_file->GrannyFileInfo->ArtToolInfo->Origin[2]);
51     Vector3* Right = new Vector3(
52     grn_file->GrannyFileInfo->ArtToolInfo->RightVector[0],
53     grn_file->GrannyFileInfo->ArtToolInfo->RightVector[1],
54     grn_file->GrannyFileInfo->ArtToolInfo->RightVector[2]);
55     Vector3* Up = new Vector3(
56     grn_file->GrannyFileInfo->ArtToolInfo->UpVector[0],
57     grn_file->GrannyFileInfo->ArtToolInfo->UpVector[1],
58     grn_file->GrannyFileInfo->ArtToolInfo->UpVector[2]);
59     Vector3* Back = new Vector3(
60     grn_file->GrannyFileInfo->ArtToolInfo->BackVector[0],
61     grn_file->GrannyFileInfo->ArtToolInfo->BackVector[1],
62     grn_file->GrannyFileInfo->ArtToolInfo->BackVector[2]);
63    
64     _ArtToolInfo->Vector = gcnew ArtToolInfoVector(*Origin,*Right,*Up,*Back);
65    
66     List<Object^> _selected_object_list = gcnew List<Object^>();
67     _selected_object_list.Add(_ArtToolInfo);
68    
69     propgrid->SelectedObjects = _selected_object_list.ToArray();
70     }
71    
72     protected:
73     /// <summary>
74     /// Clean up any resources being used.
75     /// </summary>
76     ~gr2lib_rigeditor_frm()
77     {
78     if (components)
79     {
80     delete components;
81     }
82     }
83     private: System::Windows::Forms::PropertyGrid^ propgrid;
84     protected:
85    
86     private:
87     /// <summary>
88     /// Required designer variable.
89     /// </summary>
90     System::ComponentModel::Container ^components;
91    
92     #pragma region Windows Form Designer generated code
93     /// <summary>
94     /// Required method for Designer support - do not modify
95     /// the contents of this method with the code editor.
96     /// </summary>
97     void InitializeComponent(void)
98     {
99     this->propgrid = (gcnew System::Windows::Forms::PropertyGrid());
100     this->SuspendLayout();
101     //
102     // propgrid
103     //
104     this->propgrid->Dock = System::Windows::Forms::DockStyle::Fill;
105     this->propgrid->Location = System::Drawing::Point(0, 0);
106     this->propgrid->Name = L"propgrid";
107     this->propgrid->Size = System::Drawing::Size(284, 262);
108     this->propgrid->TabIndex = 1;
109     //
110     // gr2lib_rigeditor_frm
111     //
112     this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
113     this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
114     this->ClientSize = System::Drawing::Size(284, 262);
115     this->Controls->Add(this->propgrid);
116     this->Name = L"gr2lib_rigeditor_frm";
117     this->Text = L"gr2lib_rigeditor_frm";
118     this->ResumeLayout(false);
119    
120     }
121     #pragma endregion
122     };
123     }
124     }
125     }

  ViewVC Help
Powered by ViewVC 1.1.22