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