| 1 |
bournival |
48 |
Imports SolidWorks.Interop
|
| 2 |
|
|
Imports SolidWorks.Interop.swconst
|
| 3 |
|
|
Imports SolidWorks.Interop.swpublished
|
| 4 |
bournival |
40 |
|
| 5 |
|
|
Namespace ConditionsAuxLimites
|
| 6 |
|
|
Public Class CLPageHandler
|
| 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 = 2 pour les topologies sous-jacentes
|
| 34 |
|
|
' ID = 3 pour les conditions sur une seule annotation
|
| 35 |
|
|
|
| 36 |
|
|
'If id = 2 And status = True Then
|
| 37 |
|
|
' CLCode.SousJacent = True
|
| 38 |
|
|
' inclure_sous_jacent()
|
| 39 |
|
|
'ElseIf id = 2 And status = False Then
|
| 40 |
|
|
' CLCode.SousJacent = False
|
| 41 |
|
|
'End If
|
| 42 |
|
|
|
| 43 |
|
|
End Sub
|
| 44 |
|
|
|
| 45 |
|
|
Sub OnClose(ByVal reason As Integer) Implements PropertyManagerPage2Handler2.OnClose
|
| 46 |
|
|
''This function must contain code, even if it does nothing, to prevent the
|
| 47 |
|
|
''.NET runtime environment from doing garbage collection at the wrong time.
|
| 48 |
|
|
|
| 49 |
|
|
' c'est ici que l'on vient lorsque l'on clique sur OK ou sur Cancel dans la fenêtre
|
| 50 |
|
|
' des propriétés.
|
| 51 |
|
|
|
| 52 |
|
|
Dim IndentSize As Integer
|
| 53 |
|
|
IndentSize = System.Diagnostics.Debug.IndentSize
|
| 54 |
|
|
System.Diagnostics.Debug.WriteLine(IndentSize)
|
| 55 |
|
|
|
| 56 |
|
|
' si reason = 1 alors on a fermé en cliquant sur OK
|
| 57 |
|
|
' si reason = 2 alors on ferme en cliquant sur Cancel
|
| 58 |
|
|
|
| 59 |
|
|
If reason = 1 Then
|
| 60 |
|
|
' si on est ici c'est qu'on a cliqué sur OK
|
| 61 |
|
|
CLCode.enregistrer_CL()
|
| 62 |
|
|
End If
|
| 63 |
|
|
|
| 64 |
|
|
|
| 65 |
|
|
End Sub
|
| 66 |
|
|
|
| 67 |
|
|
Sub OnComboboxEditChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler2.OnComboboxEditChanged
|
| 68 |
|
|
|
| 69 |
|
|
End Sub
|
| 70 |
|
|
|
| 71 |
|
|
Function OnActiveXControlCreated(ByVal id As Integer, ByVal status As Boolean) As Integer Implements PropertyManagerPage2Handler2.OnActiveXControlCreated
|
| 72 |
|
|
OnActiveXControlCreated = -1
|
| 73 |
|
|
End Function
|
| 74 |
|
|
|
| 75 |
|
|
Sub OnButtonPress(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnButtonPress
|
| 76 |
|
|
If id = 2 Then
|
| 77 |
|
|
inclure_sous_jacent()
|
| 78 |
|
|
End If
|
| 79 |
|
|
End Sub
|
| 80 |
|
|
|
| 81 |
|
|
Sub OnComboboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnComboboxSelectionChanged
|
| 82 |
|
|
' ici quand la sélection du combo est changée
|
| 83 |
|
|
|
| 84 |
|
|
End Sub
|
| 85 |
|
|
|
| 86 |
|
|
Sub OnGroupCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnGroupCheck
|
| 87 |
|
|
|
| 88 |
|
|
End Sub
|
| 89 |
|
|
|
| 90 |
|
|
Sub OnGroupExpand(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnGroupExpand
|
| 91 |
|
|
|
| 92 |
|
|
End Sub
|
| 93 |
|
|
|
| 94 |
|
|
Function OnHelp() As Boolean Implements PropertyManagerPage2Handler2.OnHelp
|
| 95 |
|
|
OnHelp = True
|
| 96 |
|
|
MsgBox("On vient de cliquer sur l'aide")
|
| 97 |
|
|
End Function
|
| 98 |
|
|
|
| 99 |
|
|
Sub OnListboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnListboxSelectionChanged
|
| 100 |
|
|
|
| 101 |
|
|
End Sub
|
| 102 |
|
|
|
| 103 |
|
|
Function OnNextPage() As Boolean Implements PropertyManagerPage2Handler2.OnNextPage
|
| 104 |
|
|
OnNextPage = True
|
| 105 |
|
|
|
| 106 |
|
|
End Function
|
| 107 |
|
|
|
| 108 |
|
|
Sub OnNumberboxChanged(ByVal id As Integer, ByVal val As Double) Implements PropertyManagerPage2Handler2.OnNumberboxChanged
|
| 109 |
|
|
|
| 110 |
|
|
End Sub
|
| 111 |
|
|
|
| 112 |
|
|
Sub OnOptionCheck(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnOptionCheck
|
| 113 |
|
|
|
| 114 |
|
|
End Sub
|
| 115 |
|
|
|
| 116 |
|
|
Function OnPreviousPage() As Boolean Implements PropertyManagerPage2Handler2.OnPreviousPage
|
| 117 |
|
|
OnPreviousPage = True
|
| 118 |
|
|
End Function
|
| 119 |
|
|
|
| 120 |
|
|
Sub OnSelectionboxCalloutCreated(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxCalloutCreated
|
| 121 |
|
|
|
| 122 |
|
|
End Sub
|
| 123 |
|
|
|
| 124 |
|
|
Sub OnSelectionboxCalloutDestroyed(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxCalloutDestroyed
|
| 125 |
|
|
|
| 126 |
|
|
End Sub
|
| 127 |
|
|
|
| 128 |
|
|
Sub OnSelectionboxFocusChanged(ByVal Id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxFocusChanged
|
| 129 |
|
|
|
| 130 |
|
|
End Sub
|
| 131 |
|
|
|
| 132 |
|
|
Sub OnSelectionboxListChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxListChanged
|
| 133 |
|
|
|
| 134 |
|
|
End Sub
|
| 135 |
|
|
|
| 136 |
|
|
Sub OnTextboxChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler2.OnTextboxChanged
|
| 137 |
|
|
|
| 138 |
|
|
End Sub
|
| 139 |
|
|
End Class
|
| 140 |
|
|
End Namespace |