ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magicsld/EnregistrementPageHandler.vb
Revision: 50
Committed: Fri Aug 24 21:19:38 2007 UTC (17 years, 8 months ago) by bournival
File size: 7403 byte(s)
Log Message:
Le slider marche maintenant

File Contents

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