ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magicsld/RCPageHandler.vb
Revision: 48
Committed: Wed Aug 22 21:18:12 2007 UTC (17 years, 8 months ago) by bournival
File size: 5670 byte(s)
Log Message:
On passe aux nouveaux .dll

File Contents

# Content
1 Imports SolidWorks.Interop
2 Imports SolidWorks.Interop.swconst
3 Imports SolidWorks.Interop.swpublished
4
5 Namespace RealConstant
6 Public Class RCPageHandler
7 Implements PropertyManagerPage2Handler2
8
9 Dim iSwApp As SldWorks.SldWorks
10 Dim userAddin As MAGIC.Magic
11
12 Function Init(ByVal sw As SldWorks.SldWorks, ByVal addin As MAGIC.Magic) As Integer
13 ' on vient ici lorsque l'on choisit le complément MAGIC
14 iSwApp = sw
15 userAddin = addin
16
17 End Function
18
19 Sub AfterClose() Implements PropertyManagerPage2Handler2.AfterClose
20
21 ' un fois que la fenêtre des propriétés est fermée on vient ici.
22 ' mais je crois que c'est mieux de mettre le code dans OnClose...
23
24 Dim IndentSize As Integer
25 IndentSize = System.Diagnostics.Debug.IndentSize
26 System.Diagnostics.Debug.WriteLine(IndentSize)
27
28
29 End Sub
30
31 Sub OnCheckboxCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnCheckboxCheck
32 ' status est true si c'est cliqué, false si on enlève le signe
33 ' ID est le ID du checkbox
34 If id = 1 Then ' on vient de cliquer sur le checkbox de la face_section
35 If RCCode.RCCheckFacedeSection.Checked = True Then
36 ' on désactive un tas de trucs...
37 ' mais je ne sais pas trop comment...
38 Else ' on les réactive
39
40 End If
41 End If
42
43
44 End Sub
45
46 Sub OnClose(ByVal reason As Integer) Implements PropertyManagerPage2Handler2.OnClose
47 ''This function must contain code, even if it does nothing, to prevent the
48 ''.NET runtime environment from doing garbage collection at the wrong time.
49
50 ' c'est ici que l'on vient lorsque l'on clique sur OK ou sur Cancel dans la fenêtre
51 ' des propriétés.
52
53 Dim IndentSize As Integer
54 IndentSize = System.Diagnostics.Debug.IndentSize
55 System.Diagnostics.Debug.WriteLine(IndentSize)
56
57 ' si reason = 1 alors on a fermé en cliquant sur OK
58 ' si reason = 2 alors on ferme en cliquant sur Cancel
59
60 If reason = 1 Then
61 ' si on est ici c'est qu'on a cliqué sur OK
62 If Not RCCode.debut() Then
63 ' faut trouver un moyen de pas fermer la fenêtre...
64 End If
65 End If
66
67
68
69 End Sub
70
71 Sub OnComboboxEditChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler2.OnComboboxEditChanged
72 MsgBox("Combobox edit change")
73 End Sub
74
75 Function OnActiveXControlCreated(ByVal id As Integer, ByVal status As Boolean) As Integer Implements PropertyManagerPage2Handler2.OnActiveXControlCreated
76 OnActiveXControlCreated = -1
77 End Function
78
79 Sub OnButtonPress(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnButtonPress
80 MsgBox("Button press ID = " & id)
81 End Sub
82
83 Sub OnComboboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnComboboxSelectionChanged
84 ' ici quand la sélection d'un combo est changée
85 If id = 4 Then RCCode.InfoPoutres(0)
86 End Sub
87
88 Sub OnGroupCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnGroupCheck
89 'MsgBox("OnGroupCheck")
90 End Sub
91
92 Sub OnGroupExpand(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnGroupExpand
93
94 End Sub
95
96 Function OnHelp() As Boolean Implements PropertyManagerPage2Handler2.OnHelp
97 OnHelp = True
98 MsgBox("On vient de cliquer sur l'aide")
99 End Function
100
101 Sub OnListboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnListboxSelectionChanged
102
103 End Sub
104
105 Function OnNextPage() As Boolean Implements PropertyManagerPage2Handler2.OnNextPage
106 OnNextPage = True
107 MsgBox("Onnextpage")
108 End Function
109
110 Sub OnNumberboxChanged(ByVal id As Integer, ByVal val As Double) Implements PropertyManagerPage2Handler2.OnNumberboxChanged
111 'MsgBox("onnumberchange")
112 RCCode.InfoPoutres(id)
113
114 End Sub
115
116 Sub OnOptionCheck(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnOptionCheck
117 'MsgBox("OnOptionCheck")
118 End Sub
119
120 Function OnPreviousPage() As Boolean Implements PropertyManagerPage2Handler2.OnPreviousPage
121 OnPreviousPage = True
122 End Function
123
124 Sub OnSelectionboxCalloutCreated(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxCalloutCreated
125
126 End Sub
127
128 Sub OnSelectionboxCalloutDestroyed(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxCalloutDestroyed
129
130 End Sub
131
132 Sub OnSelectionboxFocusChanged(ByVal Id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxFocusChanged
133
134 End Sub
135
136 Sub OnSelectionboxListChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxListChanged
137
138 End Sub
139
140 Sub OnTextboxChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler2.OnTextboxChanged
141
142 End Sub
143 End Class
144 End Namespace