1 |
|
5 |
//------------------------------------------------------------
|
2 |
|
|
//------------------------------------------------------------
|
3 |
|
|
// MAGiC
|
4 |
|
|
// Jean Christophe Cuillière et Vincent FRANCOIS
|
5 |
|
|
// Département de Génie Mécanique - UQTR
|
6 |
|
|
//------------------------------------------------------------
|
7 |
|
|
// Le projet MAGIC est un projet de recherche du département
|
8 |
|
|
// de génie mécanique de l'Université du Québec à
|
9 |
|
|
// Trois Rivières
|
10 |
|
|
// Les librairies ne peuvent être utilisées sans l'accord
|
11 |
|
|
// des auteurs (contact : francois@uqtr.ca)
|
12 |
|
|
//------------------------------------------------------------
|
13 |
|
|
//------------------------------------------------------------
|
14 |
|
|
//
|
15 |
|
|
// main.cpp
|
16 |
|
|
//
|
17 |
|
|
//------------------------------------------------------------
|
18 |
|
|
//------------------------------------------------------------
|
19 |
|
|
// COPYRIGHT 2000
|
20 |
|
|
// Version du 02/03/2006 à 11H26
|
21 |
|
|
//------------------------------------------------------------
|
22 |
|
|
//------------------------------------------------------------
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
#include "gestionversion.h"
|
26 |
|
|
|
27 |
|
|
#include <vcl.h>
|
28 |
|
|
#include <stdio.h>
|
29 |
|
|
#include <io.h>
|
30 |
|
|
#include <dos.h>
|
31 |
|
|
#pragma hdrstop
|
32 |
|
|
|
33 |
|
|
#include "Main.h"
|
34 |
|
|
#include "departwin.h"
|
35 |
|
|
#include "help.h"
|
36 |
|
|
#include "About.h"
|
37 |
|
|
#include "transform.h"
|
38 |
|
|
#include "visuctt.h"
|
39 |
|
|
#include "expwin.h"
|
40 |
|
|
#include "visu.h"
|
41 |
|
|
#include "alicence.h"
|
42 |
francois |
56 |
#include "process.h"
|
43 |
francois |
98 |
#include "operageo.h"
|
44 |
|
5 |
|
45 |
|
|
//---------------------------------------------------------------------------
|
46 |
|
|
#pragma link "CGAUGES"
|
47 |
|
|
#pragma resource "*.dfm"
|
48 |
|
|
TMainForm *MainForm;
|
49 |
|
|
//---------------------------------------------------------------------------
|
50 |
|
|
|
51 |
|
|
__fastcall TMainForm::TMainForm(TComponent *Owner)
|
52 |
|
|
: TForm(Owner),activewinform(NULL),fenlog(NULL)
|
53 |
|
|
{
|
54 |
francois |
62 |
for (int i=0;i<200;i++) valeurconfig[i]=0.;
|
55 |
|
5 |
//axe
|
56 |
|
|
valeurconfig[0]=0.;
|
57 |
|
|
valeurconfig[1]=0.;
|
58 |
|
|
valeurconfig[2]=1.;
|
59 |
|
|
valeurconfig[3]=1.;
|
60 |
|
|
valeurconfig[4]=0.;
|
61 |
|
|
valeurconfig[5]=0.;
|
62 |
|
|
valeurconfig[6]=1.;
|
63 |
|
|
valeurconfig[7]=1.;
|
64 |
|
|
valeurconfig[8]=1.;
|
65 |
|
|
valeurconfig[9]=1.;
|
66 |
|
|
valeurconfig[10]=0.1;
|
67 |
|
|
//fond
|
68 |
|
|
valeurconfig[11]=0.;
|
69 |
|
|
valeurconfig[12]=0.;
|
70 |
|
|
valeurconfig[13]=0.5;
|
71 |
|
|
//m1d
|
72 |
|
|
valeurconfig[14]=1.;
|
73 |
|
|
valeurconfig[15]=0.;
|
74 |
|
|
valeurconfig[16]=0.;
|
75 |
|
|
valeurconfig[17]=1.;
|
76 |
|
|
//m2d
|
77 |
|
|
valeurconfig[18]=1.;
|
78 |
|
|
valeurconfig[19]=0.;
|
79 |
|
|
valeurconfig[20]=0.;
|
80 |
|
|
valeurconfig[21]=1.;
|
81 |
|
|
//m3d
|
82 |
|
|
valeurconfig[22]=1.;
|
83 |
|
|
valeurconfig[23]=0.;
|
84 |
|
|
valeurconfig[24]=0.;
|
85 |
|
|
valeurconfig[25]=1.;
|
86 |
|
|
//geo
|
87 |
|
|
valeurconfig[26]=1.;
|
88 |
|
|
valeurconfig[27]=1.;
|
89 |
|
|
valeurconfig[28]=1.;
|
90 |
|
|
valeurconfig[29]=1.;
|
91 |
|
|
//noeud
|
92 |
|
|
valeurconfig[30]=1.;
|
93 |
|
|
valeurconfig[31]=0.;
|
94 |
|
|
valeurconfig[32]=0.;
|
95 |
|
|
valeurconfig[33]=1.;
|
96 |
|
|
//rendu
|
97 |
|
|
valeurconfig[34]=0.;
|
98 |
|
|
valeurconfig[35]=0.8;
|
99 |
|
|
valeurconfig[36]=0.;
|
100 |
|
|
valeurconfig[37]=0.;
|
101 |
|
|
valeurconfig[38]=0.;
|
102 |
|
|
valeurconfig[39]=0.;
|
103 |
|
|
valeurconfig[40]=1.;
|
104 |
|
|
//qualite
|
105 |
|
|
valeurconfig[41]=0.;
|
106 |
|
|
valeurconfig[42]=1.0;
|
107 |
|
|
valeurconfig[43]=0.;
|
108 |
|
|
valeurconfig[44]=0.;
|
109 |
|
|
valeurconfig[45]=0.;
|
110 |
|
|
valeurconfig[46]=1.;
|
111 |
|
|
valeurconfig[47]=1.;
|
112 |
|
|
valeurconfig[48]=0.;
|
113 |
|
|
valeurconfig[49]=0.;
|
114 |
|
|
valeurconfig[50]=0.5;
|
115 |
|
|
valeurconfig[51]=0.;
|
116 |
|
|
valeurconfig[52]=0.;
|
117 |
|
|
valeurconfig[53]=0.5;
|
118 |
|
|
valeurconfig[54]=0.2;
|
119 |
|
|
valeurconfig[55]=0.1;
|
120 |
|
|
valeurconfig[56]=1.;
|
121 |
|
|
//carte de taille
|
122 |
|
|
valeurconfig[57]=0.;
|
123 |
|
|
valeurconfig[58]=0.;
|
124 |
|
|
valeurconfig[59]=0.;
|
125 |
|
|
valeurconfig[60]=0.;
|
126 |
|
|
valeurconfig[61]=0.;
|
127 |
|
|
valeurconfig[62]=1.;
|
128 |
|
|
valeurconfig[63]=0.;
|
129 |
|
|
valeurconfig[64]=0.;
|
130 |
|
|
valeurconfig[65]=0.5;
|
131 |
francois |
62 |
//degrade
|
132 |
|
|
valeurconfig[66]=0./255.;valeurconfig[67]=0./255.;valeurconfig[68]=255./255.;
|
133 |
|
|
valeurconfig[69]=0./255.;valeurconfig[70]=100./255.;valeurconfig[71]=255./255.;
|
134 |
|
|
valeurconfig[72]=0./255.;valeurconfig[73]=200./255.;valeurconfig[74]=255./255.;
|
135 |
|
|
valeurconfig[75]=0./255.;valeurconfig[76]=255./255.;valeurconfig[77]=255./255.;
|
136 |
|
|
valeurconfig[78]=0./255.;valeurconfig[79]=255./255.;valeurconfig[80]=200./255.;
|
137 |
|
|
valeurconfig[81]=0./255.;valeurconfig[82]=255./255.;valeurconfig[83]=100./255.;
|
138 |
|
|
valeurconfig[84]=0./255.;valeurconfig[85]=255./255.;valeurconfig[86]=0./255.;
|
139 |
|
|
valeurconfig[87]=100./255.;valeurconfig[88]=255./255.;valeurconfig[89]=0./255.;
|
140 |
|
|
valeurconfig[90]=200./255.;valeurconfig[91]=255./255.;valeurconfig[92]=0./255.;
|
141 |
|
|
valeurconfig[93]=255./255.;valeurconfig[94]=255./255.;valeurconfig[95]=0./255.;
|
142 |
|
|
valeurconfig[96]=255./255.;valeurconfig[97]=150./255.;valeurconfig[98]=0./255.;
|
143 |
|
|
valeurconfig[99]=255./255.;valeurconfig[100]=0./255.;valeurconfig[101]=0./255.;
|
144 |
|
|
valeurconfig[102]=255./255.;valeurconfig[103]=0./255.;valeurconfig[104]=0./255.;
|
145 |
|
|
valeurconfig[105]=255./255.;valeurconfig[106]=137./255.;valeurconfig[107]=255./255.;
|
146 |
|
|
//origine maille
|
147 |
|
|
valeurconfig[108]=255./255.;valeurconfig[109]=0./255.;valeurconfig[110]=0./255.;
|
148 |
|
|
valeurconfig[111]=100./255.;valeurconfig[112]=255./255.;valeurconfig[113]=0./255.;
|
149 |
|
|
valeurconfig[114]=50./255.;valeurconfig[115]=155./255.;valeurconfig[116]=100./255.;
|
150 |
|
|
valeurconfig[117]=0./255.;valeurconfig[118]=255./255.;valeurconfig[119]=255./255.;
|
151 |
|
|
valeurconfig[120]=0./255.;valeurconfig[121]=100./255.;valeurconfig[122]=200./255.;
|
152 |
francois |
98 |
char buf[5000];
|
153 |
|
5 |
HKEY clef;
|
154 |
|
|
DWORD type,taille;
|
155 |
|
|
int res=RegOpenKeyEx(HKEY_CURRENT_USER,"SOFTWARE\\UQTR\\VMM\\Configuration",0,KEY_EXECUTE,&clef);
|
156 |
|
|
if (res==ERROR_SUCCESS)
|
157 |
|
|
{
|
158 |
|
|
int res=RegQueryValueEx(clef,"Default",0,&type,0,&taille);
|
159 |
|
|
if (res==ERROR_SUCCESS)
|
160 |
|
|
{
|
161 |
|
|
RegQueryValueEx(clef,"Default",0,&type,buf,&taille);
|
162 |
|
|
char* p=strtok(buf," ");
|
163 |
francois |
62 |
for (int i=0;i<200;i++)
|
164 |
|
5 |
{
|
165 |
|
|
double val;
|
166 |
francois |
62 |
if (p==NULL) continue;
|
167 |
|
|
int nb=sscanf(p,"%lf",&val);
|
168 |
|
|
if (nb!=1) continue;
|
169 |
|
5 |
valeurconfig[i]=val;
|
170 |
|
|
p=strtok(NULL," ");
|
171 |
|
|
}
|
172 |
|
|
}
|
173 |
|
|
}
|
174 |
|
|
|
175 |
|
|
|
176 |
|
|
}
|
177 |
|
|
//---------------------------------------------------------------------------
|
178 |
|
|
|
179 |
|
|
void __fastcall TMainForm::CreateMDIChild(String Name)
|
180 |
|
|
{
|
181 |
|
|
TEditeurWinform *Child;
|
182 |
|
|
|
183 |
|
|
Child = new TEditeurWinform(Application);
|
184 |
|
|
Child->Caption = Name;
|
185 |
|
|
FILE* in=fopen(Child->Caption.c_str(),"rt");
|
186 |
|
|
if (in!=NULL)
|
187 |
|
|
{
|
188 |
|
|
std::ftime ft;
|
189 |
|
|
getftime(fileno(in), &ft);
|
190 |
|
|
char mess[1000];
|
191 |
|
|
sprintf(mess,"Heure fichier: %02u:%02u:%02u\n",ft.ft_hour, ft.ft_min,ft.ft_tsec * 2);
|
192 |
|
|
MainForm->StatusBar->Panels->Items[3]->Text=mess;
|
193 |
|
|
sprintf(mess,"Jour fichier: %02u/%02u/%02u\n",ft.ft_day, ft.ft_month,ft.ft_year+1980);
|
194 |
|
|
MainForm->StatusBar->Panels->Items[4]->Text=mess;
|
195 |
|
|
fclose(in);
|
196 |
|
|
}
|
197 |
|
|
if (FileExists (Name))
|
198 |
|
|
Child->Memo1->Lines->LoadFromFile(Name);
|
199 |
|
|
|
200 |
|
|
}
|
201 |
|
|
//---------------------------------------------------------------------------
|
202 |
|
|
void __fastcall TMainForm::CreateMDIChildVisu(TObject *Sender,String Name)
|
203 |
|
|
{
|
204 |
|
|
|
205 |
|
|
TVisuWinform *child;
|
206 |
|
|
|
207 |
|
|
child=new TVisuWinform(Application);
|
208 |
|
|
child->Caption = Name;
|
209 |
|
|
FILE* in=fopen(child->Caption.c_str(),"rt");
|
210 |
|
|
if (in!=NULL)
|
211 |
|
|
{
|
212 |
|
|
std::ftime ft;
|
213 |
|
|
getftime(fileno(in), &ft);
|
214 |
|
|
char mess[1000];
|
215 |
|
|
sprintf(mess,"Heure fichier: %02u:%02u:%02u\n",ft.ft_hour, ft.ft_min,ft.ft_tsec * 2);
|
216 |
|
|
MainForm->StatusBar->Panels->Items[3]->Text=mess;
|
217 |
|
|
sprintf(mess,"Jour fichier: %02u/%02u/%02u\n",ft.ft_day, ft.ft_month,ft.ft_year+1980);
|
218 |
|
|
MainForm->StatusBar->Panels->Items[4]->Text=mess;
|
219 |
|
|
fclose(in);
|
220 |
|
|
}
|
221 |
|
|
Screen->Cursor=crHourGlass;
|
222 |
|
|
child->Invalidate();
|
223 |
|
|
child->gest=new MG_FILE(Name.c_str());
|
224 |
|
|
if (child->gest->get_code_de_lecture()==0)
|
225 |
|
|
{
|
226 |
|
|
MessageBox(Handle,"Erreur de lecture du fichier","Erreur", MB_OK);
|
227 |
|
|
delete child->gest;
|
228 |
|
|
child->gest=NULL;
|
229 |
|
|
Screen->Cursor=crDefault;
|
230 |
|
|
child->Invalidate();
|
231 |
|
|
child->Close();
|
232 |
|
|
return;
|
233 |
|
|
}
|
234 |
|
|
child->miseajourarbre();
|
235 |
|
|
Screen->Cursor=crDefault;
|
236 |
|
|
child->Invalidate();
|
237 |
|
|
child->ChangemodeExecute(Sender);
|
238 |
|
|
|
239 |
|
|
}
|
240 |
|
|
//---------------------------------------------------------------------------
|
241 |
|
|
|
242 |
|
|
void __fastcall TMainForm::FileNew1Execute(TObject *Sender)
|
243 |
|
|
{
|
244 |
|
|
CreateMDIChild("NONAME" + IntToStr(MDIChildCount + 1));
|
245 |
|
|
}
|
246 |
|
|
//---------------------------------------------------------------------------
|
247 |
|
|
|
248 |
|
|
|
249 |
|
|
void __fastcall TMainForm::HelpAbout1Execute(TObject *Sender)
|
250 |
|
|
{
|
251 |
|
|
AboutBox->ShowModal();
|
252 |
|
|
}
|
253 |
|
|
//---------------------------------------------------------------------------
|
254 |
|
|
|
255 |
|
|
void __fastcall TMainForm::FileExit1Execute(TObject *Sender)
|
256 |
|
|
{
|
257 |
|
|
Close();
|
258 |
|
|
}
|
259 |
|
|
//---------------------------------------------------------------------------
|
260 |
|
|
|
261 |
|
|
|
262 |
|
|
void __fastcall TMainForm::openediteurExecute(TObject *Sender)
|
263 |
|
|
{
|
264 |
|
|
OpenDialog->Filter="Fichier MAGiC|*.magic|Fichier carte de taille|*.ctt|Fichier texte|*.txt|Tous Fichiers |*.*";
|
265 |
|
|
if (OpenDialog->Execute())
|
266 |
|
|
CreateMDIChild(OpenDialog->FileName);
|
267 |
|
|
}
|
268 |
|
|
//---------------------------------------------------------------------------
|
269 |
|
|
|
270 |
|
|
|
271 |
|
|
|
272 |
|
|
void __fastcall TMainForm::openvisuExecute(TObject *Sender)
|
273 |
|
|
{
|
274 |
|
|
OpenDialog->Filter="Fichier MAGiC|*.magic";
|
275 |
|
|
if (OpenDialog->Execute())
|
276 |
|
|
CreateMDIChildVisu(Sender,OpenDialog->FileName);
|
277 |
|
|
}
|
278 |
|
|
//---------------------------------------------------------------------------
|
279 |
|
|
|
280 |
|
|
|
281 |
|
|
|
282 |
|
|
void __fastcall TMainForm::SATMAGiC1Click(TObject *Sender)
|
283 |
|
|
{
|
284 |
|
|
#ifdef BREP_SAT
|
285 |
|
|
Twintransform *Child;
|
286 |
|
|
|
287 |
|
|
Child = new Twintransform(Application);
|
288 |
|
|
Child->Caption = "SAT->MAGiC";
|
289 |
|
|
Child->GroupBox1->Caption = "Fichier SAT";
|
290 |
|
|
Child->OpenDialog1->Filter="Fichier SAT|*.sat|Autres Fichiers|*.*";
|
291 |
|
|
#endif
|
292 |
|
|
}
|
293 |
|
|
//---------------------------------------------------------------------------
|
294 |
|
|
|
295 |
|
|
void __fastcall TMainForm::STEPMAGiC1Click(TObject *Sender)
|
296 |
|
|
{
|
297 |
|
|
#ifdef BREP_STEP
|
298 |
|
|
|
299 |
|
|
Twintransform *Child;
|
300 |
|
|
Child = new Twintransform(Application);
|
301 |
|
|
Child->Caption = "STEP->MAGiC";
|
302 |
|
|
Child->GroupBox1->Caption = "Fichier STEP";
|
303 |
|
|
Child->OpenDialog1->Filter="Fichier STEP|*.st*|Autres Fichiers|*.*";
|
304 |
|
|
#endif
|
305 |
|
|
}
|
306 |
|
|
//---------------------------------------------------------------------------
|
307 |
|
|
|
308 |
|
|
|
309 |
|
|
void __fastcall TMainForm::Timer1Timer(TObject *Sender)
|
310 |
|
|
{
|
311 |
|
|
static int passe=0;
|
312 |
|
|
TDateTime maint=Now();
|
313 |
|
|
unsigned short hh;
|
314 |
|
|
unsigned short mm;
|
315 |
|
|
unsigned short ss;
|
316 |
|
|
unsigned short sss;
|
317 |
|
|
unsigned short an;
|
318 |
|
|
unsigned short mois;
|
319 |
|
|
unsigned short jour;
|
320 |
|
|
maint.DecodeTime(&hh,&mm,&ss,&sss);
|
321 |
|
|
maint.DecodeDate(&an,&mois,&jour);
|
322 |
|
|
char mess[30];
|
323 |
|
|
sprintf(mess,"%02u/%02u/%02u %02uH%02u",jour,mois,an,hh,mm);
|
324 |
|
|
StatusBar->Panels->Items[0]->Text=mess;
|
325 |
|
|
Timer1->Interval=10000;
|
326 |
|
|
if (!passe)
|
327 |
|
|
{
|
328 |
|
|
Timer2->Enabled=true;
|
329 |
|
|
Timer2->Interval=1;
|
330 |
|
|
HKEY clef;
|
331 |
|
|
DWORD type,taille;
|
332 |
|
|
RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\UQTR\\VMM\\",0,KEY_EXECUTE,&clef);
|
333 |
|
|
int res=RegQueryValueEx(clef,"Serveur",0,&type,0,&taille);
|
334 |
|
|
if (res!=ERROR_SUCCESS)
|
335 |
|
|
{
|
336 |
|
|
MessageBox(Handle,"Problème d'installation","Erreur", MB_OK);
|
337 |
|
|
TerminateProcess(GetCurrentProcess(),0);
|
338 |
|
|
}
|
339 |
|
|
char name[100];
|
340 |
|
|
RegQueryValueEx(clef,"Serveur",0,&type,name,&taille);
|
341 |
|
|
ClientSocket1->Host=name;
|
342 |
|
|
passe=1;
|
343 |
|
|
}
|
344 |
|
|
|
345 |
|
|
}
|
346 |
|
|
//---------------------------------------------------------------------------
|
347 |
|
|
|
348 |
|
|
|
349 |
|
|
|
350 |
|
|
|
351 |
|
|
|
352 |
|
|
|
353 |
|
|
|
354 |
|
|
|
355 |
|
|
|
356 |
|
|
void __fastcall TMainForm::WindowCascade1Execute(TObject *Sender)
|
357 |
|
|
{
|
358 |
|
|
Cascade();
|
359 |
|
|
}
|
360 |
|
|
//---------------------------------------------------------------------------
|
361 |
|
|
|
362 |
|
|
|
363 |
|
|
void __fastcall TMainForm::WindowTileHorizontal1Execute(TObject *Sender)
|
364 |
|
|
{
|
365 |
|
|
TileMode = tbHorizontal;
|
366 |
|
|
Tile();
|
367 |
|
|
}
|
368 |
|
|
//---------------------------------------------------------------------------
|
369 |
|
|
|
370 |
|
|
void __fastcall TMainForm::WindowTileVertical1Execute(TObject *Sender)
|
371 |
|
|
{
|
372 |
|
|
TileMode = tbVertical;
|
373 |
|
|
Tile();
|
374 |
|
|
}
|
375 |
|
|
//---------------------------------------------------------------------------
|
376 |
|
|
|
377 |
|
|
void __fastcall TMainForm::WindowArrangeAll1Execute(TObject *Sender)
|
378 |
|
|
{
|
379 |
|
|
ArrangeIcons();
|
380 |
|
|
}
|
381 |
|
|
//---------------------------------------------------------------------------
|
382 |
|
|
|
383 |
|
|
|
384 |
|
|
void __fastcall TMainForm::FormCreate(TObject *Sender)
|
385 |
|
|
{
|
386 |
|
|
char mess[255];
|
387 |
|
|
sprintf(mess,"Visual MAGiC Modulaire v%s",VERSION);
|
388 |
|
|
Caption=mess;
|
389 |
|
|
ToolButton4->ImageIndex=45;
|
390 |
francois |
56 |
ToolButton2->ImageIndex=61;
|
391 |
|
5 |
ToolButton5->ImageIndex=41;
|
392 |
|
|
ToolButton6->ImageIndex=43;
|
393 |
|
|
ToolButton12->ImageIndex=20;
|
394 |
|
|
ToolButton13->ImageIndex=21;
|
395 |
|
|
ToolButton14->ImageIndex=49;
|
396 |
|
|
ToolButton15->ImageIndex=50;
|
397 |
|
|
ToolButton16->ImageIndex=53;
|
398 |
|
|
ToolButton17->ImageIndex=54;
|
399 |
|
|
ToolButton18->ImageIndex=52;
|
400 |
|
|
ToolButton19->ImageIndex=51;
|
401 |
|
|
ToolButton20->ImageIndex=26;
|
402 |
|
|
ToolButton21->ImageIndex=10;
|
403 |
francois |
56 |
ToolButton24->ImageIndex=60;
|
404 |
|
5 |
ToolButton32->ImageIndex=38;
|
405 |
|
|
ToolButton33->ImageIndex=28;
|
406 |
|
|
ToolButton34->ImageIndex=31;
|
407 |
|
|
ToolButton35->ImageIndex=34;
|
408 |
|
|
ToolButton36->ImageIndex=37;
|
409 |
|
|
ToolButton37->ImageIndex=29;
|
410 |
|
|
ToolButton38->ImageIndex=32;
|
411 |
|
|
ToolButton39->ImageIndex=35;
|
412 |
|
|
ToolButton40->ImageIndex=10;
|
413 |
|
|
ToolButton41->ImageIndex=20;
|
414 |
|
|
ToolButton42->ImageIndex=21;
|
415 |
|
|
ToolButton43->ImageIndex=49;
|
416 |
|
|
ToolButton44->ImageIndex=50;
|
417 |
|
|
ToolButton45->ImageIndex=54;
|
418 |
|
|
ToolButton46->ImageIndex=51;
|
419 |
|
|
ToolButton47->ImageIndex=38;
|
420 |
|
|
ToolButton48->ImageIndex=37;
|
421 |
|
|
ToolButton49->ImageIndex=28;
|
422 |
|
|
ToolButton50->ImageIndex=29;
|
423 |
|
|
ToolButton51->ImageIndex=31;
|
424 |
|
|
ToolButton52->ImageIndex=32;
|
425 |
|
|
ToolButton53->ImageIndex=34;
|
426 |
|
|
ToolButton54->ImageIndex=35;
|
427 |
|
|
ToolButton55->ImageIndex=-1;
|
428 |
|
|
ToolButton56->ImageIndex=55;
|
429 |
|
|
ToolButton57->ImageIndex=56;
|
430 |
|
|
ToolButton58->ImageIndex=25;
|
431 |
|
|
ToolButton59->ImageIndex=24;
|
432 |
|
|
ToolButton27->ImageIndex=58;
|
433 |
|
|
gaugeprocess=new gauge(false);
|
434 |
|
|
}
|
435 |
|
|
//---------------------------------------------------------------------------
|
436 |
|
|
|
437 |
|
|
void __fastcall TMainForm::ToolButton4Click(TObject *Sender)
|
438 |
|
|
{
|
439 |
|
|
if (activewinform!=NULL) activewinform->miseajourmodeleExecute(Sender);
|
440 |
|
|
}
|
441 |
|
|
//---------------------------------------------------------------------------
|
442 |
|
|
|
443 |
|
|
void __fastcall TMainForm::ToolButton2Click(TObject *Sender)
|
444 |
|
|
{
|
445 |
|
|
if (activewinform!=NULL) activewinform->lancermagicExecute(Sender);
|
446 |
|
|
}
|
447 |
|
|
//---------------------------------------------------------------------------
|
448 |
|
|
|
449 |
|
|
void __fastcall TMainForm::ToolButton5Click(TObject *Sender)
|
450 |
|
|
{
|
451 |
|
|
if (activewinform!=NULL) activewinform->lancerverimeshExecute(Sender);
|
452 |
|
|
}
|
453 |
|
|
//---------------------------------------------------------------------------
|
454 |
|
|
|
455 |
|
|
void __fastcall TMainForm::ToolButton6Click(TObject *Sender)
|
456 |
|
|
{
|
457 |
|
|
if (activewinform!=NULL) activewinform->ChangemodeExecute(Sender);
|
458 |
|
|
}
|
459 |
|
|
//---------------------------------------------------------------------------
|
460 |
|
|
|
461 |
|
|
void __fastcall TMainForm::ToolButton12Click(TObject *Sender)
|
462 |
|
|
{
|
463 |
|
|
if (activewinform!=NULL) activewinform->shrinkoffExecute(Sender);
|
464 |
|
|
}
|
465 |
|
|
//---------------------------------------------------------------------------
|
466 |
|
|
|
467 |
|
|
void __fastcall TMainForm::ToolButton13Click(TObject *Sender)
|
468 |
|
|
{
|
469 |
|
|
if (activewinform!=NULL) activewinform->shrinkonExecute(Sender);
|
470 |
|
|
}
|
471 |
|
|
//---------------------------------------------------------------------------
|
472 |
|
|
|
473 |
|
|
void __fastcall TMainForm::ToolButton14Click(TObject *Sender)
|
474 |
|
|
{
|
475 |
|
|
if (activewinform!=NULL) activewinform->renderfilExecute(Sender);
|
476 |
|
|
}
|
477 |
|
|
//---------------------------------------------------------------------------
|
478 |
|
|
|
479 |
|
|
void __fastcall TMainForm::ToolButton15Click(TObject *Sender)
|
480 |
|
|
{
|
481 |
|
|
if (activewinform!=NULL) activewinform->rendershadeExecute(Sender);
|
482 |
|
|
}
|
483 |
|
|
//---------------------------------------------------------------------------
|
484 |
|
|
|
485 |
|
|
void __fastcall TMainForm::ToolButton20Click(TObject *Sender)
|
486 |
|
|
{
|
487 |
|
|
if (activewinform!=NULL) activewinform->renderlightExecute(Sender);
|
488 |
|
|
}
|
489 |
|
|
//---------------------------------------------------------------------------
|
490 |
|
|
|
491 |
|
|
void __fastcall TMainForm::ToolButton16Click(TObject *Sender)
|
492 |
|
|
{
|
493 |
|
|
if (activewinform!=NULL) activewinform->qualiteoffExecute(Sender);
|
494 |
|
|
}
|
495 |
|
|
//---------------------------------------------------------------------------
|
496 |
|
|
|
497 |
|
|
void __fastcall TMainForm::ToolButton18Click(TObject *Sender)
|
498 |
|
|
{
|
499 |
|
|
if (activewinform!=NULL) activewinform->qualiteonExecute(Sender);
|
500 |
|
|
}
|
501 |
|
|
//---------------------------------------------------------------------------
|
502 |
|
|
|
503 |
|
|
void __fastcall TMainForm::ToolButton17Click(TObject *Sender)
|
504 |
|
|
{
|
505 |
|
|
if (activewinform!=NULL) activewinform->axeoffExecute(Sender);
|
506 |
|
|
}
|
507 |
|
|
//---------------------------------------------------------------------------
|
508 |
|
|
|
509 |
|
|
void __fastcall TMainForm::ToolButton19Click(TObject *Sender)
|
510 |
|
|
{
|
511 |
|
|
if (activewinform!=NULL) activewinform->axeonExecute(Sender);
|
512 |
|
|
}
|
513 |
|
|
//---------------------------------------------------------------------------
|
514 |
|
|
|
515 |
|
|
void __fastcall TMainForm::ToolButton22Click(TObject *Sender)
|
516 |
|
|
{
|
517 |
|
|
if (activewinform!=NULL) activewinform->noeudoffExecute(Sender);
|
518 |
|
|
}
|
519 |
|
|
//---------------------------------------------------------------------------
|
520 |
|
|
|
521 |
|
|
void __fastcall TMainForm::ToolButton23Click(TObject *Sender)
|
522 |
|
|
{
|
523 |
francois |
98 |
if (activecttform!=NULL) activecttform->maillageoctalExecute(Sender);
|
524 |
|
5 |
}
|
525 |
|
|
//---------------------------------------------------------------------------
|
526 |
|
|
|
527 |
|
|
void __fastcall TMainForm::ToolButton32Click(TObject *Sender)
|
528 |
|
|
{
|
529 |
|
|
if (activewinform!=NULL) activewinform->f3Execute(Sender);
|
530 |
|
|
}
|
531 |
|
|
//---------------------------------------------------------------------------
|
532 |
|
|
|
533 |
|
|
void __fastcall TMainForm::ToolButton36Click(TObject *Sender)
|
534 |
|
|
{
|
535 |
|
|
if (activewinform!=NULL) activewinform->f4Execute(Sender);
|
536 |
|
|
}
|
537 |
|
|
//---------------------------------------------------------------------------
|
538 |
|
|
|
539 |
|
|
void __fastcall TMainForm::ToolButton33Click(TObject *Sender)
|
540 |
|
|
{
|
541 |
|
|
if (activewinform!=NULL) activewinform->xmExecute(Sender);
|
542 |
|
|
}
|
543 |
|
|
//---------------------------------------------------------------------------
|
544 |
|
|
|
545 |
|
|
void __fastcall TMainForm::ToolButton37Click(TObject *Sender)
|
546 |
|
|
{
|
547 |
|
|
if (activewinform!=NULL) activewinform->xpExecute(Sender);
|
548 |
|
|
}
|
549 |
|
|
//---------------------------------------------------------------------------
|
550 |
|
|
|
551 |
|
|
void __fastcall TMainForm::ToolButton34Click(TObject *Sender)
|
552 |
|
|
{
|
553 |
|
|
if (activewinform!=NULL) activewinform->ymExecute(Sender);
|
554 |
|
|
}
|
555 |
|
|
//---------------------------------------------------------------------------
|
556 |
|
|
|
557 |
|
|
void __fastcall TMainForm::ToolButton38Click(TObject *Sender)
|
558 |
|
|
{
|
559 |
|
|
if (activewinform!=NULL) activewinform->ypExecute(Sender);
|
560 |
|
|
}
|
561 |
|
|
//---------------------------------------------------------------------------
|
562 |
|
|
|
563 |
|
|
void __fastcall TMainForm::ToolButton35Click(TObject *Sender)
|
564 |
|
|
{
|
565 |
|
|
if (activewinform!=NULL) activewinform->zmExecute(Sender);
|
566 |
|
|
}
|
567 |
|
|
//---------------------------------------------------------------------------
|
568 |
|
|
|
569 |
|
|
void __fastcall TMainForm::ToolButton39Click(TObject *Sender)
|
570 |
|
|
{
|
571 |
|
|
if (activewinform!=NULL) activewinform->zpExecute(Sender);
|
572 |
|
|
}
|
573 |
|
|
//---------------------------------------------------------------------------
|
574 |
|
|
|
575 |
|
|
void __fastcall TMainForm::opencttExecute(TObject *Sender)
|
576 |
|
|
{
|
577 |
|
|
OpenDialog->Filter="Fichier Carte de taille|*.ctt";
|
578 |
|
|
|
579 |
|
|
if (!(OpenDialog->Execute())) return;
|
580 |
|
|
Tvisucttform *child;
|
581 |
|
|
child=new Tvisucttform(Application);
|
582 |
|
|
child->Caption = OpenDialog->FileName;
|
583 |
|
|
FILE* in=fopen(child->Caption.c_str(),"rt");
|
584 |
|
|
if (in!=NULL)
|
585 |
|
|
{
|
586 |
|
|
std::ftime ft;
|
587 |
|
|
getftime(fileno(in), &ft);
|
588 |
|
|
char mess[1000];
|
589 |
|
|
sprintf(mess,"Heure fichier: %02u:%02u:%02u\n",ft.ft_hour, ft.ft_min,ft.ft_tsec * 2);
|
590 |
|
|
MainForm->StatusBar->Panels->Items[3]->Text=mess;
|
591 |
|
|
sprintf(mess,"Jour fichier: %02u/%02u/%02u\n",ft.ft_day, ft.ft_month,ft.ft_year+1980);
|
592 |
|
|
MainForm->StatusBar->Panels->Items[4]->Text=mess;
|
593 |
|
|
fclose(in);
|
594 |
|
|
}
|
595 |
|
|
|
596 |
|
|
}
|
597 |
|
|
//---------------------------------------------------------------------------
|
598 |
|
|
|
599 |
|
|
void __fastcall TMainForm::ToolButton40Click(TObject *Sender)
|
600 |
|
|
{
|
601 |
|
|
if (activecttform!=NULL) activecttform->configExecute(Sender);
|
602 |
|
|
}
|
603 |
|
|
//---------------------------------------------------------------------------
|
604 |
|
|
|
605 |
|
|
void __fastcall TMainForm::ToolButton41Click(TObject *Sender)
|
606 |
|
|
{
|
607 |
|
|
if (activecttform!=NULL) activecttform->shrinkoffExecute(Sender);
|
608 |
|
|
}
|
609 |
|
|
//---------------------------------------------------------------------------
|
610 |
|
|
|
611 |
|
|
void __fastcall TMainForm::ToolButton42Click(TObject *Sender)
|
612 |
|
|
{
|
613 |
|
|
if (activecttform!=NULL) activecttform->shrinkonExecute(Sender);
|
614 |
|
|
}
|
615 |
|
|
//---------------------------------------------------------------------------
|
616 |
|
|
|
617 |
|
|
void __fastcall TMainForm::ToolButton43Click(TObject *Sender)
|
618 |
|
|
{
|
619 |
|
|
if (activecttform!=NULL) activecttform->renderoffExecute(Sender);
|
620 |
|
|
}
|
621 |
|
|
//---------------------------------------------------------------------------
|
622 |
|
|
|
623 |
|
|
void __fastcall TMainForm::ToolButton44Click(TObject *Sender)
|
624 |
|
|
{
|
625 |
|
|
if (activecttform!=NULL) activecttform->renderonExecute(Sender);
|
626 |
|
|
}
|
627 |
|
|
//---------------------------------------------------------------------------
|
628 |
|
|
|
629 |
|
|
void __fastcall TMainForm::ToolButton45Click(TObject *Sender)
|
630 |
|
|
{
|
631 |
|
|
if (activecttform!=NULL) activecttform->axeoffExecute(Sender);
|
632 |
|
|
}
|
633 |
|
|
//---------------------------------------------------------------------------
|
634 |
|
|
|
635 |
|
|
void __fastcall TMainForm::ToolButton46Click(TObject *Sender)
|
636 |
|
|
{
|
637 |
|
|
if (activecttform!=NULL) activecttform->axeonExecute(Sender);
|
638 |
|
|
}
|
639 |
|
|
//---------------------------------------------------------------------------
|
640 |
|
|
|
641 |
|
|
void __fastcall TMainForm::ToolButton47Click(TObject *Sender)
|
642 |
|
|
{
|
643 |
|
|
if (activecttform!=NULL) activecttform->f3Execute(Sender);
|
644 |
|
|
}
|
645 |
|
|
//---------------------------------------------------------------------------
|
646 |
|
|
|
647 |
|
|
void __fastcall TMainForm::ToolButton48Click(TObject *Sender)
|
648 |
|
|
{
|
649 |
|
|
if (activecttform!=NULL) activecttform->f4Execute(Sender);
|
650 |
|
|
}
|
651 |
|
|
//---------------------------------------------------------------------------
|
652 |
|
|
|
653 |
|
|
void __fastcall TMainForm::ToolButton49Click(TObject *Sender)
|
654 |
|
|
{
|
655 |
|
|
if (activecttform!=NULL) activecttform->xmExecute(Sender);
|
656 |
|
|
}
|
657 |
|
|
//---------------------------------------------------------------------------
|
658 |
|
|
|
659 |
|
|
void __fastcall TMainForm::ToolButton50Click(TObject *Sender)
|
660 |
|
|
{
|
661 |
|
|
if (activecttform!=NULL) activecttform->xpExecute(Sender);
|
662 |
|
|
}
|
663 |
|
|
//---------------------------------------------------------------------------
|
664 |
|
|
|
665 |
|
|
void __fastcall TMainForm::ToolButton51Click(TObject *Sender)
|
666 |
|
|
{
|
667 |
|
|
if (activecttform!=NULL) activecttform->ymExecute(Sender);
|
668 |
|
|
}
|
669 |
|
|
//---------------------------------------------------------------------------
|
670 |
|
|
|
671 |
|
|
void __fastcall TMainForm::ToolButton52Click(TObject *Sender)
|
672 |
|
|
{
|
673 |
|
|
if (activecttform!=NULL) activecttform->ypExecute(Sender);
|
674 |
|
|
}
|
675 |
|
|
//---------------------------------------------------------------------------
|
676 |
|
|
|
677 |
|
|
void __fastcall TMainForm::ToolButton53Click(TObject *Sender)
|
678 |
|
|
{
|
679 |
|
|
if (activecttform!=NULL) activecttform->zmExecute(Sender);
|
680 |
|
|
}
|
681 |
|
|
//---------------------------------------------------------------------------
|
682 |
|
|
|
683 |
|
|
void __fastcall TMainForm::ToolButton54Click(TObject *Sender)
|
684 |
|
|
{
|
685 |
|
|
if (activecttform!=NULL) activecttform->zpExecute(Sender);
|
686 |
|
|
}
|
687 |
|
|
//---------------------------------------------------------------------------
|
688 |
|
|
|
689 |
|
|
void __fastcall TMainForm::ToolButton56Click(TObject *Sender)
|
690 |
|
|
{
|
691 |
|
|
if (activewinform!=NULL) activewinform->afnoeudoffExecute(Sender);
|
692 |
|
|
}
|
693 |
|
|
//---------------------------------------------------------------------------
|
694 |
|
|
|
695 |
|
|
void __fastcall TMainForm::ToolButton58Click(TObject *Sender)
|
696 |
|
|
{
|
697 |
|
|
if (activewinform!=NULL) activewinform->afnoeudonExecute(Sender);
|
698 |
|
|
}
|
699 |
|
|
//---------------------------------------------------------------------------
|
700 |
|
|
|
701 |
|
|
void __fastcall TMainForm::ToolButton57Click(TObject *Sender)
|
702 |
|
|
{
|
703 |
|
|
if (activewinform!=NULL) activewinform->afmailleoffExecute(Sender);
|
704 |
|
|
}
|
705 |
|
|
//---------------------------------------------------------------------------
|
706 |
|
|
|
707 |
|
|
void __fastcall TMainForm::ToolButton59Click(TObject *Sender)
|
708 |
|
|
{
|
709 |
|
|
if (activewinform!=NULL) activewinform->afmailleonExecute(Sender);
|
710 |
|
|
}
|
711 |
|
|
//---------------------------------------------------------------------------
|
712 |
|
|
|
713 |
|
|
void __fastcall TMainForm::AidedeVisualM1Click(TObject *Sender)
|
714 |
|
|
{
|
715 |
|
|
helpwin->Show();
|
716 |
|
|
}
|
717 |
|
|
//---------------------------------------------------------------------------
|
718 |
|
|
|
719 |
|
|
|
720 |
|
|
|
721 |
|
|
void __fastcall TMainForm::openimaExecute(TObject *Sender)
|
722 |
|
|
{
|
723 |
|
|
new Texpwinf(Application);
|
724 |
|
|
}
|
725 |
|
|
//---------------------------------------------------------------------------
|
726 |
|
|
|
727 |
|
|
void __fastcall TMainForm::ToolButton60Click(TObject *Sender)
|
728 |
|
|
{
|
729 |
|
|
if (activewinform!=NULL) activewinform->mailleoffExecute(Sender);
|
730 |
|
|
}
|
731 |
|
|
//---------------------------------------------------------------------------
|
732 |
|
|
|
733 |
|
|
void __fastcall TMainForm::ToolButton61Click(TObject *Sender)
|
734 |
|
|
{
|
735 |
|
|
if (activewinform!=NULL) activewinform->mailleonExecute(Sender);
|
736 |
|
|
}
|
737 |
|
|
//---------------------------------------------------------------------------
|
738 |
|
|
|
739 |
|
|
void __fastcall TMainForm::openfrontExecute(TObject *Sender)
|
740 |
|
|
{
|
741 |
|
|
if (TVisufront::nombre==0)
|
742 |
|
|
{
|
743 |
|
|
new TVisufront(Application);
|
744 |
|
|
TVisufront::nombre=TVisufront::nombre+1;
|
745 |
|
|
}
|
746 |
|
|
else
|
747 |
|
|
{
|
748 |
|
|
MessageBox(Handle,"Une seule instance autorisée","Erreur", MB_OK);
|
749 |
|
|
return;
|
750 |
|
|
}
|
751 |
|
|
}
|
752 |
|
|
//---------------------------------------------------------------------------
|
753 |
|
|
|
754 |
|
|
|
755 |
|
|
void __fastcall TMainForm::Licence1Click(TObject *Sender)
|
756 |
|
|
{
|
757 |
|
|
Aboutlicence->ShowModal();
|
758 |
|
|
}
|
759 |
|
|
//---------------------------------------------------------------------------
|
760 |
|
|
|
761 |
|
|
|
762 |
|
|
void __fastcall TMainForm::FormClose(TObject *Sender, TCloseAction &Action)
|
763 |
|
|
{
|
764 |
|
|
long code;
|
765 |
|
|
for(int i = MDIChildCount-1; i >= 0; i--)
|
766 |
|
|
MDIChildren[i]->Close();
|
767 |
|
|
TerminateThread(gaugeprocess,code);
|
768 |
|
|
}
|
769 |
|
|
//---------------------------------------------------------------------------
|
770 |
|
|
|
771 |
|
|
|
772 |
|
|
void __fastcall TMainForm::ToolButton24Click(TObject *Sender)
|
773 |
|
|
{
|
774 |
|
|
if (activewinform!=NULL) activewinform->lancerg3dExecute(Sender);;
|
775 |
|
|
}
|
776 |
|
|
//---------------------------------------------------------------------------
|
777 |
|
|
|
778 |
|
|
|
779 |
|
|
|
780 |
|
|
|
781 |
|
|
void __fastcall TMainForm::Timer2Timer(TObject *Sender)
|
782 |
|
|
{
|
783 |
|
|
Timer2->Interval=32000;
|
784 |
|
|
ClientSocket1->Open();
|
785 |
|
|
Timer3->Enabled=true;
|
786 |
|
|
}
|
787 |
|
|
//---------------------------------------------------------------------------
|
788 |
|
|
|
789 |
|
|
void __fastcall TMainForm::ClientSocket1Read(TObject *Sender,
|
790 |
|
|
TCustomWinSocket *Socket)
|
791 |
|
|
{
|
792 |
|
|
static int nbpb=0;
|
793 |
|
|
AnsiString rep=Socket->ReceiveText();
|
794 |
|
|
ClientSocket1->Close();
|
795 |
|
|
char *mess=rep.c_str();
|
796 |
|
|
char messtmp[20];
|
797 |
|
|
long num;
|
798 |
|
|
sprintf(messtmp,"%s1",heure);
|
799 |
|
|
StringHasher(messtmp,&num);
|
800 |
|
|
char decode[20];
|
801 |
|
|
sprintf(decode,"%08X",num);
|
802 |
|
|
if (strcmp(mess,decode)!=0)
|
803 |
|
|
{
|
804 |
|
|
nbpb++;
|
805 |
|
|
char mess[255];
|
806 |
|
|
sprintf(mess,"Licence indisponible essai %d",nbpb);
|
807 |
|
|
MessageBox(Handle,mess,"Erreur", MB_OK);
|
808 |
|
|
if (nbpb>3)
|
809 |
|
|
TerminateProcess(GetCurrentProcess(),0);
|
810 |
|
|
}
|
811 |
|
|
|
812 |
|
|
|
813 |
|
|
}
|
814 |
|
|
//---------------------------------------------------------------------------
|
815 |
|
|
|
816 |
|
|
void __fastcall TMainForm::Timer3Timer(TObject *Sender)
|
817 |
|
|
{
|
818 |
|
|
struct time t;
|
819 |
|
|
gettime(&t);
|
820 |
|
|
sprintf(heure,"1 %2d:%02d:%02d.%02d",t.ti_hour, t.ti_min, t.ti_sec, t.ti_hund);
|
821 |
|
|
ClientSocket1->Socket->SendText(heure);
|
822 |
|
|
Timer3->Enabled=false;
|
823 |
|
|
}
|
824 |
|
|
//---------------------------------------------------------------------------
|
825 |
|
|
|
826 |
|
|
void __fastcall TMainForm::ClientSocket1Error(TObject *Sender,
|
827 |
|
|
TCustomWinSocket *Socket, TErrorEvent ErrorEvent, int &ErrorCode)
|
828 |
|
|
{
|
829 |
|
|
static int nbpb=0;
|
830 |
|
|
nbpb++;
|
831 |
|
|
char mess[255];
|
832 |
|
|
sprintf(mess,"Serveur de licence indisponible essai %d",nbpb);
|
833 |
|
|
MessageBox(Handle,mess,"Erreur", MB_OK);
|
834 |
|
|
if (nbpb>2)
|
835 |
|
|
TerminateProcess(GetCurrentProcess(),0);
|
836 |
|
|
ErrorCode=0;
|
837 |
|
|
ClientSocket1->Close();
|
838 |
|
|
}
|
839 |
|
|
//---------------------------------------------------------------------------
|
840 |
|
|
|
841 |
|
|
void __fastcall TMainForm::SL1Click(TObject *Sender)
|
842 |
|
|
{
|
843 |
|
|
#ifdef BREP_SLD
|
844 |
|
|
Twintransform *Child;
|
845 |
|
|
Child = new Twintransform(Application);
|
846 |
|
|
Child->Caption = "SolidWorks->MAGiC";
|
847 |
|
|
Child->GroupBox1->Caption = "Fichier SolidWorks";
|
848 |
|
|
Child->OpenDialog1->Filter="Fichier SolidWorks|*magic.sldprt|Autres Fichiers|*.*";
|
849 |
|
|
Child->RadioButton2->Checked=true;
|
850 |
|
|
Child->RadioButton1->Enabled=false;
|
851 |
|
|
Child->RadioButton2->Enabled=false;
|
852 |
|
|
Child->RadioButton3->Enabled=false;
|
853 |
|
|
Child->RadioButton4->Enabled=false;
|
854 |
|
|
Child->RadioButton5->Enabled=false;
|
855 |
|
|
Child->GroupBox5->Enabled=false;
|
856 |
|
|
#endif
|
857 |
|
|
}
|
858 |
|
|
//---------------------------------------------------------------------------
|
859 |
|
|
|
860 |
|
|
void __fastcall TMainForm::STLMAGiC1Click(TObject *Sender)
|
861 |
|
|
{
|
862 |
|
|
Twintransform *Child = new Twintransform(Application);
|
863 |
|
|
Child->Caption = "STL->MAGiC";
|
864 |
|
|
Child->GroupBox1->Caption = "Fichier STL";
|
865 |
|
|
Child->OpenDialog1->Filter="Fichier STL|*.stl|Autres Fichiers|*.*";
|
866 |
|
|
}
|
867 |
|
|
//---------------------------------------------------------------------------
|
868 |
|
|
|
869 |
|
|
|
870 |
|
|
void __fastcall TMainForm::ToolButton27Click(TObject *Sender)
|
871 |
|
|
{
|
872 |
|
|
if (activewinform!=NULL) activewinform->voirarbreExecute(Sender);
|
873 |
|
|
}
|
874 |
|
|
//---------------------------------------------------------------------------
|
875 |
|
|
|
876 |
|
|
|
877 |
|
|
void __fastcall TMainForm::Fenetrelog1Click(TObject *Sender)
|
878 |
|
|
{
|
879 |
|
|
if (Fenetrelog1->Checked)
|
880 |
|
|
{
|
881 |
|
|
Fenetrelog1->Checked=false;
|
882 |
|
|
fenlog->Close();
|
883 |
|
|
fenlog=NULL;
|
884 |
|
|
}
|
885 |
|
|
else
|
886 |
|
|
{
|
887 |
|
|
Fenetrelog1->Checked=true;
|
888 |
|
|
fenlog=new Twinlog(Application);
|
889 |
|
|
fenlog->Left=0;
|
890 |
|
|
fenlog->Height=0.15*Height;
|
891 |
|
|
fenlog->Top=0.925*(ClientHeight-fenlog->Height);
|
892 |
|
|
}
|
893 |
|
|
}
|
894 |
|
|
//---------------------------------------------------------------------------
|
895 |
|
|
|
896 |
francois |
56 |
void __fastcall TMainForm::Simplificationdegometrie1Click(TObject *Sender)
|
897 |
|
|
{
|
898 |
|
|
DWORD type,taille;
|
899 |
|
|
HKEY clef;
|
900 |
|
|
char name[500];
|
901 |
|
|
RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\UQTR\\VMM\\",0,KEY_EXECUTE,&clef);
|
902 |
|
|
RegQueryValueEx(clef,"pathmodule",0,&type,0,&taille);
|
903 |
|
|
RegQueryValueEx(clef,"pathmodule",0,&type,name,&taille);
|
904 |
|
|
strcat(name,"\\CAD4FE_MCAA_Mesher_GUI.exe");
|
905 |
|
|
spawnl(P_NOWAIT,name,name,NULL);
|
906 |
|
|
if (fenlog!=NULL)
|
907 |
|
|
{
|
908 |
|
|
char mess[2000];
|
909 |
|
|
sprintf(mess,"%s",name);
|
910 |
|
|
fenlog->ajouter(mess);
|
911 |
|
|
}
|
912 |
|
|
}
|
913 |
|
|
//---------------------------------------------------------------------------
|
914 |
|
|
|
915 |
|
|
|
916 |
|
|
|
917 |
|
|
void __fastcall TMainForm::ToolButton30Click(TObject *Sender)
|
918 |
|
|
{
|
919 |
|
|
if (activewinform!=NULL) activewinform->qualiteorigineExecute(Sender);
|
920 |
|
|
}
|
921 |
|
|
//---------------------------------------------------------------------------
|
922 |
|
|
|
923 |
francois |
98 |
void __fastcall TMainForm::OprationsurlagomtrieMAGiC1Click(TObject *Sender)
|
924 |
|
|
{
|
925 |
|
|
Topegeo *Child;
|
926 |
|
|
|
927 |
|
|
Child = new Topegeo(Application);
|
928 |
|
|
}
|
929 |
|
|
//---------------------------------------------------------------------------
|
930 |
|
|
|
931 |
|
|
|