4 |
|
|
5 |
|
Namespace Enregistrement |
6 |
|
Public Class EnregistrementPageHandler |
7 |
< |
Implements PropertyManagerPage2Handler2 |
7 |
> |
Implements PropertyManagerPage2Handler4 |
8 |
|
|
9 |
|
Dim iSwApp As SldWorks.SldWorks |
10 |
|
Dim userAddin As MAGIC.Magic |
11 |
|
|
12 |
|
|
13 |
|
|
14 |
+ |
Sub OnSliderPositionChanged(ByVal id As Integer, ByVal value As Double) Implements PropertyManagerPage2Handler4.OnSliderPositionChanged |
15 |
+ |
EnregistrementCode.labelRemi1.Caption = "Précision d'analyse -->" & value |
16 |
+ |
End Sub |
17 |
+ |
|
18 |
+ |
Sub OnSliderTrackingCompleted(ByVal id As Integer, ByVal value As Double) Implements PropertyManagerPage2Handler4.OnSliderTrackingCompleted |
19 |
+ |
EnregistrementCode.labelRemi1.Caption = "Précision d'analyse -->" & value |
20 |
+ |
End Sub |
21 |
+ |
|
22 |
+ |
|
23 |
+ |
Function OnPreview() As Boolean Implements PropertyManagerPage2Handler4.OnPreview |
24 |
+ |
|
25 |
+ |
End Function |
26 |
+ |
|
27 |
+ |
Sub oncomboboxitemchanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler4.OnComboboxSelectionChanged |
28 |
+ |
|
29 |
+ |
End Sub |
30 |
+ |
|
31 |
+ |
Function OntabClicked(ByVal id As Integer) As Boolean Implements PropertyManagerPage2Handler4.OnTabClicked |
32 |
+ |
|
33 |
+ |
End Function |
34 |
+ |
|
35 |
+ |
Sub OnUndo() Implements PropertyManagerPage2Handler4.OnUndo |
36 |
+ |
|
37 |
+ |
End Sub |
38 |
+ |
|
39 |
+ |
|
40 |
+ |
|
41 |
+ |
Function OnsubmitSelection(ByVal Id As Integer, ByVal selection As Object, ByVal seltype As Integer) As Boolean Implements PropertyManagerPage2Handler4.OnSubmitSelection |
42 |
|
|
43 |
< |
Function Init(ByVal sw As SldWorks.SldWorks, ByVal addin As MAGIC.Magic) As Integer |
43 |
> |
End Function |
44 |
> |
|
45 |
> |
Sub OnPopupMenuItem(ByVal Id As Integer) Implements PropertyManagerPage2Handler4.OnPopupMenuItem |
46 |
> |
|
47 |
> |
End Sub |
48 |
> |
|
49 |
> |
Sub OnPopupMenuItemCreated(ByVal id As Integer, ByRef retval As Integer) Implements PropertyManagerPage2Handler4.OnPopupMenuItemUpdate |
50 |
> |
|
51 |
> |
End Sub |
52 |
> |
|
53 |
> |
Sub OnKeyStroke(ByVal wparam As Integer, ByVal message As Integer, ByVal lparam As Integer, ByVal Id As Integer) Implements PropertyManagerPage2Handler4.OnKeystroke |
54 |
> |
|
55 |
> |
End Sub |
56 |
> |
|
57 |
> |
|
58 |
> |
Sub OnWhatsNew() Implements PropertyManagerPage2Handler4.OnWhatsNew |
59 |
> |
|
60 |
> |
End Sub |
61 |
> |
|
62 |
> |
|
63 |
> |
|
64 |
> |
Function Init(ByVal sw As sldworks.SldWorks, ByVal addin As MAGIC.Magic) As Integer |
65 |
|
' on vient ici lorsque l'on choisit le complément MAGIC |
66 |
|
iSwApp = sw |
67 |
|
userAddin = addin |
71 |
|
|
72 |
|
End Function |
73 |
|
|
74 |
< |
Sub AfterClose() Implements PropertyManagerPage2Handler2.AfterClose |
74 |
> |
Sub AfterClose() Implements PropertyManagerPage2Handler4.AfterClose |
75 |
|
|
76 |
|
' un fois que la fenêtre des propriétés est fermée on vient ici. |
77 |
|
' mais je crois que c'est mieux de mettre le code dans OnClose... |
85 |
|
|
86 |
|
End Sub |
87 |
|
|
88 |
< |
Sub OnCheckboxCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnCheckboxCheck |
88 |
> |
Sub OnCheckboxCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler4.OnCheckboxCheck |
89 |
|
' status est true si c'est cliqué, false si on enlève le signe |
90 |
|
' ID = 2 pour les topologies sous-jacentes |
91 |
|
' ID = 3 pour les conditions sur une seule annotation |
93 |
|
|
94 |
|
End Sub |
95 |
|
|
96 |
< |
Sub OnClose(ByVal reason As Integer) Implements PropertyManagerPage2Handler2.OnClose |
96 |
> |
Sub OnClose(ByVal reason As Integer) Implements PropertyManagerPage2Handler4.OnClose |
97 |
|
|
98 |
|
'Err.Raise(1) |
99 |
|
|
120 |
|
|
121 |
|
End Sub |
122 |
|
|
123 |
< |
Sub OnComboboxEditChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler2.OnComboboxEditChanged |
123 |
> |
Sub OnComboboxEditChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler4.OnComboboxEditChanged |
124 |
|
|
125 |
|
End Sub |
126 |
|
|
127 |
< |
Function OnActiveXControlCreated(ByVal id As Integer, ByVal status As Boolean) As Integer Implements PropertyManagerPage2Handler2.OnActiveXControlCreated |
127 |
> |
Function OnActiveXControlCreated(ByVal id As Integer, ByVal status As Boolean) As Integer Implements PropertyManagerPage2Handler4.OnActiveXControlCreated |
128 |
|
OnActiveXControlCreated = -1 |
129 |
|
End Function |
130 |
|
|
131 |
< |
Sub OnButtonPress(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnButtonPress |
131 |
> |
Sub OnButtonPress(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnButtonPress |
132 |
|
'MsgBox(id) |
133 |
|
End Sub |
134 |
|
|
86 |
– |
Sub OnComboboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnComboboxSelectionChanged |
87 |
– |
' ici quand la sélection du combo est changée |
88 |
– |
|
89 |
– |
End Sub |
135 |
|
|
136 |
< |
Sub OnGroupCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnGroupCheck |
136 |
> |
Sub OnGroupCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler4.OnGroupCheck |
137 |
|
Dim volume As Double |
138 |
|
Dim surface As Double |
139 |
|
Dim eng As Double |
140 |
< |
Dim swMprop As SldWorks.MassProperty |
140 |
> |
Dim swMprop As sldworks.MassProperty |
141 |
|
swMprop = swModel.Extension.CreateMassProperty |
142 |
|
volume = swMprop.Volume |
143 |
|
surface = swMprop.SurfaceArea |
147 |
|
|
148 |
|
End Sub |
149 |
|
|
150 |
< |
Sub OnGroupExpand(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnGroupExpand |
150 |
> |
Sub OnGroupExpand(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler4.OnGroupExpand |
151 |
|
|
152 |
|
End Sub |
153 |
|
|
154 |
< |
Function OnHelp() As Boolean Implements PropertyManagerPage2Handler2.OnHelp |
154 |
> |
Function OnHelp() As Boolean Implements PropertyManagerPage2Handler4.OnHelp |
155 |
|
OnHelp = True |
156 |
|
MsgBox("On vient de cliquer sur l'aide") |
157 |
|
End Function |
158 |
|
|
159 |
< |
Sub OnListboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnListboxSelectionChanged |
159 |
> |
Sub OnListboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler4.OnListboxSelectionChanged |
160 |
|
|
161 |
|
End Sub |
162 |
|
|
163 |
< |
Function OnNextPage() As Boolean Implements PropertyManagerPage2Handler2.OnNextPage |
163 |
> |
Function OnNextPage() As Boolean Implements PropertyManagerPage2Handler4.OnNextPage |
164 |
|
OnNextPage = True |
165 |
|
|
166 |
|
End Function |
167 |
|
|
168 |
< |
Sub OnNumberboxChanged(ByVal id As Integer, ByVal val As Double) Implements PropertyManagerPage2Handler2.OnNumberboxChanged |
168 |
> |
Sub OnNumberboxChanged(ByVal id As Integer, ByVal val As Double) Implements PropertyManagerPage2Handler4.OnNumberboxChanged |
169 |
|
'MsgBox(" Valeur de l'arrondi: " & EnregistrementCode.NumberArrondi.Value()) |
170 |
|
End Sub |
171 |
|
|
172 |
< |
Sub OnOptionCheck(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnOptionCheck |
172 |
> |
Sub OnOptionCheck(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnOptionCheck |
173 |
|
|
174 |
|
End Sub |
175 |
|
|
176 |
< |
Function OnPreviousPage() As Boolean Implements PropertyManagerPage2Handler2.OnPreviousPage |
176 |
> |
Function OnPreviousPage() As Boolean Implements PropertyManagerPage2Handler4.OnPreviousPage |
177 |
|
OnPreviousPage = True |
178 |
|
End Function |
179 |
|
|
180 |
< |
Sub OnSelectionboxCalloutCreated(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxCalloutCreated |
180 |
> |
Sub OnSelectionboxCalloutCreated(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxCalloutCreated |
181 |
|
|
182 |
|
End Sub |
183 |
|
|
184 |
< |
Sub OnSelectionboxCalloutDestroyed(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxCalloutDestroyed |
184 |
> |
Sub OnSelectionboxCalloutDestroyed(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxCalloutDestroyed |
185 |
|
|
186 |
|
End Sub |
187 |
|
|
188 |
< |
Sub OnSelectionboxFocusChanged(ByVal Id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxFocusChanged |
188 |
> |
Sub OnSelectionboxFocusChanged(ByVal Id As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxFocusChanged |
189 |
|
|
190 |
|
End Sub |
191 |
|
|
192 |
< |
Sub OnSelectionboxListChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxListChanged |
192 |
> |
Sub OnSelectionboxListChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxListChanged |
193 |
|
|
194 |
|
End Sub |
195 |
|
|
196 |
< |
Sub OnTextboxChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler2.OnTextboxChanged |
196 |
> |
Sub OnTextboxChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler4.OnTextboxChanged |
197 |
|
|
198 |
|
End Sub |
199 |
|
|