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

# 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 130 If id = 41 Then EnregistrementCode.labelRemi1.Caption = "Précision d'analyse -->" & value : EnregistrementCode.ValeurSliderRemi = 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 bournival 130 Debug.WriteLine("OnPreview")
26 bournival 49 End Function
27    
28     Sub oncomboboxitemchanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler4.OnComboboxSelectionChanged
29 bournival 130 Debug.WriteLine("oncomboboxitemchanged")
30 bournival 49 End Sub
31    
32     Function OntabClicked(ByVal id As Integer) As Boolean Implements PropertyManagerPage2Handler4.OnTabClicked
33 bournival 130 Debug.WriteLine("OntabClicked")
34 bournival 49 End Function
35    
36     Sub OnUndo() Implements PropertyManagerPage2Handler4.OnUndo
37 bournival 130 Debug.WriteLine("OnUndo")
38 bournival 49 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 bournival 130 Debug.WriteLine("OnsubmitSelection")
44 bournival 49 End Function
45    
46     Sub OnPopupMenuItem(ByVal Id As Integer) Implements PropertyManagerPage2Handler4.OnPopupMenuItem
47 bournival 130 Debug.WriteLine("OnPopupMenuItem")
48 bournival 49 End Sub
49    
50     Sub OnPopupMenuItemCreated(ByVal id As Integer, ByRef retval As Integer) Implements PropertyManagerPage2Handler4.OnPopupMenuItemUpdate
51 bournival 130 Debug.WriteLine("OnPopupMenuItemCreated")
52 bournival 49 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 bournival 130 Debug.WriteLine("OnKeyStroke")
56 bournival 49 End Sub
57    
58    
59     Sub OnWhatsNew() Implements PropertyManagerPage2Handler4.OnWhatsNew
60 bournival 130 Debug.WriteLine("OnWhatsNew")
61 bournival 49 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 130
74    
75 bournival 40 End Function
76    
77 bournival 49 Sub AfterClose() Implements PropertyManagerPage2Handler4.AfterClose
78 bournival 40
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 bournival 49 Sub OnCheckboxCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler4.OnCheckboxCheck
92 bournival 40 ' 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 bournival 130 Debug.WriteLine("OnCheckboxCheck")
97 bournival 40 End Sub
98    
99 bournival 49 Sub OnClose(ByVal reason As Integer) Implements PropertyManagerPage2Handler4.OnClose
100 bournival 40
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 bournival 130 Debug.WriteLine("OnClose")
112 bournival 40
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 bournival 46 POGManuel = False
119     PogAutomatique = False
120 bournival 40 EnregistrementCode.cancel()
121     EnregistrementCode.sauvegarder = False
122     End If
123    
124     End Sub
125    
126 bournival 49 Sub OnComboboxEditChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler4.OnComboboxEditChanged
127 bournival 130 Debug.WriteLine("OnComboboxEditChanged")
128 bournival 40 End Sub
129    
130 bournival 49 Function OnActiveXControlCreated(ByVal id As Integer, ByVal status As Boolean) As Integer Implements PropertyManagerPage2Handler4.OnActiveXControlCreated
131 bournival 40 OnActiveXControlCreated = -1
132 bournival 130 Debug.WriteLine("OnActiveXControlCreated")
133 bournival 40 End Function
134    
135 bournival 49 Sub OnButtonPress(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnButtonPress
136 bournival 40 'MsgBox(id)
137 bournival 130 Debug.WriteLine("OnButtonPress")
138 bournival 40 End Sub
139    
140    
141 bournival 49 Sub OnGroupCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler4.OnGroupCheck
142 bournival 130 Debug.WriteLine("OnGroupCheck")
143 bournival 40 End Sub
144    
145 bournival 49 Sub OnGroupExpand(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler4.OnGroupExpand
146 bournival 40
147     End Sub
148    
149 bournival 49 Function OnHelp() As Boolean Implements PropertyManagerPage2Handler4.OnHelp
150 bournival 40 OnHelp = True
151     MsgBox("On vient de cliquer sur l'aide")
152 bournival 130 Debug.WriteLine("OnHelp")
153 bournival 40 End Function
154    
155 bournival 49 Sub OnListboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler4.OnListboxSelectionChanged
156 bournival 130 Debug.WriteLine("OnListboxSelectionChanged")
157 bournival 40 End Sub
158    
159 bournival 49 Function OnNextPage() As Boolean Implements PropertyManagerPage2Handler4.OnNextPage
160 bournival 40 OnNextPage = True
161 bournival 130 Debug.WriteLine("OnNextPage")
162 bournival 40 End Function
163    
164 bournival 49 Sub OnNumberboxChanged(ByVal id As Integer, ByVal val As Double) Implements PropertyManagerPage2Handler4.OnNumberboxChanged
165 bournival 40 'MsgBox(" Valeur de l'arrondi: " & EnregistrementCode.NumberArrondi.Value())
166 bournival 130 Debug.WriteLine("OnNumberboxChanged")
167 bournival 40 End Sub
168    
169 bournival 49 Sub OnOptionCheck(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnOptionCheck
170 bournival 130 Debug.WriteLine("OnOptionCheck")
171 bournival 40 End Sub
172    
173 bournival 49 Function OnPreviousPage() As Boolean Implements PropertyManagerPage2Handler4.OnPreviousPage
174 bournival 40 OnPreviousPage = True
175 bournival 130 Debug.WriteLine("OnPreviousPage")
176 bournival 40 End Function
177    
178 bournival 49 Sub OnSelectionboxCalloutCreated(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxCalloutCreated
179 bournival 130 Debug.WriteLine("OnSelectionboxCalloutCreated")
180 bournival 40 End Sub
181    
182 bournival 49 Sub OnSelectionboxCalloutDestroyed(ByVal id As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxCalloutDestroyed
183 bournival 130 Debug.WriteLine("OnSelectionboxCalloutDestroyed")
184 bournival 40 End Sub
185    
186 bournival 49 Sub OnSelectionboxFocusChanged(ByVal Id As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxFocusChanged
187 bournival 130 Debug.WriteLine("OnSelectionboxFocusChanged")
188 bournival 40 End Sub
189    
190 bournival 49 Sub OnSelectionboxListChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler4.OnSelectionboxListChanged
191 bournival 130 Debug.WriteLine("OnSelectionboxListChanged")
192 bournival 40 End Sub
193    
194 bournival 49 Sub OnTextboxChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler4.OnTextboxChanged
195 bournival 130 Debug.WriteLine("OnTextboxChanged")
196 bournival 40 End Sub
197 bournival 46
198    
199 bournival 40 End Class
200     End Namespace