ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magicsld/RCPageHandler.vb
Revision: 130
Committed: Wed Jul 30 21:26:03 2008 UTC (16 years, 9 months ago) by bournival
File size: 8206 byte(s)
Log Message:
Une mise à jour, car on aura peut-être besoin de mon code.

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 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
17 userAddin = addin
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
38
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
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 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
83
84 Sub OnComboboxEditChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler2.OnComboboxEditChanged
85 MsgBox("Combobox edit change")
86 End Sub
87
88 Function OnActiveXControlCreated(ByVal id As Integer, ByVal status As Boolean) As Integer Implements PropertyManagerPage2Handler2.OnActiveXControlCreated
89 OnActiveXControlCreated = -1
90 End Function
91
92 Sub OnButtonPress(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnButtonPress
93 MsgBox("Button press ID = " & id)
94 End Sub
95
96 Sub OnComboboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnComboboxSelectionChanged
97 ' ici quand la sélection d'un combo est changée
98 If id = 4 Then RCCode.InfoPoutres(0)
99 End Sub
100
101 Sub OnGroupCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnGroupCheck
102 'MsgBox("OnGroupCheck")
103 End Sub
104
105 Sub OnGroupExpand(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnGroupExpand
106
107 End Sub
108
109 Function OnHelp() As Boolean Implements PropertyManagerPage2Handler2.OnHelp
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
116
117 End Sub
118
119 Function OnNextPage() As Boolean Implements PropertyManagerPage2Handler2.OnNextPage
120 OnNextPage = True
121 MsgBox("Onnextpage")
122 End Function
123
124 Sub OnNumberboxChanged(ByVal id As Integer, ByVal val As Double) Implements PropertyManagerPage2Handler2.OnNumberboxChanged
125 'MsgBox("onnumberchange")
126 RCCode.InfoPoutres(id)
127
128 End Sub
129
130 Sub OnOptionCheck(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnOptionCheck
131 'MsgBox("OnOptionCheck")
132 End Sub
133
134 Function OnPreviousPage() As Boolean Implements PropertyManagerPage2Handler2.OnPreviousPage
135 OnPreviousPage = True
136 End Function
137
138 Sub OnSelectionboxCalloutCreated(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxCalloutCreated
139 Debug.WriteLine("OnSelectionboxCalloutCreated")
140 End Sub
141
142 Sub OnSelectionboxCalloutDestroyed(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxCalloutDestroyed
143 Debug.WriteLine("OnSelectionboxCalloutDestroyed")
144 End Sub
145
146 Sub OnSelectionboxFocusChanged(ByVal Id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxFocusChanged
147 Debug.WriteLine("OnSelectionboxFocusChanged")
148 End Sub
149
150 Sub OnSelectionboxListChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxListChanged
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