Public Class Form3 Private Structure ligne Public listtype() As System.Windows.Forms.ComboBox Public listtype2() As System.Windows.Forms.RichTextBox Public listtype3() As System.Windows.Forms.RichTextBox Public combobox0() As System.Windows.Forms.ComboBox Public Richtextbox0() As System.Windows.Forms.RichTextBox Public combobox200() As System.Windows.Forms.ComboBox Public combobox300() As System.Windows.Forms.ComboBox Public RichTextBox400() As System.Windows.Forms.RichTextBox Public label100() As System.Windows.Forms.Label Public Richtextbox100() As System.Windows.Forms.RichTextBox 'Public Richtextbox200() As System.Windows.Forms.RichTextBox Public countitem As Integer End Structure Private counterpanel As Integer Private label1 As System.Windows.Forms.Label Private Richtextbox200() As System.Windows.Forms.RichTextBox Private combobox500() As System.Windows.Forms.ComboBox Private countercombo() As ligne Private panels() As System.Windows.Forms.Panel Private panel1() As System.Windows.Forms.Panel Private panel2 As System.Windows.Forms.Panel Private panel3 As System.Windows.Forms.Panel Private panel4 As System.Windows.Forms.Panel Private label1000 As System.Windows.Forms.Label Private label1001() As System.Windows.Forms.Label Private label1002() As System.Windows.Forms.Label Private label1003() As System.Windows.Forms.Label Private label1004() As System.Windows.Forms.Label Private label1005() As System.Windows.Forms.Label Private label1006() As System.Windows.Forms.Label Private label1007() As System.Windows.Forms.Label Private label1008() As System.Windows.Forms.Label Private label1009() As System.Windows.Forms.Label Private label1010 As System.Windows.Forms.Label Private measure As System.Windows.Forms.Label Private ajout_ligne() As System.Windows.Forms.Button Private suppr_ligne() As System.Windows.Forms.Button Private Sub form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load counterpanel = 0 measure = New Label Me.supprim_phase.Enabled = False measure.Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) ' measure.TextAlign = ContentAlignment.MiddleCenter Me.WindowState = FormWindowState.Maximized Me.ajoutes_phase.Location = New Point(2, 1) Me.ajoutes_phase.AutoSize = True Me.supprim_phase.Location = New Point(Me.ajoutes_phase.Right + 4, 1) Me.supprim_phase.AutoSize = True Me.AutoScroll = True Me.BackColor = Color.LightGray label1 = New Label label1010 = New Label panel2 = New Panel panel3 = New Panel panel4 = New Panel ' Me.Text = "Devis ASG117 : " & " " & Choix.Nom_projet.Text.ToString & " // réf : " & Choix.référence.Text.ToString Me.Controls.Add(label1) Me.Controls.Add(panel2) Me.Controls.Add(panel3) Me.Controls.Add(panel4) panel4.Controls.Add(label1010) panel3.Controls.Add(label1000) With panel2 '.Anchor = AnchorStyles.None .BorderStyle = BorderStyle.Fixed3D .Location = New Point(10, Me.ajoutes_phase.Bottom + 5) .Width = Me.Width * 0.95 .Height = Me.Height * 0.95 .BackColor = Color.Gainsboro .Visible = True .AutoScroll = True End With With panel3 .BorderStyle = BorderStyle.FixedSingle .Location = New Point(1000, 2) .Width = 155 .Height = 125 .BackColor = Color.CadetBlue .Visible = True End With With panel4 '.Anchor = AnchorStyles.None .BorderStyle = BorderStyle.Fixed3D .Location = New Point(panel3.Right + 6, 2) .Width = 190 .Height = 300 .BackColor = Color.BlueViolet .Visible = True .AutoScroll = True End With With label1010 .Location = New Point(4, 4) .Width = 182 .Height = 300 .Visible = True End With PreparecomboAndPanel() End Sub Private Sub PreparecomboAndPanel() 'creer le vecteur panel ReDim Preserve ajout_ligne(counterpanel) ReDim Preserve suppr_ligne(counterpanel) 'creer les 2 combo de base et fixé la taille intitialle du vecteur Dim ToolTip = New System.Windows.Forms.ToolTip ToolTip.SetToolTip(ajoutes_phase, "Ajout d'une phase") ToolTip.SetToolTip(supprim_phase, "Suppression d'une phase") ' ajoutes_phase.Location = New Point(2, Me.ajoutes_phase.Bottom + 3) ' ajoutes_phase.Height = 20 ' ajoutes_phase.Width = 20 ' ajoutes_phase.BackColor = Color.LightGray 'panel3.Controls.Add(ajoutes_phase) ' supprim_phase.Location = New Point(30, ajoutes_phase.Top) ' supprim_phase.Height = 20 ' supprim_phase.Width = 20 ' supprim_phase.BackColor = Color.LightGray ' panel3.Controls.Add(supprim_phase) ' ajoutes_ligne.Location = New Point(1000, panel1(counterpanel).Height + 20) 'ajouter les combo à la panel ReDim Preserve countercombo(counterpanel) countercombo(counterpanel).countitem = 0 End Sub Private Sub ajoutes_phase_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ajoutes_phase.Click 'ajouter le combo à son vecteur le reserved word "preserve" indique qu'on aggrandit le vecteur 'sans effacer l'ancien ReDim Preserve ajout_ligne(counterpanel) ReDim Preserve suppr_ligne(counterpanel) ReDim Preserve panels(counterpanel) ReDim Preserve panel1(counterpanel) ReDim Preserve combobox500(counterpanel) ReDim Preserve Richtextbox200(counterpanel) ReDim Preserve label1001(counterpanel) ReDim Preserve label1002(counterpanel) ReDim Preserve label1003(counterpanel) ReDim Preserve label1004(counterpanel) ReDim Preserve label1005(counterpanel) ReDim Preserve label1006(counterpanel) ReDim Preserve label1007(counterpanel) ReDim Preserve label1008(counterpanel) ReDim Preserve label1009(counterpanel) ajout_ligne(counterpanel) = New Button suppr_ligne(counterpanel) = New Button panels(counterpanel) = New Panel panel1(counterpanel) = New Panel panel2.Controls.Add(panels(counterpanel)) panels(counterpanel).Controls.Add(panel1(counterpanel)) combobox500(counterpanel) = New ComboBox label1001(counterpanel) = New Label label1002(counterpanel) = New Label label1003(counterpanel) = New Label label1004(counterpanel) = New Label label1005(counterpanel) = New Label label1006(counterpanel) = New Label label1007(counterpanel) = New Label label1008(counterpanel) = New Label label1009(counterpanel) = New Label Richtextbox200(counterpanel) = New RichTextBox panels(counterpanel).Controls.Add(ajout_ligne(counterpanel)) panels(counterpanel).Controls.Add(suppr_ligne(counterpanel)) panels(counterpanel).Controls.Add(combobox500(counterpanel)) panels(counterpanel).Controls.Add(label1001(counterpanel)) panels(counterpanel).Controls.Add(label1002(counterpanel)) panels(counterpanel).Controls.Add(label1003(counterpanel)) panels(counterpanel).Controls.Add(label1004(counterpanel)) panels(counterpanel).Controls.Add(label1005(counterpanel)) panels(counterpanel).Controls.Add(label1006(counterpanel)) panels(counterpanel).Controls.Add(label1007(counterpanel)) panels(counterpanel).Controls.Add(label1008(counterpanel)) panels(counterpanel).Controls.Add(label1009(counterpanel)) With ajout_ligne(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) ajout_ligne(counterpanel).Text = "+" ajout_ligne(counterpanel).Location = New Point(1000, 45) ajout_ligne(counterpanel).Tag = counterpanel ajout_ligne(counterpanel).Visible = True ajout_ligne(counterpanel).Height = 20 ajout_ligne(counterpanel).Width = 20 AddHandler .Click, AddressOf ajout_ligne_click End With With suppr_ligne(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) suppr_ligne(counterpanel).Text = "-" suppr_ligne(counterpanel).Location = New Point(1025, 45) suppr_ligne(counterpanel).Tag = counterpanel suppr_ligne(counterpanel).Visible = True suppr_ligne(counterpanel).Height = 20 suppr_ligne(counterpanel).Width = 20 AddHandler .Click, AddressOf supprim_ligne_Click End With panels(counterpanel).Controls.Add(Richtextbox200(counterpanel)) With combobox500(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Items.Add("") .Items.Add("2B3A") .Items.Add("PDR") .Items.Add("CDR") .Items.Add("Prooftest") .Items.Add("Corrélation") .Items.Add("Expertise") .Items.Add("Autre ...") measure.Text = "Corrélation" .Location = New Point(60, 10) .Width = measure.PreferredWidth * 1.2 .Visible = True .DropDownStyle = ComboBoxStyle.DropDownList .Tag = counterpanel AddHandler .SelectedIndexChanged, AddressOf combobox500_SelectedIndexChanged End With With label1001(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(2, 12.5) measure.Text = "Phase :" .Width = measure.PreferredWidth .Text = "Phase :" .Visible = True End With With label1002(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(100, 50) measure.Text = "Tâches" .Width = measure.PreferredWidth .Text = "Tâches" .Visible = True End With With label1003(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(label1002(counterpanel).Right + 160, 50) measure.Text = "Familles" .Width = measure.PreferredWidth .Text = "Familles" .Visible = True End With With label1004(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(label1003(counterpanel).Right + 100, 50) measure.Text = "Type" .Width = measure.PreferredWidth .Text = "Type" .Visible = True End With With label1005(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(label1004(counterpanel).Right + 40, 50) measure.Text = "Difficulté" .Width = measure.PreferredWidth .Text = "Difficulté" .Visible = True End With With label1006(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(label1005(counterpanel).Right + 40, 50) measure.Text = "Maturité" .Width = measure.PreferredWidth .Text = "Maturité" .Visible = True End With With label1007(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(label1006(counterpanel).Right + 30, 50) measure.Text = "SF" .Width = measure.PreferredWidth .Text = "SF" .Visible = True End With With label1008(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(label1007(counterpanel).Right + 25, 50) measure.Text = "Total (h)" .Width = measure.PreferredWidth .Text = "Total (h)" .Visible = True End With With label1009(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(label1008(counterpanel).Right + 80, 50) measure.Text = "Commentaires" .Width = measure.PreferredWidth .Text = "Commentaires" .Visible = True End With With panels(counterpanel) .AutoScroll = True .AutoScrollMinSize = New Point(2222, 2233) .BorderStyle = BorderStyle.Fixed3D .Width = 1100 .Height = panel1(counterpanel).Height + 200 .BackColor = Color.LemonChiffon .Visible = True If counterpanel > 0 Then .Location = New Point(panels(counterpanel - 1).Left, panels(counterpanel - 1).Bottom + 30) Else .Location = New Point(2, 2) End If End With With panel1(counterpanel) .AutoScroll = True .Anchor = AnchorStyles.Left .BorderStyle = BorderStyle.Fixed3D .Location = New Point(5, 70) .Width = 1075 .Height = 220 .AutoScrollMinSize = New Point(2, 1233) .BackColor = Color.Coral .Visible = True End With If counterpanel >= 0 Then Me.supprim_phase.Enabled = True Else Me.supprim_phase.Enabled = False End If With Richtextbox200(counterpanel) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(150, 10) .Width = 300 .Height = 25 .Visible = False .Multiline = False .Tag = counterpanel End With ReDim Preserve countercombo(counterpanel) countercombo(counterpanel).countitem = 0 counterpanel = counterpanel + 1 'Me.Refresh() End Sub Private Sub ajout_ligne_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim index As Integer index = countercombo(sender.tag).countitem 'ajouter le combo à son vecteur le reserved word "preserve" indique qu'on aggrandit le vecteur 'sans effacer l'ancien ReDim Preserve countercombo(sender.tag).combobox0(index) ReDim Preserve countercombo(sender.tag).listtype(index) ReDim Preserve countercombo(sender.tag).listtype2(index) ReDim Preserve countercombo(sender.tag).listtype3(index) ReDim Preserve countercombo(sender.tag).Richtextbox0(index) ReDim Preserve countercombo(sender.tag).combobox200(index) ReDim Preserve countercombo(sender.tag).combobox300(index) ReDim Preserve countercombo(sender.tag).RichTextBox400(index) ReDim Preserve countercombo(sender.tag).label100(index) ReDim Preserve countercombo(sender.tag).Richtextbox100(index) 'ReDim Preserve scrollbarvert(index) countercombo(sender.tag).combobox0(index) = New ComboBox countercombo(sender.tag).listtype(index) = New ComboBox countercombo(sender.tag).listtype2(index) = New RichTextBox countercombo(sender.tag).listtype3(index) = New RichTextBox countercombo(sender.tag).Richtextbox0(index) = New RichTextBox countercombo(sender.tag).combobox200(index) = New ComboBox countercombo(sender.tag).combobox300(index) = New ComboBox countercombo(sender.tag).RichTextBox400(index) = New RichTextBox countercombo(sender.tag).label100(index) = New Label countercombo(sender.tag).Richtextbox100(index) = New RichTextBox panel1(sender.tag).Controls.Add(countercombo(sender.tag).listtype(index)) panel1(sender.tag).Controls.Add(countercombo(sender.tag).listtype2(index)) panel1(sender.tag).Controls.Add(countercombo(sender.tag).listtype3(index)) panel1(sender.tag).Controls.Add(countercombo(sender.tag).combobox0(index)) panel1(sender.tag).Controls.Add(countercombo(sender.tag).Richtextbox0(index)) panel1(sender.tag).Controls.Add(countercombo(sender.tag).Richtextbox100(index)) panel1(sender.tag).Controls.Add(countercombo(sender.tag).combobox200(index)) panel1(sender.tag).Controls.Add(countercombo(sender.tag).combobox300(index)) panel1(sender.tag).Controls.Add(countercombo(sender.tag).RichTextBox400(index)) panel1(sender.tag).Controls.Add(countercombo(sender.tag).label100(index)) With countercombo(sender.tag).Richtextbox0(index) .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Width = 228 .Height = countercombo(sender.tag).combobox0(index).Height * 2 If index > 0 Then .Location = New Point(4, countercombo(sender.tag).Richtextbox0(index - 1).Bottom + 10) Else .Location = New Point(2, 2) End If .Visible = True .Tag = Str(sender.tag) & "-" & Str(index) '.Anchor = AnchorStyles.Left End With With countercombo(sender.tag).combobox0(index) .Font = New Font("arial", 10, FontStyle.Bold, GraphicsUnit.Pixel) .Items.Add("") .Items.Add("Maillage") .Items.Add("Bilan M.C.I") .Items.Add("Condensation de modèle") .Items.Add("Checks") .Items.Add("Analyses Modales") .Items.Add("Analyses Statiques") .Items.Add("Analyses Dynamiques") .Items.Add("Sorties") .Items.Add("Livrables") .Items.Add("Management") .Items.Add("Autres ...") .BackColor = Color.Azure '.Anchor = AnchorStyles.Left .Location = New Point(countercombo(sender.tag).Richtextbox0(index).Right + 10, countercombo(sender.tag).Richtextbox0(index).Top + 10) measure.Text = "Condensation de modèle" .Width = measure.PreferredWidth * 1.2 .Tag = Str(sender.tag) & "-" & Str(index) .Visible = True .DropDownStyle = ComboBoxStyle.DropDownList AddHandler .SelectedIndexChanged, AddressOf combobox0_SelectedIndexChanged End With With countercombo(sender.tag).listtype(index) '.Anchor = AnchorStyles.Left .Width = 70 .Font = New Font("arial", 10, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(countercombo(sender.tag).combobox0(index).Right + 30, countercombo(sender.tag).combobox0(index).Top) ' .BorderStyle = BorderStyle.Fixed3D .Visible = True measure.Text = "1000 h" .Width = measure.PreferredWidth * 1.3 .DropDownStyle = ComboBoxStyle.DropDownList .Tag = Str(sender.tag) & "-" & Str(index) AddHandler .SelectedIndexChanged, AddressOf listtype_SelectedIndexChanged End With With countercombo(sender.tag).listtype2(index) ' .Anchor = AnchorStyles.Left measure.Text = "1000 h" .Width = measure.PreferredWidth * 1.3 .Height = countercombo(sender.tag).combobox0(index).Height .Font = New Font("arial", 10, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(countercombo(sender.tag).combobox0(index).Right + 30, countercombo(sender.tag).combobox0(index).Top) .BorderStyle = BorderStyle.Fixed3D .Visible = False .Multiline = False .Tag = Str(sender.tag) & "-" & Str(index) End With With countercombo(sender.tag).listtype3(index) '.Anchor = AnchorStyles.Left .Width = 130 .Height = countercombo(sender.tag).combobox0(index).Height .Font = New Font("arial", 10, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(310, countercombo(sender.tag).combobox0(index).Top) .BorderStyle = BorderStyle.Fixed3D .Visible = False .Multiline = False .Tag = Str(sender.tag) & "-" & Str(index) End With With countercombo(sender.tag).combobox200(index) '.Anchor = AnchorStyles.Left .Font = New Font("arial", 10, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(countercombo(sender.tag).listtype(index).Right + 10, countercombo(sender.tag).listtype(index).Top) ' .BorderStyle = BorderStyle.Fixed3D .Visible = True .DropDownStyle = ComboBoxStyle.DropDownList measure.Text = "Trés Difficile" .Width = measure.PreferredWidth * 1.1 .Items.Add("") .Items.Add("Facile") .Items.Add("Peu Difficile") .Items.Add("Difficile") .Items.Add("Très Difficile") .Tag = Str(sender.tag) & "-" & Str(index) End With With countercombo(sender.tag).combobox300(index) '.Anchor = AnchorStyles.Left .Font = New Font("arial", 10, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(countercombo(sender.tag).combobox200(index).Right + 10, countercombo(sender.tag).combobox200(index).Top) ' .BorderStyle = BorderStyle.Fixed3D .Visible = True .DropDownStyle = ComboBoxStyle.DropDownList measure.Text = "Peu Mature" .Width = measure.PreferredWidth * 1.1 .Items.Add("") .Items.Add("Pas Mature") .Items.Add("Peu Mature") .Items.Add("Mature") .Tag = Str(sender.tag) & "-" & Str(index) End With With countercombo(sender.tag).RichTextBox400(index) '.Anchor = AnchorStyles.Left .Font = New Font("arial", 10, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(countercombo(sender.tag).combobox300(index).Right + 10, countercombo(sender.tag).combobox300(index).Top) ' .BorderStyle = BorderStyle.Fixed3D .Visible = True measure.Text = "20.00" .Width = measure.PreferredWidth * 1.2 .Height = countercombo(sender.tag).combobox0(index).Height .Tag = Str(sender.tag) & "-" & Str(index) End With With countercombo(sender.tag).label100(index) '.Anchor = AnchorStyles.Left .Width = 50 .Font = New Font("arial", 12, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(countercombo(sender.tag).RichTextBox400(index).Right + 10, countercombo(sender.tag).RichTextBox400(index).Top) .BorderStyle = BorderStyle.Fixed3D .Visible = True .Height = countercombo(sender.tag).combobox0(index).Height .Tag = Str(sender.tag) & "-" & Str(index) End With With countercombo(sender.tag).Richtextbox100(index) '.Anchor = AnchorStyles.Left .Font = New Font("arial", 10, FontStyle.Bold, GraphicsUnit.Pixel) .Location = New Point(countercombo(sender.tag).label100(index).Right + 10, countercombo(sender.tag).Richtextbox0(index).Top) .Width = 220 .Height = countercombo(sender.tag).combobox0(index).Height * 2 ' .BorderStyle = BorderStyle.Fixed3D .Visible = True .Tag = Str(sender.tag) & "-" & Str(index) End With countercombo(sender.tag).countitem = countercombo(sender.tag).countitem + 1 End Sub Private Sub listtype_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Dim indexes(1) As String Dim thistag As String Dim indexpanel As Integer Dim indexitem As Integer thistag = sender.tag indexes = thistag.Split("-") indexpanel = Double.Parse(indexes(0)) indexitem = Double.Parse(indexes(1)) Select Case True Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Maillage" And countercombo(indexpanel).listtype(indexitem).SelectedItem "20 h" label1010.Text = "Configuration type : 1" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Maillage" And countercombo(indexpanel).listtype(indexitem).SelectedItem "30 h" label1010.Text = "Configuration type : 2" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Maillage" And countercombo(indexpanel).listtype(indexitem).SelectedItem "50 h" label1010.Text = "Configuration type : 3" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Maillage" And countercombo(indexpanel).listtype(indexitem).SelectedItem "80 h" label1010.Text = "Configuration type : 4" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Maillage" And countercombo(indexpanel).listtype(indexitem).SelectedItem "160 h" label1010.Text = "Configuration type : 5" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Bilan M.C.I" And countercombo(indexpanel).listtype(indexitem).SelectedItem "4 h" label1010.Text = "Configuration type : 6" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Bilan M.C.I" And countercombo(indexpanel).listtype(indexitem).SelectedItem "8 h" label1010.Text = "Configuration type : 7" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Bilan M.C.I" And countercombo(indexpanel).listtype(indexitem).SelectedItem "16 h" label1010.Text = "Configuration type : 8" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Bilan M.C.I" And countercombo(indexpanel).listtype(indexitem).SelectedItem "20 h" label1010.Text = "Configuration type : 9" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Condensation de modèle" And countercombo(indexpanel).listtype(indexitem).SelectedItem "16 h" label1010.Text = "Configuration type : 10" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Condensation de modèle" And countercombo(indexpanel).listtype(indexitem).SelectedItem "40 h" label1010.Text = "Configuration type : 11" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Condensation de modèle" And countercombo(indexpanel).listtype(indexitem).SelectedItem "64 h" label1010.Text = "Configuration type : 12" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Condensation de modèle" And countercombo(indexpanel).listtype(indexitem).SelectedItem "80 h" label1010.Text = "Configuration type : 13" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Condensation de modèle" And countercombo(indexpanel).listtype(indexitem).SelectedItem "120 h" label1010.Text = "Configuration type : 14" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Checks" And countercombo(indexpanel).listtype(indexitem).SelectedItem "8 h" label1010.Text = "Configuration type : 15" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Checks" And countercombo(indexpanel).listtype(indexitem).SelectedItem "16 h" label1010.Text = "Configuration type : 16" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Checks" And countercombo(indexpanel).listtype(indexitem).SelectedItem "24 h" label1010.Text = "Configuration type : 17" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Checks" And countercombo(indexpanel).listtype(indexitem).SelectedItem "40 h" label1010.Text = "Configuration type : 18" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Checks" And countercombo(indexpanel).listtype(indexitem).SelectedItem "80 h" label1010.Text = "Configuration type : 19" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Modales" And countercombo(indexpanel).listtype(indexitem).SelectedItem "8 h" label1010.Text = "Configuration type : 20" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Modales" And countercombo(indexpanel).listtype(indexitem).SelectedItem "24 h" label1010.Text = "Configuration type : 21" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Modales" And countercombo(indexpanel).listtype(indexitem).SelectedItem "40 h" label1010.Text = "Configuration type : 22" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Modales" And countercombo(indexpanel).listtype(indexitem).SelectedItem "60 h" label1010.Text = "Configuration type : 23" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Statiques" And countercombo(indexpanel).listtype(indexitem).SelectedItem "8 h" label1010.Text = "Configuration type : 24" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Statiques" And countercombo(indexpanel).listtype(indexitem).SelectedItem "16 h" label1010.Text = "Configuration type : 25" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Statiques" And countercombo(indexpanel).listtype(indexitem).SelectedItem "40 h" label1010.Text = "Configuration type : 26" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Statiques" And countercombo(indexpanel).listtype(indexitem).SelectedItem "80 h" label1010.Text = "Configuration type : 27" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Statiques" And countercombo(indexpanel).listtype(indexitem).SelectedItem "120 h" label1010.Text = "Configuration type : 28" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Statiques" And countercombo(indexpanel).listtype(indexitem).SelectedItem "160 h" label1010.Text = "Configuration type : 29" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Dynamiques" And countercombo(indexpanel).listtype(indexitem).SelectedItem "16 h" label1010.Text = "Configuration type : 30" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Dynamiques" And countercombo(indexpanel).listtype(indexitem).SelectedItem "24 h" label1010.Text = "Configuration type : 31" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Dynamiques" And countercombo(indexpanel).listtype(indexitem).SelectedItem "40 h" label1010.Text = "Configuration type : 32" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Dynamiques" And countercombo(indexpanel).listtype(indexitem).SelectedItem "80 h" label1010.Text = "Configuration type : 33" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Analyses Dynamiques" And countercombo(indexpanel).listtype(indexitem).SelectedItem "120 h" label1010.Text = "Configuration type : 34" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Sorties" And countercombo(indexpanel).listtype(indexitem).SelectedItem "16 h" label1010.Text = "Configuration type : 35" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Sorties" And countercombo(indexpanel).listtype(indexitem).SelectedItem "40 h" label1010.Text = "Configuration type : 36" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Sorties" And countercombo(indexpanel).listtype(indexitem).SelectedItem "80 h" label1010.Text = "Configuration type : 37" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Sorties" And countercombo(indexpanel).listtype(indexitem).SelectedItem "120 h" label1010.Text = "Configuration type : 38" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Livrables" And countercombo(indexpanel).listtype(indexitem).SelectedItem "8 h" label1010.Text = "Configuration type : 39" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Livrables" And countercombo(indexpanel).listtype(indexitem).SelectedItem "16 h" label1010.Text = "Configuration type : 40" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Livrables" And countercombo(indexpanel).listtype(indexitem).SelectedItem "40 h" label1010.Text = "Configuration type : 41" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Livrables" And countercombo(indexpanel).listtype(indexitem).SelectedItem "64 h" label1010.Text = "Configuration type : 42" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Livrables" And countercombo(indexpanel).listtype(indexitem).SelectedItem "80 h" label1010.Text = "Configuration type : 43" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Management" And countercombo(indexpanel).listtype(indexitem).SelectedItem "4 h" label1010.Text = "Configuration type : 44" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Management" And countercombo(indexpanel).listtype(indexitem).SelectedItem "8 h" label1010.Text = "Configuration type : 45" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Management" And countercombo(indexpanel).listtype(indexitem).SelectedItem "16 h" label1010.Text = "Configuration type : 46" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Management" And countercombo(indexpanel).listtype(indexitem).SelectedItem "24 h" label1010.Text = "Configuration type : 47" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Management" And countercombo(indexpanel).listtype(indexitem).SelectedItem "40 h" label1010.Text = "Configuration type : 48" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Management" And countercombo(indexpanel).listtype(indexitem).SelectedItem "64 h" label1010.Text = "Configuration type : 49" Case countercombo(indexpanel).combobox0(indexitem).SelectedItem "Management" And countercombo(indexpanel).listtype(indexitem).SelectedItem "80 h" label1010.Text = "Configuration type : 50" End Select End Sub Private Sub supprim_phase_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles supprim_phase.Click 'ReDim Preserve panels(counterpanel) ' If counterpanel < 1 Then 'Else ' panel2.Controls.Remove(panels(counterpanel - 1)) ' counterpanel = counterpanel - 1 'End If If counterpanel > 0 Then panel2.Controls.Remove(panels(counterpanel - 1)) counterpanel = counterpanel - 1 ReDim Preserve panels(counterpanel) End If If counterpanel > 0 Then Me.supprim_phase.Enabled = True Else Me.supprim_phase.Enabled = False End If End Sub Private Sub supprim_ligne_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim indexpanel As Integer Dim indexitem As Integer indexpanel = sender.tag indexitem = countercombo(indexpanel).countitem - 1 If countercombo(indexpanel).countitem > 0 Then panel1(sender.tag).Controls.Remove(countercombo(indexpanel).listtype(indexitem)) panel1(sender.tag).Controls.Remove(countercombo(indexpanel).listtype2(indexitem)) panel1(sender.tag).Controls.Remove(countercombo(indexpanel).listtype3(indexitem)) panel1(sender.tag).Controls.Remove(countercombo(indexpanel).combobox0(indexitem)) panel1(sender.tag).Controls.Remove(countercombo(indexpanel).Richtextbox0(indexitem)) panel1(sender.tag).Controls.Remove(countercombo(indexpanel).Richtextbox100(indexitem)) panel1(sender.tag).Controls.Remove(countercombo(indexpanel).combobox200(indexitem)) panel1(sender.tag).Controls.Remove(countercombo(indexpanel).combobox300(indexitem)) panel1(sender.tag).Controls.Remove(countercombo(indexpanel).RichTextBox400(indexitem)) panel1(sender.tag).Controls.Remove(countercombo(indexpanel).label100(indexitem)) countercombo(indexpanel).countitem = countercombo(indexpanel).countitem - 1 End If End Sub Private Sub combobox0_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Dim indexes(1) As String Dim thistag As String Dim indexpanel As Integer Dim indexitem As Integer thistag = sender.tag indexes = thistag.Split("-") indexpanel = Double.Parse(indexes(0)) indexitem = Double.Parse(indexes(1)) label1010.Text = "" With countercombo(indexpanel).combobox0(indexitem) measure.Text = "Condensation modèle" .Width = measure.PreferredWidth * 1.4 End With With countercombo(indexpanel).listtype(indexitem) .Visible = True measure.Text = "1000 h" .Width = measure.PreferredWidth * 1.3 End With With countercombo(indexpanel).listtype2(indexitem) .Visible = False End With With countercombo(indexpanel).listtype3(indexitem) .Visible = False End With countercombo(indexpanel).listtype(indexitem).Items.Clear() Select Case countercombo(indexpanel).combobox0(indexitem).SelectedItem Case "" countercombo(indexpanel).listtype(indexitem).Items.Add("") Case "Maillage" countercombo(indexpanel).listtype(indexitem).Items.Add("20 h") countercombo(indexpanel).listtype(indexitem).Items.Add("30 h") countercombo(indexpanel).listtype(indexitem).Items.Add("50 h") countercombo(indexpanel).listtype(indexitem).Items.Add("80 h") countercombo(indexpanel).listtype(indexitem).Items.Add("160 h") Case "Bilan M.C.I" countercombo(indexpanel).listtype(indexitem).Items.Add("4 h") countercombo(indexpanel).listtype(indexitem).Items.Add("8 h") countercombo(indexpanel).listtype(indexitem).Items.Add("16 h") countercombo(indexpanel).listtype(indexitem).Items.Add("20 h") Case "Condensation de modèle" countercombo(indexpanel).listtype(indexitem).Items.Add("16 h") countercombo(indexpanel).listtype(indexitem).Items.Add("40 h") countercombo(indexpanel).listtype(indexitem).Items.Add("64 h") countercombo(indexpanel).listtype(indexitem).Items.Add("80 h") countercombo(indexpanel).listtype(indexitem).Items.Add("120 h") Case "Checks" countercombo(indexpanel).listtype(indexitem).Items.Add("8 h") countercombo(indexpanel).listtype(indexitem).Items.Add("16 h") countercombo(indexpanel).listtype(indexitem).Items.Add("24 h") countercombo(indexpanel).listtype(indexitem).Items.Add("40 h") countercombo(indexpanel).listtype(indexitem).Items.Add("80 h") Case "Analyses Modales" countercombo(indexpanel).listtype(indexitem).Items.Add("8 h") countercombo(indexpanel).listtype(indexitem).Items.Add("24 h") countercombo(indexpanel).listtype(indexitem).Items.Add("40 h") countercombo(indexpanel).listtype(indexitem).Items.Add("60 h") Case "Analyses Statiques" countercombo(indexpanel).listtype(indexitem).Items.Add("8 h") countercombo(indexpanel).listtype(indexitem).Items.Add("16 h") countercombo(indexpanel).listtype(indexitem).Items.Add("40 h") countercombo(indexpanel).listtype(indexitem).Items.Add("80 h") countercombo(indexpanel).listtype(indexitem).Items.Add("120 h") countercombo(indexpanel).listtype(indexitem).Items.Add("160 h") Case "Analyses Dynamiques" countercombo(indexpanel).listtype(indexitem).Items.Add("16 h") countercombo(indexpanel).listtype(indexitem).Items.Add("24 h") countercombo(indexpanel).listtype(indexitem).Items.Add("40 h") countercombo(indexpanel).listtype(indexitem).Items.Add("80 h") countercombo(indexpanel).listtype(indexitem).Items.Add("120 h") Case "Sorties" countercombo(indexpanel).listtype(indexitem).Items.Add("16 h") countercombo(indexpanel).listtype(indexitem).Items.Add("40 h") countercombo(indexpanel).listtype(indexitem).Items.Add("80 h") countercombo(indexpanel).listtype(indexitem).Items.Add("120 h") Case "Livrables" countercombo(indexpanel).listtype(indexitem).Items.Add("8 h") countercombo(indexpanel).listtype(indexitem).Items.Add("16 h") countercombo(indexpanel).listtype(indexitem).Items.Add("40 h") countercombo(indexpanel).listtype(indexitem).Items.Add("64 h") countercombo(indexpanel).listtype(indexitem).Items.Add("80 h") Case "Management" countercombo(indexpanel).listtype(indexitem).Items.Add("4 h") countercombo(indexpanel).listtype(indexitem).Items.Add("8 h") countercombo(indexpanel).listtype(indexitem).Items.Add("16 h") countercombo(indexpanel).listtype(indexitem).Items.Add("24 h") countercombo(indexpanel).listtype(indexitem).Items.Add("40 h") countercombo(indexpanel).listtype(indexitem).Items.Add("64 h") countercombo(indexpanel).listtype(indexitem).Items.Add("80 h") Case "Autres ..." With countercombo(indexpanel).combobox0(indexitem) measure.Text = "Autres ..." .Width = measure.PreferredWidth * 1.1 End With With countercombo(indexpanel).listtype(indexitem) .Visible = False End With With countercombo(indexpanel).listtype2(indexitem) .Visible = True End With With countercombo(indexpanel).listtype3(indexitem) .Visible = True End With End Select End Sub Private Sub combobox500_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) With Richtextbox200(sender.tag) panels(sender.tag).Controls.Add(Richtextbox200(sender.tag)) .Visible = False Richtextbox200(sender.tag).Clear() End With Select Case combobox500(sender.tag).SelectedItem Case "Autre ..." With Richtextbox200(sender.tag) panels(sender.tag).Controls.Add(Richtextbox200(sender.tag)) .Visible = True End With End Select End Sub End Class