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 (17 years, 9 months ago) by bournival
File size: 7323 byte(s)
Log Message:
Le Slider fonctionne!

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     EnregistrementCode.labelRemi1.Caption = "Précision d'analyse -->" & value
16     End Sub
17 bournival 40
18 bournival 49 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 bournival 40 ' on vient ici lorsque l'on choisit le complément MAGIC
66     iSwApp = sw
67     userAddin = addin
68    
69 bournival 46 POGManuel = False
70     PogAutomatique = False
71    
72 bournival 40 End Function
73    
74 bournival 49 Sub AfterClose() Implements PropertyManagerPage2Handler4.AfterClose
75 bournival 40
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 bournival 49 Sub OnCheckboxCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler4.OnCheckboxCheck
89 bournival 40 ' 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 bournival 49 Sub OnClose(ByVal reason As Integer) Implements PropertyManagerPage2Handler4.OnClose
97 bournival 40
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 bournival 46 POGManuel = False
116     PogAutomatique = False
117 bournival 40 EnregistrementCode.cancel()
118     EnregistrementCode.sauvegarder = False
119     End If
120    
121     End Sub
122    
123 bournival 49 Sub OnComboboxEditChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler4.OnComboboxEditChanged
124 bournival 40
125     End Sub
126    
127 bournival 49 Function OnActiveXControlCreated(ByVal id As Integer, ByVal status As Boolean) As Integer Implements PropertyManagerPage2Handler4.OnActiveXControlCreated
128 bournival 40 OnActiveXControlCreated = -1
129     End Function
130    
131 bournival 49 Sub OnButtonPress(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnButtonPress
132 bournival 40 'MsgBox(id)
133     End Sub
134    
135    
136 bournival 49 Sub OnGroupCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler4.OnGroupCheck
137 bournival 40 Dim volume As Double
138     Dim surface As Double
139     Dim eng As Double
140 bournival 49 Dim swMprop As sldworks.MassProperty
141 bournival 40 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 bournival 49 Sub OnGroupExpand(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler4.OnGroupExpand
151 bournival 40
152     End Sub
153    
154 bournival 49 Function OnHelp() As Boolean Implements PropertyManagerPage2Handler4.OnHelp
155 bournival 40 OnHelp = True
156     MsgBox("On vient de cliquer sur l'aide")
157     End Function
158    
159 bournival 49 Sub OnListboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler4.OnListboxSelectionChanged
160 bournival 40
161     End Sub
162    
163 bournival 49 Function OnNextPage() As Boolean Implements PropertyManagerPage2Handler4.OnNextPage
164 bournival 40 OnNextPage = True
165    
166     End Function
167    
168 bournival 49 Sub OnNumberboxChanged(ByVal id As Integer, ByVal val As Double) Implements PropertyManagerPage2Handler4.OnNumberboxChanged
169 bournival 40 'MsgBox(" Valeur de l'arrondi: " & EnregistrementCode.NumberArrondi.Value())
170     End Sub
171    
172 bournival 49 Sub OnOptionCheck(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnOptionCheck
173 bournival 40
174     End Sub
175    
176 bournival 49 Function OnPreviousPage() As Boolean Implements PropertyManagerPage2Handler4.OnPreviousPage
177 bournival 40 OnPreviousPage = True
178     End Function
179    
180 bournival 49 Sub OnSelectionboxCalloutCreated(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxCalloutCreated
181 bournival 40
182     End Sub
183    
184 bournival 49 Sub OnSelectionboxCalloutDestroyed(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxCalloutDestroyed
185 bournival 40
186     End Sub
187    
188 bournival 49 Sub OnSelectionboxFocusChanged(ByVal Id As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxFocusChanged
189 bournival 40
190     End Sub
191    
192 bournival 49 Sub OnSelectionboxListChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxListChanged
193 bournival 40
194     End Sub
195    
196 bournival 49 Sub OnTextboxChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler4.OnTextboxChanged
197 bournival 40
198     End Sub
199 bournival 46
200    
201 bournival 40 End Class
202     End Namespace