ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magicsld/EnregistrementPageHandler.vb
Revision: 46
Committed: Wed Aug 22 18:28:53 2007 UTC (17 years, 9 months ago) by bournival
File size: 5680 byte(s)
Log Message:
Ajout de la page de pré-optimisation automatique et des modification que j'ai apportées.

File Contents

# User Rev Content
1 bournival 40 Imports SldWorks
2     Imports SWPublished
3 bournival 46 Imports SwConst
4 bournival 40
5     Namespace Enregistrement
6     Public Class EnregistrementPageHandler
7     Implements PropertyManagerPage2Handler2
8    
9     Dim iSwApp As SldWorks.SldWorks
10     Dim userAddin As MAGIC.Magic
11    
12    
13    
14    
15     Function Init(ByVal sw As SldWorks.SldWorks, ByVal addin As MAGIC.Magic) As Integer
16     ' on vient ici lorsque l'on choisit le complément MAGIC
17     iSwApp = sw
18     userAddin = addin
19    
20 bournival 46 POGManuel = False
21     PogAutomatique = False
22    
23 bournival 40 End Function
24    
25     Sub AfterClose() Implements PropertyManagerPage2Handler2.AfterClose
26    
27     ' un fois que la fenêtre des propriétés est fermée on vient ici.
28     ' mais je crois que c'est mieux de mettre le code dans OnClose...
29    
30     Dim IndentSize As Integer
31     IndentSize = System.Diagnostics.Debug.IndentSize
32     System.Diagnostics.Debug.WriteLine(IndentSize)
33    
34    
35     EnregistrementCode.OK()
36    
37     End Sub
38    
39     Sub OnCheckboxCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnCheckboxCheck
40     ' status est true si c'est cliqué, false si on enlève le signe
41     ' ID = 2 pour les topologies sous-jacentes
42     ' ID = 3 pour les conditions sur une seule annotation
43    
44    
45     End Sub
46    
47     Sub OnClose(ByVal reason As Integer) Implements PropertyManagerPage2Handler2.OnClose
48    
49     'Err.Raise(1)
50    
51     'If Gilles1.Checked Then
52     ' EnregistrementCode.bGilles1 = True
53     ' If Gilles2.Checked Then EnregistrementCode.bGilles2 = True Else EnregistrementCode.bGilles2 = False
54     'Else
55     ' EnregistrementCode.bGilles1 = False
56     ' EnregistrementCode.bGilles2 = False
57     'End If
58    
59    
60    
61     If reason = 1 Then
62     EnregistrementCode.MemoriserValeurs() ' la fenêtre sera détruite ainsi que ses valeurs. Il faut les mémoriser...
63     EnregistrementCode.sauvegarder = True
64     Else
65     EnregistrementCode.decoupe = False
66 bournival 46 POGManuel = False
67     PogAutomatique = False
68 bournival 40 EnregistrementCode.cancel()
69     EnregistrementCode.sauvegarder = False
70     End If
71    
72     End Sub
73    
74     Sub OnComboboxEditChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler2.OnComboboxEditChanged
75    
76     End Sub
77    
78     Function OnActiveXControlCreated(ByVal id As Integer, ByVal status As Boolean) As Integer Implements PropertyManagerPage2Handler2.OnActiveXControlCreated
79     OnActiveXControlCreated = -1
80     End Function
81    
82     Sub OnButtonPress(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnButtonPress
83     'MsgBox(id)
84     End Sub
85    
86     Sub OnComboboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnComboboxSelectionChanged
87     ' ici quand la sélection du combo est changée
88    
89     End Sub
90    
91     Sub OnGroupCheck(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnGroupCheck
92     Dim volume As Double
93     Dim surface As Double
94     Dim eng As Double
95     Dim swMprop As SldWorks.MassProperty
96     swMprop = swModel.Extension.CreateMassProperty
97     volume = swMprop.Volume
98     surface = swMprop.SurfaceArea
99     eng = (volume / surface) / 6
100    
101     EnregistrementCode.NumberENG.Value = eng
102    
103     End Sub
104    
105     Sub OnGroupExpand(ByVal id As Integer, ByVal status As Boolean) Implements PropertyManagerPage2Handler2.OnGroupExpand
106    
107     End Sub
108    
109     Function OnHelp() As Boolean Implements PropertyManagerPage2Handler2.OnHelp
110     OnHelp = True
111     MsgBox("On vient de cliquer sur l'aide")
112     End Function
113    
114     Sub OnListboxSelectionChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnListboxSelectionChanged
115    
116     End Sub
117    
118     Function OnNextPage() As Boolean Implements PropertyManagerPage2Handler2.OnNextPage
119     OnNextPage = True
120    
121     End Function
122    
123     Sub OnNumberboxChanged(ByVal id As Integer, ByVal val As Double) Implements PropertyManagerPage2Handler2.OnNumberboxChanged
124     'MsgBox(" Valeur de l'arrondi: " & EnregistrementCode.NumberArrondi.Value())
125     End Sub
126    
127     Sub OnOptionCheck(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnOptionCheck
128    
129     End Sub
130    
131     Function OnPreviousPage() As Boolean Implements PropertyManagerPage2Handler2.OnPreviousPage
132     OnPreviousPage = True
133     End Function
134    
135     Sub OnSelectionboxCalloutCreated(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxCalloutCreated
136    
137     End Sub
138    
139     Sub OnSelectionboxCalloutDestroyed(ByVal id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxCalloutDestroyed
140    
141     End Sub
142    
143     Sub OnSelectionboxFocusChanged(ByVal Id As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxFocusChanged
144    
145     End Sub
146    
147     Sub OnSelectionboxListChanged(ByVal id As Integer, ByVal item As Integer) Implements PropertyManagerPage2Handler2.OnSelectionboxListChanged
148    
149     End Sub
150    
151     Sub OnTextboxChanged(ByVal id As Integer, ByVal text As String) Implements PropertyManagerPage2Handler2.OnTextboxChanged
152    
153     End Sub
154 bournival 46
155    
156 bournival 40 End Class
157     End Namespace