ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magicsld/EnregistrementPageHandler.vb
Revision: 130
Committed: Wed Jul 30 21:26:03 2008 UTC (16 years, 9 months ago) by bournival
File size: 8306 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 Enregistrement
6 Public Class EnregistrementPageHandler
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 : EnregistrementCode.ValeurSliderRemi = 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 Debug.WriteLine("OnPreview")
26 End Function
27
28 Sub oncomboboxitemchanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler4.OnComboboxSelectionChanged
29 Debug.WriteLine("oncomboboxitemchanged")
30 End Sub
31
32 Function OntabClicked(ByVal id As Integer) As Boolean Implements PropertyManagerPage2Handler4.OnTabClicked
33 Debug.WriteLine("OntabClicked")
34 End Function
35
36 Sub OnUndo() Implements PropertyManagerPage2Handler4.OnUndo
37 Debug.WriteLine("OnUndo")
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 Debug.WriteLine("OnsubmitSelection")
44 End Function
45
46 Sub OnPopupMenuItem(ByVal Id As Integer) Implements PropertyManagerPage2Handler4.OnPopupMenuItem
47 Debug.WriteLine("OnPopupMenuItem")
48 End Sub
49
50 Sub OnPopupMenuItemCreated(ByVal id As Integer, ByRef retval As Integer) Implements PropertyManagerPage2Handler4.OnPopupMenuItemUpdate
51 Debug.WriteLine("OnPopupMenuItemCreated")
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 Debug.WriteLine("OnKeyStroke")
56 End Sub
57
58
59 Sub OnWhatsNew() Implements PropertyManagerPage2Handler4.OnWhatsNew
60 Debug.WriteLine("OnWhatsNew")
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
69
70 POGManuel = False
71 PogAutomatique = False
72
73
74
75 End Function
76
77 Sub AfterClose() Implements PropertyManagerPage2Handler4.AfterClose
78
79 ' un fois que la fenêtre des propriétés est fermée on vient ici.
80 ' mais je crois que c'est mieux de mettre le code dans OnClose...
81
82 Dim IndentSize As Integer
83 IndentSize = System.Diagnostics.Debug.IndentSize
84 System.Diagnostics.Debug.WriteLine(IndentSize)
85
86
87 EnregistrementCode.OK()
88
89 End Sub
90
91 Sub OnCheckboxCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler4.OnCheckboxCheck
92 ' status est true si c'est cliqué, false si on enlève le signe
93 ' ID = 2 pour les topologies sous-jacentes
94 ' ID = 3 pour les conditions sur une seule annotation
95
96 Debug.WriteLine("OnCheckboxCheck")
97 End Sub
98
99 Sub OnClose(ByVal reason As Integer) Implements PropertyManagerPage2Handler4.OnClose
100
101 'Err.Raise(1)
102
103 'If Gilles1.Checked Then
104 ' EnregistrementCode.bGilles1 = True
105 ' If Gilles2.Checked Then EnregistrementCode.bGilles2 = True Else EnregistrementCode.bGilles2 = False
106 'Else
107 ' EnregistrementCode.bGilles1 = False
108 ' EnregistrementCode.bGilles2 = False
109 'End If
110
111 Debug.WriteLine("OnClose")
112
113 If reason = 1 Then
114 EnregistrementCode.MemoriserValeurs() ' la fenêtre sera détruite ainsi que ses valeurs. Il faut les mémoriser...
115 EnregistrementCode.sauvegarder = True
116 Else
117 EnregistrementCode.decoupe = False
118 POGManuel = False
119 PogAutomatique = False
120 EnregistrementCode.cancel()
121 EnregistrementCode.sauvegarder = False
122 End If
123
124 End Sub
125
126 Sub OnComboboxEditChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler4.OnComboboxEditChanged
127 Debug.WriteLine("OnComboboxEditChanged")
128 End Sub
129
130 Function OnActiveXControlCreated(ByVal id As Integer, ByVal status As Boolean) As Integer Implements PropertyManagerPage2Handler4.OnActiveXControlCreated
131 OnActiveXControlCreated = -1
132 Debug.WriteLine("OnActiveXControlCreated")
133 End Function
134
135 Sub OnButtonPress(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnButtonPress
136 'MsgBox(id)
137 Debug.WriteLine("OnButtonPress")
138 End Sub
139
140
141 Sub OnGroupCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler4.OnGroupCheck
142 Debug.WriteLine("OnGroupCheck")
143 End Sub
144
145 Sub OnGroupExpand(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler4.OnGroupExpand
146
147 End Sub
148
149 Function OnHelp() As Boolean Implements PropertyManagerPage2Handler4.OnHelp
150 OnHelp = True
151 MsgBox("On vient de cliquer sur l'aide")
152 Debug.WriteLine("OnHelp")
153 End Function
154
155 Sub OnListboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler4.OnListboxSelectionChanged
156 Debug.WriteLine("OnListboxSelectionChanged")
157 End Sub
158
159 Function OnNextPage() As Boolean Implements PropertyManagerPage2Handler4.OnNextPage
160 OnNextPage = True
161 Debug.WriteLine("OnNextPage")
162 End Function
163
164 Sub OnNumberboxChanged(ByVal id As Integer, ByVal val As Double) Implements PropertyManagerPage2Handler4.OnNumberboxChanged
165 'MsgBox(" Valeur de l'arrondi: " & EnregistrementCode.NumberArrondi.Value())
166 Debug.WriteLine("OnNumberboxChanged")
167 End Sub
168
169 Sub OnOptionCheck(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnOptionCheck
170 Debug.WriteLine("OnOptionCheck")
171 End Sub
172
173 Function OnPreviousPage() As Boolean Implements PropertyManagerPage2Handler4.OnPreviousPage
174 OnPreviousPage = True
175 Debug.WriteLine("OnPreviousPage")
176 End Function
177
178 Sub OnSelectionboxCalloutCreated(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxCalloutCreated
179 Debug.WriteLine("OnSelectionboxCalloutCreated")
180 End Sub
181
182 Sub OnSelectionboxCalloutDestroyed(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxCalloutDestroyed
183 Debug.WriteLine("OnSelectionboxCalloutDestroyed")
184 End Sub
185
186 Sub OnSelectionboxFocusChanged(ByVal Id As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxFocusChanged
187 Debug.WriteLine("OnSelectionboxFocusChanged")
188 End Sub
189
190 Sub OnSelectionboxListChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxListChanged
191 Debug.WriteLine("OnSelectionboxListChanged")
192 End Sub
193
194 Sub OnTextboxChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler4.OnTextboxChanged
195 Debug.WriteLine("OnTextboxChanged")
196 End Sub
197
198
199 End Class
200 End Namespace