| 9 |
|
Dim iSwApp As SldWorks.SldWorks |
| 10 |
|
Dim userAddin As MAGIC.Magic |
| 11 |
|
|
| 12 |
+ |
Private Raison As Integer |
| 13 |
+ |
|
| 14 |
|
Function Init(ByVal sw As SldWorks.SldWorks, ByVal addin As MAGIC.Magic) As Integer |
| 15 |
|
' on vient ici lorsque l'on choisit le complément MAGIC |
| 16 |
|
iSwApp = sw |
| 18 |
|
|
| 19 |
|
End Function |
| 20 |
|
|
| 21 |
+ |
|
| 22 |
|
Sub AfterClose() Implements PropertyManagerPage2Handler2.AfterClose |
| 23 |
|
|
| 24 |
|
' un fois que la fenêtre des propriétés est fermée on vient ici. |
| 25 |
|
' mais je crois que c'est mieux de mettre le code dans OnClose... |
| 26 |
|
|
| 27 |
+ |
'Dim IndentSize As Integer |
| 28 |
+ |
'IndentSize = System.Diagnostics.Debug.IndentSize |
| 29 |
+ |
'System.Diagnostics.Debug.WriteLine(IndentSize) |
| 30 |
|
Dim IndentSize As Integer |
| 31 |
|
IndentSize = System.Diagnostics.Debug.IndentSize |
| 32 |
|
System.Diagnostics.Debug.WriteLine(IndentSize) |
| 33 |
|
|
| 34 |
+ |
RCCode.debut() |
| 35 |
|
|
| 36 |
|
End Sub |
| 37 |
|
|
| 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 |
– |
|
| 38 |
|
|
| 39 |
< |
End Sub |
| 45 |
< |
|
| 46 |
< |
Sub OnClose(ByVal reason As Integer) Implements PropertyManagerPage2Handler2.OnClose |
| 39 |
> |
Public Sub OnClose(ByVal reason As Integer) Implements PropertyManagerPage2Handler2.OnClose |
| 40 |
|
''This function must contain code, even if it does nothing, to prevent the |
| 41 |
|
''.NET runtime environment from doing garbage collection at the wrong time. |
| 42 |
|
|
| 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 |
– |
|
| 43 |
|
Dim IndentSize As Integer |
| 44 |
|
IndentSize = System.Diagnostics.Debug.IndentSize |
| 45 |
|
System.Diagnostics.Debug.WriteLine(IndentSize) |
| 46 |
|
|
| 47 |
+ |
|
| 48 |
|
' si reason = 1 alors on a fermé en cliquant sur OK |
| 49 |
|
' si reason = 2 alors on ferme en cliquant sur Cancel |
| 50 |
|
|
| 51 |
+ |
Me.Raison = reason |
| 52 |
+ |
|
| 53 |
|
If reason = 1 Then |
| 54 |
< |
' si on est ici c'est qu'on a cliqué sur OK |
| 55 |
< |
If Not RCCode.debut() Then |
| 56 |
< |
' faut trouver un moyen de pas fermer la fenêtre... |
| 57 |
< |
End If |
| 54 |
> |
RCCode.memoriser() |
| 55 |
> |
|
| 56 |
> |
'' ' si on est ici c'est qu'on a cliqué sur OK |
| 57 |
> |
'If Not RCCode.debut() Then |
| 58 |
> |
'MsgBox("Mettre la propriété n'a pas fonctionné!") |
| 59 |
> |
'Else() |
| 60 |
> |
' swModel.Save() |
| 61 |
> |
'End If |
| 62 |
|
End If |
| 63 |
|
|
| 64 |
+ |
Dim x As Double = 2 |
| 65 |
+ |
x += 1 |
| 66 |
+ |
End Sub |
| 67 |
+ |
|
| 68 |
+ |
|
| 69 |
+ |
Sub OnCheckboxCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnCheckboxCheck |
| 70 |
+ |
' status est true si c'est cliqué, false si on enlève le signe |
| 71 |
+ |
' ID est le ID du checkbox |
| 72 |
+ |
If id = 1 Then ' on vient de cliquer sur le checkbox de la face_section |
| 73 |
+ |
If RCCode.RCCheckFacedeSection.Checked = True Then |
| 74 |
+ |
' on désactive un tas de trucs... |
| 75 |
+ |
' mais je ne sais pas trop comment... |
| 76 |
+ |
Else ' on les réactive |
| 77 |
+ |
|
| 78 |
+ |
End If |
| 79 |
+ |
End If |
| 80 |
|
|
| 81 |
|
|
| 82 |
|
End Sub |
| 107 |
|
End Sub |
| 108 |
|
|
| 109 |
|
Function OnHelp() As Boolean Implements PropertyManagerPage2Handler2.OnHelp |
| 110 |
< |
OnHelp = True |
| 111 |
< |
MsgBox("On vient de cliquer sur l'aide") |
| 110 |
> |
'OnHelp = True |
| 111 |
> |
'MsgBox("On vient de cliquer sur l'aide") |
| 112 |
> |
|
| 113 |
|
End Function |
| 114 |
|
|
| 115 |
|
Sub OnListboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnListboxSelectionChanged |
| 136 |
|
End Function |
| 137 |
|
|
| 138 |
|
Sub OnSelectionboxCalloutCreated(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxCalloutCreated |
| 139 |
< |
|
| 139 |
> |
Debug.WriteLine("OnSelectionboxCalloutCreated") |
| 140 |
|
End Sub |
| 141 |
|
|
| 142 |
|
Sub OnSelectionboxCalloutDestroyed(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxCalloutDestroyed |
| 143 |
< |
|
| 143 |
> |
Debug.WriteLine("OnSelectionboxCalloutDestroyed") |
| 144 |
|
End Sub |
| 145 |
|
|
| 146 |
|
Sub OnSelectionboxFocusChanged(ByVal Id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxFocusChanged |
| 147 |
< |
|
| 147 |
> |
Debug.WriteLine("OnSelectionboxFocusChanged") |
| 148 |
|
End Sub |
| 149 |
|
|
| 150 |
|
Sub OnSelectionboxListChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxListChanged |
| 151 |
< |
|
| 151 |
> |
Debug.WriteLine("OnSelectionboxListChanged") |
| 152 |
|
End Sub |
| 153 |
|
|
| 154 |
|
Sub OnTextboxChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler2.OnTextboxChanged |
| 155 |
+ |
Debug.WriteLine("OnTextboxChanged") |
| 156 |
+ |
End Sub |
| 157 |
+ |
|
| 158 |
+ |
'Function OnPreview() As Boolean Implements PropertyManagerPage2Handler2.OnPreview |
| 159 |
+ |
' Debug.WriteLine("OnPreview") |
| 160 |
+ |
'End Function |
| 161 |
+ |
|
| 162 |
+ |
|
| 163 |
+ |
'Function OntabClicked(ByVal id As Integer) As Boolean Implements PropertyManagerPage2Handler2.OnTabClicked |
| 164 |
+ |
' Debug.WriteLine("OntabClicked") |
| 165 |
+ |
'End Function |
| 166 |
+ |
|
| 167 |
+ |
''Sub OnUndo() Implements PropertyManagerPage2Handler2.OnUndo |
| 168 |
+ |
'' Debug.WriteLine("OnUndo") |
| 169 |
+ |
''End Sub |
| 170 |
+ |
|
| 171 |
+ |
'Sub OnSliderPositionChanged(ByVal id As Integer, ByVal value As Double) Implements PropertyManagerPage2Handler2.OnSliderPositionChanged |
| 172 |
+ |
'End Sub |
| 173 |
+ |
|
| 174 |
+ |
''Sub OnSliderTrackingCompleted(ByVal id As Integer, ByVal value As Double) Implements PropertyManagerPage2Handler2.OnSliderTrackingCompleted |
| 175 |
+ |
''End Sub |
| 176 |
+ |
|
| 177 |
+ |
'Function OnsubmitSelection(ByVal Id As Integer, ByVal selection As Object, ByVal seltype As Integer) As Boolean Implements PropertyManagerPage2Handler2.OnSubmitSelection |
| 178 |
+ |
' Debug.WriteLine("OnsubmitSelection") |
| 179 |
+ |
'End Function |
| 180 |
+ |
|
| 181 |
+ |
'Sub OnPopupMenuItem(ByVal Id As Integer) Implements PropertyManagerPage2Handler2.OnPopupMenuItem |
| 182 |
+ |
' Debug.WriteLine("OnPopupMenuItem") |
| 183 |
+ |
'End Sub |
| 184 |
+ |
|
| 185 |
+ |
'Sub OnPopupMenuItemCreated(ByVal id As Integer, ByRef retval As Integer) Implements PropertyManagerPage2Handler2.OnPopupMenuItemUpdate |
| 186 |
+ |
' Debug.WriteLine("OnPopupMenuItemCreated") |
| 187 |
+ |
'End Sub |
| 188 |
+ |
|
| 189 |
+ |
'Sub OnKeyStroke(ByVal wparam As Integer, ByVal message As Integer, ByVal lparam As Integer, ByVal Id As Integer) Implements PropertyManagerPage2Handler2.OnKeystroke |
| 190 |
+ |
' Debug.WriteLine("OnKeyStroke") |
| 191 |
+ |
'End Sub |
| 192 |
+ |
|
| 193 |
+ |
|
| 194 |
+ |
'Sub OnWhatsNew() Implements PropertyManagerPage2Handler2.OnWhatsNew |
| 195 |
+ |
' Debug.WriteLine("OnWhatsNew") |
| 196 |
+ |
'End Sub |
| 197 |
|
|
| 198 |
+ |
Protected Overrides Sub Finalize() |
| 199 |
+ |
MyBase.Finalize() |
| 200 |
|
End Sub |
| 201 |
|
End Class |
| 202 |
|
End Namespace |