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 |
|
|
// help.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 |
|
|
#pragma hdrstop
|
29 |
|
|
|
30 |
|
|
#include "help.h"
|
31 |
|
|
//---------------------------------------------------------------------------
|
32 |
|
|
#pragma package(smart_init)
|
33 |
|
|
//#pragma link "SHDocVw_OCX"
|
34 |
|
|
#pragma resource "*.dfm"
|
35 |
|
|
Thelpwin *helpwin;
|
36 |
|
|
//---------------------------------------------------------------------------
|
37 |
|
|
__fastcall Thelpwin::Thelpwin(TComponent* Owner)
|
38 |
|
|
: TForm(Owner)
|
39 |
|
|
{
|
40 |
|
|
}
|
41 |
|
|
//---------------------------------------------------------------------------
|
42 |
|
|
void __fastcall Thelpwin::FormShow(TObject *Sender)
|
43 |
|
|
{
|
44 |
|
|
int res;
|
45 |
|
|
HKEY clef;
|
46 |
|
|
DWORD type,taille;
|
47 |
|
|
char *name;
|
48 |
|
|
char mess[255];
|
49 |
|
|
res=RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\UQTR\\VMM\\",0,KEY_EXECUTE,&clef);
|
50 |
|
|
if (res!=ERROR_SUCCESS)
|
51 |
|
|
{
|
52 |
|
|
MessageBox(Handle,"Problème d'installation.","Erreur", MB_OK);
|
53 |
|
|
Close();
|
54 |
|
|
}
|
55 |
|
|
res=RegQueryValueEx(clef,"documentation",0,&type,0,&taille);
|
56 |
|
|
if (res!=ERROR_SUCCESS)
|
57 |
|
|
{
|
58 |
|
|
MessageBox(Handle,"Problème d'installation","Erreur", MB_OK);
|
59 |
|
|
Close();
|
60 |
|
|
}
|
61 |
|
|
name=new char[taille];
|
62 |
|
|
RegQueryValueEx(clef,"documentation",0,&type,name,&taille);
|
63 |
|
|
TVariant url(name);
|
64 |
|
|
CppWebBrowser1->Navigate2(&url);
|
65 |
|
|
delete [] name;
|
66 |
|
|
}
|
67 |
|
|
//---------------------------------------------------------------------------
|
68 |
|
|
void __fastcall Thelpwin::BitBtn1Click(TObject *Sender)
|
69 |
|
|
{
|
70 |
|
|
CppWebBrowser1->GoBack();
|
71 |
|
|
|
72 |
|
|
}
|
73 |
|
|
//---------------------------------------------------------------------------
|
74 |
|
|
void __fastcall Thelpwin::BitBtn2Click(TObject *Sender)
|
75 |
|
|
{
|
76 |
|
|
CppWebBrowser1->GoForward();
|
77 |
|
|
}
|
78 |
|
|
//---------------------------------------------------------------------------
|
79 |
|
|
void __fastcall Thelpwin::BitBtn4Click(TObject *Sender)
|
80 |
|
|
{
|
81 |
|
|
Close();
|
82 |
|
|
}
|
83 |
|
|
//---------------------------------------------------------------------------
|
84 |
|
|
void __fastcall Thelpwin::BitBtn3Click(TObject *Sender)
|
85 |
|
|
{
|
86 |
|
|
int res;
|
87 |
|
|
HKEY clef;
|
88 |
|
|
DWORD type,taille;
|
89 |
|
|
char *name;
|
90 |
|
|
char mess[255];
|
91 |
|
|
res=RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\UQTR\\VMM\\",0,KEY_EXECUTE,&clef);
|
92 |
|
|
if (res!=ERROR_SUCCESS)
|
93 |
|
|
{
|
94 |
|
|
MessageBox(Handle,"Problème d'installation.","Erreur", MB_OK);
|
95 |
|
|
Close();
|
96 |
|
|
}
|
97 |
|
|
res=RegQueryValueEx(clef,"documentation",0,&type,0,&taille);
|
98 |
|
|
if (res!=ERROR_SUCCESS)
|
99 |
|
|
{
|
100 |
|
|
MessageBox(Handle,"Problème d'installation","Erreur", MB_OK);
|
101 |
|
|
Close();
|
102 |
|
|
}
|
103 |
|
|
name=new char[taille];
|
104 |
|
|
RegQueryValueEx(clef,"documentation",0,&type,name,&taille);
|
105 |
|
|
TVariant url(name);
|
106 |
|
|
CppWebBrowser1->Navigate2(&url);
|
107 |
|
|
delete [] name;
|
108 |
|
|
}
|
109 |
|
|
//---------------------------------------------------------------------------
|
110 |
|
|
void __fastcall Thelpwin::FormResize(TObject *Sender)
|
111 |
|
|
{
|
112 |
|
|
Image1->Left=ClientWidth-24-Image1->Width;
|
113 |
|
|
CppWebBrowser1->Left=0;
|
114 |
|
|
CppWebBrowser1->Top=72;
|
115 |
|
|
CppWebBrowser1->Height=ClientHeight-CppWebBrowser1->Top;
|
116 |
|
|
CppWebBrowser1->Width=ClientWidth-CppWebBrowser1->Left;
|
117 |
|
|
}
|
118 |
|
|
//---------------------------------------------------------------------------
|