ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magicsld/EnregistrementPageHandler.vb
Revision: 49
Committed: Wed Aug 22 21:58:18 2007 UTC (18 years ago) by bournival
File size: 7323 byte(s)
Log Message:
Le Slider fonctionne!

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