Etienne BAUDOUX

Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Etienne BAUDOUX

Forum sur les projets de Etienne BAUDOUX

Le Deal du moment : -20%
-20% Récupérateur à eau mural 300 ...
Voir le deal
79 €

3 participants

    fonction coloration synthaxique [RESOLU]

    polien
    polien



    Masculin Nombre de messages : 3002
    Age : 27
    Localisation : Bouches du Rhones
    Emploi/loisirs : velo, informatique, électronique, robotique, modélisme feroviaire
    Humeur : Je commence tout mais ne finit rien :P
    Date d'inscription : 19/05/2011

    fonction coloration synthaxique [RESOLU] Empty fonction coloration synthaxique [RESOLU]

    Message par polien Jeu 22 Mar 2012 - 14:35

    Bonjour,

    J'ai créé une fonction appelée "colorationsynthaxique" qui ne renvoie pas de valeurs mais qui admet plusieurs paramètres: la couleur du texte à colorier "Couleur" et le texte à colorier "Texte", en fonction de ses paramètres, elle colorira le texte choisit dans la couleur choisie.

    Un timer lance cette fonction de façon présise qui correspond au moment ou l'utilisateur n'a pas écrit depuis quelques temps, seulement la génération a échouée et j'ai une belle liste d'erreur qui ne peut pas être corrigée automatiquement.

    Le rapport:


    Error === Line 339, Column 0, Error BC30456
    Description : 'colorationsynthaxique' n'est pas un membre de 'WebCoditor.Fenêtre_Krypton1'.


    Error === Line 339, Column 0, Error BC31190
    Description : Les littéraux XML et les propriétés d'axes XML ne sont pas disponibles. Ajoutez des références à System.Xml, System.Xml.Linq et System.Core.


    Error === Line 349, Column 0, Error BC30636
    Description : '>' attendu.


    Error === Line 351, Column 0, Error BC30451
    Description : 'Texte' n'est pas déclaré. Il peut être inaccessible en raison de son niveau de protection.


    Error === Line 353, Column 0, Error BC30451
    Description : 'Couleur' n'est pas déclaré. Il peut être inaccessible en raison de son niveau de protection.


    Error === Line 366, Column 0, Error BC30091
    Description : 'Loop' doit être précédé d'un 'Do' correspondant.






    '------------------------------------------------------------------------------
    '
    ' Ce code a été généré par un outil.
    ' Version du runtime :4.0.30319.1
    '
    ' Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
    ' le code est régénéré.
    '

    '------------------------------------------------------------------------------

    Option Strict Off
    Option Explicit On

    Imports Microsoft.VisualBasic
    Imports System
    Imports System.Drawing
    Imports System.Windows.Forms
    Assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0"), _
    Assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © 2012"), _
    Assembly: System.Reflection.AssemblyDescriptionAttribute(""), _
    Assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0"), _
    Assembly: System.Runtime.InteropServices.GuidAttribute("79f293ce-c877-47c5-a403-25a5de3ce1c2"), _
    Assembly: System.Reflection.AssemblyTrademarkAttribute("WebCoditor™"), _
    Assembly: System.Reflection.AssemblyProductAttribute("WebCoditor"), _
    Assembly: System.Reflection.AssemblyCompanyAttribute(""), _
    Assembly: System.Runtime.InteropServices.ComVisibleAttribute(true)>

    '----------------------------------------------------------------------
    'This code was generated by SoftwareZator 2012 Edition Professionnelle (3.0.0.1)
    'The jeudi 22 mars 2012 at 15:23:18
    '----------------------------------------------------------------------
    Namespace WebCoditor

    _
    Partial Public Class Fenêtre_Krypton1
    Inherits ComponentFactory.Krypton.Toolkit.KryptonForm

    Public toolStripContainer1 As System.Windows.Forms.ToolStripContainer

    Public tabControl1 As System.Windows.Forms.TabControl

    Public tabPage1 As System.Windows.Forms.TabPage

    Public toolStrip1 As System.Windows.Forms.ToolStrip

    Public richTextBox1 As System.Windows.Forms.RichTextBox

    Public tabPage2 As System.Windows.Forms.TabPage

    Public toolStrip2 As System.Windows.Forms.ToolStrip

    Public toolStripButton13 As System.Windows.Forms.ToolStripButton

    Public toolStripButton14 As System.Windows.Forms.ToolStripButton

    Public toolStripButton1 As System.Windows.Forms.ToolStripButton

    Public richTextBox2 As System.Windows.Forms.RichTextBox

    Public timer1 As System.Windows.Forms.Timer

    Public components As System.ComponentModel.IContainer

    Public kryptonPanel1 As ComponentFactory.Krypton.Toolkit.KryptonPanel

    Public Sub New()
    MyBase.New
    Me.InitializeComponent
    End Sub

    Public Sub InitializeComponent()
    Me.components = New System.ComponentModel.Container()
    Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Fenêtre_Krypton1))
    Me.kryptonPanel1 = New ComponentFactory.Krypton.Toolkit.KryptonPanel()
    Me.toolStripContainer1 = New System.Windows.Forms.ToolStripContainer()
    Me.tabControl1 = New System.Windows.Forms.TabControl()
    Me.tabPage1 = New System.Windows.Forms.TabPage()
    Me.tabPage2 = New System.Windows.Forms.TabPage()
    Me.richTextBox1 = New System.Windows.Forms.RichTextBox()
    Me.richTextBox2 = New System.Windows.Forms.RichTextBox()
    Me.toolStrip1 = New System.Windows.Forms.ToolStrip()
    Me.toolStrip2 = New System.Windows.Forms.ToolStrip()
    Me.toolStripButton13 = New System.Windows.Forms.ToolStripButton()
    Me.toolStripButton14 = New System.Windows.Forms.ToolStripButton()
    Me.toolStripButton1 = New System.Windows.Forms.ToolStripButton()
    Me.timer1 = New System.Windows.Forms.Timer(Me.components)
    CType(Me.kryptonPanel1,System.ComponentModel.ISupportInitialize).BeginInit
    Me.kryptonPanel1.SuspendLayout
    Me.toolStripContainer1.ContentPanel.SuspendLayout
    Me.toolStripContainer1.SuspendLayout
    Me.tabControl1.SuspendLayout
    Me.tabPage1.SuspendLayout
    Me.tabPage2.SuspendLayout
    Me.toolStrip2.SuspendLayout
    Me.SuspendLayout
    '
    'kryptonPanel1
    '
    Me.kryptonPanel1.Controls.Add(Me.tabControl1)
    Me.kryptonPanel1.Cursor = System.Windows.Forms.Cursors.Cross
    Me.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Fill
    Me.kryptonPanel1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
    Me.kryptonPanel1.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.kryptonPanel1.Location = New System.Drawing.Point(0, 0)
    Me.kryptonPanel1.Name = "kryptonPanel1"
    Me.kryptonPanel1.Size = New System.Drawing.Size(804, 516)
    Me.kryptonPanel1.TabIndex = 0
    '
    'toolStripContainer1
    '
    Me.toolStripContainer1.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange
    '
    'toolStripContainer1.BottomToolStripPanel
    '
    Me.toolStripContainer1.BottomToolStripPanel.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange
    Me.toolStripContainer1.BottomToolStripPanel.Cursor = System.Windows.Forms.Cursors.Default
    Me.toolStripContainer1.BottomToolStripPanel.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
    Me.toolStripContainer1.BottomToolStripPanel.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.toolStripContainer1.BottomToolStripPanel.Padding = New System.Windows.Forms.Padding(0, 25, 0, 0)
    '
    'toolStripContainer1.ContentPanel
    '
    Me.toolStripContainer1.ContentPanel.AutoScroll = true
    Me.toolStripContainer1.ContentPanel.Controls.Add(Me.kryptonPanel1)
    Me.toolStripContainer1.ContentPanel.Cursor = System.Windows.Forms.Cursors.Cross
    Me.toolStripContainer1.ContentPanel.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
    Me.toolStripContainer1.ContentPanel.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.toolStripContainer1.ContentPanel.Size = New System.Drawing.Size(804, 516)
    Me.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill
    Me.toolStripContainer1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
    Me.toolStripContainer1.ImeMode = System.Windows.Forms.ImeMode.NoControl
    '
    'toolStripContainer1.LeftToolStripPanel
    '
    Me.toolStripContainer1.LeftToolStripPanel.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange
    Me.toolStripContainer1.LeftToolStripPanel.Cursor = System.Windows.Forms.Cursors.Default
    Me.toolStripContainer1.LeftToolStripPanel.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
    Me.toolStripContainer1.LeftToolStripPanel.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.toolStripContainer1.LeftToolStripPanel.Padding = New System.Windows.Forms.Padding(0, 0, 25, 0)
    Me.toolStripContainer1.Location = New System.Drawing.Point(0, 0)
    Me.toolStripContainer1.Name = "toolStripContainer1"
    '
    'toolStripContainer1.RightToolStripPanel
    '
    Me.toolStripContainer1.RightToolStripPanel.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange
    Me.toolStripContainer1.RightToolStripPanel.Cursor = System.Windows.Forms.Cursors.Default
    Me.toolStripContainer1.RightToolStripPanel.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
    Me.toolStripContainer1.RightToolStripPanel.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.toolStripContainer1.RightToolStripPanel.Padding = New System.Windows.Forms.Padding(25, 0, 0, 0)
    Me.toolStripContainer1.Size = New System.Drawing.Size(804, 516)
    Me.toolStripContainer1.TabIndex = 0
    Me.toolStripContainer1.Text = "toolStripContainer1"
    '
    'toolStripContainer1.TopToolStripPanel
    '
    Me.toolStripContainer1.TopToolStripPanel.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange
    Me.toolStripContainer1.TopToolStripPanel.Cursor = System.Windows.Forms.Cursors.Default
    Me.toolStripContainer1.TopToolStripPanel.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
    Me.toolStripContainer1.TopToolStripPanel.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.toolStripContainer1.TopToolStripPanel.Padding = New System.Windows.Forms.Padding(0, 0, 25, 25)
    '
    'tabControl1
    '
    Me.tabControl1.Controls.Add(Me.tabPage1)
    Me.tabControl1.Controls.Add(Me.tabPage2)
    Me.tabControl1.Cursor = System.Windows.Forms.Cursors.Default
    Me.tabControl1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
    Me.tabControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.tabControl1.Location = New System.Drawing.Point(12, 63)
    Me.tabControl1.Name = "tabControl1"
    Me.tabControl1.SelectedIndex = 0
    Me.tabControl1.Size = New System.Drawing.Size(792, 450)
    Me.tabControl1.TabIndex = 0
    '
    'tabPage1
    '
    Me.tabPage1.Controls.Add(Me.toolStrip1)
    Me.tabPage1.Controls.Add(Me.richTextBox1)
    Me.tabPage1.Cursor = System.Windows.Forms.Cursors.Default
    Me.tabPage1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
    Me.tabPage1.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.tabPage1.Location = New System.Drawing.Point(4, 22)
    Me.tabPage1.Name = "tabPage1"
    Me.tabPage1.Padding = New System.Windows.Forms.Padding(3)
    Me.tabPage1.Size = New System.Drawing.Size(784, 424)
    Me.tabPage1.TabIndex = 0
    Me.tabPage1.Text = "HTML"
    Me.tabPage1.UseVisualStyleBackColor = true
    '
    'tabPage2
    '
    Me.tabPage2.Controls.Add(Me.toolStrip2)
    Me.tabPage2.Controls.Add(Me.richTextBox2)
    Me.tabPage2.Cursor = System.Windows.Forms.Cursors.Default
    Me.tabPage2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
    Me.tabPage2.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.tabPage2.Location = New System.Drawing.Point(4, 22)
    Me.tabPage2.Name = "tabPage2"
    Me.tabPage2.Padding = New System.Windows.Forms.Padding(3)
    Me.tabPage2.Size = New System.Drawing.Size(784, 424)
    Me.tabPage2.TabIndex = 1
    Me.tabPage2.Text = "CSS"
    Me.tabPage2.UseVisualStyleBackColor = true
    '
    'richTextBox1
    '
    Me.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None
    Me.richTextBox1.Cursor = System.Windows.Forms.Cursors.IBeam
    Me.richTextBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
    Me.richTextBox1.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.richTextBox1.Location = New System.Drawing.Point(3, 31)
    Me.richTextBox1.Name = "richTextBox1"
    Me.richTextBox1.Size = New System.Drawing.Size(782, 393)
    Me.richTextBox1.TabIndex = 0
    Me.richTextBox1.Text = ""
    '
    'richTextBox2
    '
    Me.richTextBox2.BorderStyle = System.Windows.Forms.BorderStyle.None
    Me.richTextBox2.Cursor = System.Windows.Forms.Cursors.IBeam
    Me.richTextBox2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
    Me.richTextBox2.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.richTextBox2.Location = New System.Drawing.Point(3, 31)
    Me.richTextBox2.Name = "richTextBox2"
    Me.richTextBox2.Size = New System.Drawing.Size(785, 390)
    Me.richTextBox2.TabIndex = 0
    Me.richTextBox2.Text = ""
    '
    'toolStrip1
    '
    Me.toolStrip1.Font = New System.Drawing.Font("Segoe UI", 9!)
    Me.toolStrip1.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.toolStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow
    Me.toolStrip1.Location = New System.Drawing.Point(3, 3)
    Me.toolStrip1.Name = "toolStrip1"
    Me.toolStrip1.Size = New System.Drawing.Size(778, 25)
    Me.toolStrip1.TabIndex = 1
    Me.toolStrip1.Text = "toolStrip1"
    '
    'toolStrip2
    '
    Me.toolStrip2.Font = New System.Drawing.Font("Segoe UI", 9!)
    Me.toolStrip2.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.toolStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.toolStripButton13, Me.toolStripButton14, Me.toolStripButton1})
    Me.toolStrip2.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow
    Me.toolStrip2.Location = New System.Drawing.Point(3, 3)
    Me.toolStrip2.Name = "toolStrip2"
    Me.toolStrip2.Size = New System.Drawing.Size(778, 25)
    Me.toolStrip2.TabIndex = 1
    Me.toolStrip2.Text = "toolStrip2"
    '
    'toolStripButton13
    '
    Me.toolStripButton13.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
    Me.toolStripButton13.Image = CType(resources.GetObject("toolStripButton13.Image"),System.Drawing.Image)
    Me.toolStripButton13.ImageTransparentColor = System.Drawing.Color.Magenta
    Me.toolStripButton13.Name = "toolStripButton13"
    Me.toolStripButton13.Size = New System.Drawing.Size(23, 22)
    Me.toolStripButton13.Text = "toolStripButton13"
    '
    'toolStripButton14
    '
    Me.toolStripButton14.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
    Me.toolStripButton14.Image = CType(resources.GetObject("toolStripButton14.Image"),System.Drawing.Image)
    Me.toolStripButton14.ImageTransparentColor = System.Drawing.Color.Magenta
    Me.toolStripButton14.Name = "toolStripButton14"
    Me.toolStripButton14.Size = New System.Drawing.Size(23, 22)
    Me.toolStripButton14.Text = "toolStripButton14"
    '
    'toolStripButton1
    '
    Me.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
    Me.toolStripButton1.Image = CType(resources.GetObject("toolStripButton1.Image"),System.Drawing.Image)
    Me.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta
    Me.toolStripButton1.Name = "toolStripButton1"
    Me.toolStripButton1.Size = New System.Drawing.Size(23, 22)
    Me.toolStripButton1.Text = "toolStripButton1"
    '
    'timer1
    '
    Me.timer1.Interval = 2000
    '
    'Fenêtre_Krypton1
    '
    Me.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange
    Me.ClientSize = New System.Drawing.Size(804, 516)
    Me.Controls.Add(Me.toolStripContainer1)
    Me.Cursor = System.Windows.Forms.Cursors.Cross
    Me.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
    Me.Icon = CType(resources.GetObject("$this.Icon"),System.Drawing.Icon)
    Me.ImeMode = System.Windows.Forms.ImeMode.NoControl
    Me.Name = "Fenêtre_Krypton1"
    Me.Text = "Fenêtre_Krypton1"
    CType(Me.kryptonPanel1,System.ComponentModel.ISupportInitialize).EndInit
    Me.kryptonPanel1.ResumeLayout(false)
    Me.toolStripContainer1.ContentPanel.ResumeLayout(false)
    Me.toolStripContainer1.ResumeLayout(false)
    Me.toolStripContainer1.PerformLayout
    Me.tabControl1.ResumeLayout(false)
    Me.tabPage1.ResumeLayout(false)
    Me.tabPage1.PerformLayout
    Me.tabPage2.ResumeLayout(false)
    Me.tabPage2.PerformLayout
    Me.toolStrip2.ResumeLayout(false)
    Me.toolStrip2.PerformLayout
    Me.ResumeLayout(false)
    'project:WebCoditor|function:KryptonForm_Load|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:|actionname:KryptonForm_Load
    AddHandler Me.Load, AddressOf Me.KryptonForm_Load
    'project:WebCoditor|function:timer1_Tick|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:j75iuuftgp4eaptezu5n397tnd8r0lo6tv9h2vk223jf3js7pe|actionname:timer1_Tick
    AddHandler timer1.Tick, AddressOf Me.timer1_Tick
    'project:WebCoditor|function:richTextBox1_TextChanged|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:znhydmnm4dphk3g2r7h0bw537yf13bjfnbdlma7a7vylp7httt|actionname:richTextBox1_TextChanged
    AddHandler richTextBox1.TextChanged, AddressOf Me.richTextBox1_TextChanged
    End Sub

    _
    Public Shared Sub Main()
    _manager.Run(System.Environment.GetCommandLineArgs())
    End Sub
    End Class

    Public Class Fenêtre_Krypton1

    'Fonction KryptonForm_Load
    'project:WebCoditor|function:KryptonForm_Load|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:KryptonForm_Load
    Public Sub KryptonForm_Load(ByVal sender As Object, ByVal e As System.EventArgs)
    'project:WebCoditor|function:KryptonForm_Load|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:|actionname:Commentaire
    'Cette fonction se déclenche à l'ouverture de la fenêtre.
    '
    'This function is launched during opening.
    End Sub

    'Fonction timer1_Tick
    'project:WebCoditor|function:timer1_Tick|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:timer1_Tick
    Public Sub timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs)
    'project:WebCoditor|function:timer1_Tick|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:ids3hbr3sqqoo0x1ap2ohuppopwu5wx6b0dnppgeoforp0lwud|actionname:Arrêter un Minuteur
    Me.timer1.Stop
    'project:WebCoditor|function:timer1_Tick|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:7w575af7ncnhxcm4yzn88syldeybhl1f94hdkxs6f1x4yp6nr3|actionname:Exécuter une fonction d'un projet
    Me.colorationsynthaxique(,System.Drawing.Color.Blue)
    End Sub

    'Fonction colorationsynthaxique
    'project:WebCoditor|function:colorationsynthaxique|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:colorationsynthaxique
    Public Sub colorationsynthaxique(ByVal Texte As Object, ByVal Couleur As Object)
    'project:WebCoditor|function:colorationsynthaxique|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:c1pvenl8p4g4p0syt5lj7sp8fhez3564uptughxjjv7ttye3m4|actionname:Obtenir une propriété d'un contrôle
    Nombre_Caractère = Me.richTextBox1.TextLength
    'project:WebCoditor|function:colorationsynthaxique|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:iajvx3d64udhdfns2ryaoxjgohdn7vol40jbdhw0ofrq6gojj5|actionname:Boucle limitée
    Numero_Caractère = 0
    Do While (Numero_Caractère < Nombre_Caractère)
    'project:WebCoditor|function:colorationsynthaxique|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:bthdk74nq7tevwiykvphx590pp48r9fiwuzxk0lsb0zm5axw3b|actionname:Modifier la valeur d'une variable
    Texte_A_Colorier = "" & Texte & ""
    'project:WebCoditor|function:colorationsynthaxique|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:k4d1yvj5uow6wf57wmf2bhjqamb3ioegnd49zsqt5yxk5ffktg|actionname:Modifier la valeur d'une variable
    Couleur_A_Donner = "" & Couleur & ""
    'project:WebCoditor|function:colorationsynthaxique|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:2rg0scfeegdr13la31hjnjj1rs8z7tfhbp5mhv120spp0x2x7p|actionname:Modifier la valeur d'une variable
    Texte_Trouvé = Me.RichTextBox1.Text.Substring(Numero_Caractère).StartsWith(Texte_A_Colorier)
    'project:WebCoditor|function:colorationsynthaxique|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:mop3qyc3botpdr87i514risco2msnbajjob8eqjpn2q1c0jfra|actionname:Si ... Alors ... Sinon
    If (Texte_Trouvé = True) Then
    'project:WebCoditor|function:colorationsynthaxique|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:ttavwdeagh5gcse6wp8fayclbjy3ar1n0t06i8316r2f0sdjud|actionname:Modifier une propriété d'un contrôle
    Me.richTextBox1.SelectionStart = Numero_Caractère
    'project:WebCoditor|function:colorationsynthaxique|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:r3h5iv11v7chgrsubdi3tp7e58wrkgjzqn2idd70qnkt94sq6l|actionname:Modifier une propriété d'un contrôle
    Me.richTextBox1.SelectionLength = " & Texte_A_Colorier & ".Length
    'project:WebCoditor|function:colorationsynthaxique|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:t0txv8zv817dfbt9uc3o020hx3h9n8dtc398oxae4udvw6mvty|actionname:Modifier une propriété d'un contrôle
    Me.richTextBox1.SelectionColor = Couleur_A_Donner
    End If
    Numero_Caractère = (Numero_Caractère + 1)
    Loop
    End Sub

    'Fonction richTextBox1_TextChanged
    'project:WebCoditor|function:richTextBox1_TextChanged|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:richTextBox1_TextChanged
    Public Sub richTextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
    'project:WebCoditor|function:richTextBox1_TextChanged|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:dqq3t94mezmyyszsykg4y2zz9menth6ko3187nakq91duoj888|actionname:Démarrer un Minuteur
    Me.timer1.Start
    End Sub
    End Class
    End Namespace

    Namespace WebCoditor.My

    Partial Friend Class MyApplication
    Inherits Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase

    _
    Public Sub New()
    MyBase.New(Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
    Me.IsSingleInstance = false
    Me.EnableVisualStyles = true
    Me.SaveMySettingsOnExit = true
    Me.ShutdownStyle = Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
    End Sub

    _
    Protected Overrides Sub OnCreateMainForm()
    Me.MainForm = Variables.Fenêtre_Krypton1
    End Sub
    End Class
    End Namespace

    Namespace WebCoditor.My

    'Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder
    'à l'aide d'un outil, tel que ResGen ou Visual Studio.
    'Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen
    'avec l'option /str ou régénérez votre projet VS.
    '''
    ''' Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
    '''

    Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
    Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
    Friend Class Resources

    Private Shared resourceMan As Global.System.Resources.ResourceManager

    Private Shared resourceCulture As Global.System.Globalization.CultureInfo

    _
    Friend Sub New()
    MyBase.New
    End Sub

    '''
    ''' Retourne l'instance ResourceManager mise en cache utilisée par cette classe.
    '''

    _
    Friend Shared ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
    Get
    If Object.ReferenceEquals(resourceMan, Nothing) Then
    Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WebCoditor.My.Resources", GetType(Resources).Assembly)
    resourceMan = temp
    End If
    Return resourceMan
    End Get
    End Property

    '''
    ''' Remplace la propriété CurrentUICulture du thread actuel pour toutes
    ''' les recherches de ressources à l'aide de cette classe de ressource fortement typée.
    '''

    _
    Friend Shared Property Culture() As Global.System.Globalization.CultureInfo
    Get
    Return resourceCulture
    End Get
    Set
    resourceCulture = value
    End Set
    End Property

    Friend Shared ReadOnly Property application_resize_actual() As System.Drawing.Bitmap
    Get
    Dim obj As Object = ResourceManager.GetObject("application_resize_actual", resourceCulture)
    Return CType(obj,System.Drawing.Bitmap)
    End Get
    End Property

    Friend Shared ReadOnly Property Brush() As System.Drawing.Bitmap
    Get
    Dim obj As Object = ResourceManager.GetObject("Brush", resourceCulture)
    Return CType(obj,System.Drawing.Bitmap)
    End Get
    End Property
    End Class
    End Namespace



    NameSpace WebCoditor
    Module Variables
    Public _manager As My.MyApplication = New My.MyApplication
    Public _computer As Microsoft.VisualBasic.Devices.Computer = New Microsoft.VisualBasic.Devices.Computer
    Public Couleur_A_Donner As New System.Object '
    Public Nombre_Caractère As New System.Object '
    Public Numero_Caractère As New System.Object '
    Public Texte_A_Colorier As New System.Object '
    Public Texte_Trouvé As New System.Object '
    Private _Fenêtre_Krypton1 As New Global.WebCoditor.Fenêtre_Krypton1()
    Public Property Fenêtre_Krypton1 As Global.WebCoditor.Fenêtre_Krypton1 ' Window Fenêtre_Krypton1
    Get
    If _Fenêtre_Krypton1.IsDisposed Then _Fenêtre_Krypton1 = New Global.WebCoditor.Fenêtre_Krypton1()
    Return _Fenêtre_Krypton1
    End Get
    Set(ByVal value As Global.WebCoditor.Fenêtre_Krypton1)
    _Fenêtre_Krypton1 = value
    End Set
    End Property
    End Module
    End NameSpace

    Merci de m'aider
    Cordialement,
    polien


    Dernière édition par polien le Sam 24 Mar 2012 - 10:18, édité 1 fois
    JHPC-Software
    JHPC-Software
    Connaisseur
    Connaisseur


    Masculin Nombre de messages : 761
    Age : 30
    Localisation : Bruxelles
    Emploi/loisirs : Etudiant en informatique / Informatique, Electronique, ...
    Humeur : Très bonne
    Date d'inscription : 07/01/2011

    fonction coloration synthaxique [RESOLU] Empty Re: fonction coloration synthaxique [RESOLU]

    Message par JHPC-Software Jeu 22 Mar 2012 - 18:57

    Bonsoir,
    Un timer pour une colorisation syntaxique, c'est une possibilité ...
    Ca me fait pensé que je travail sur un richtTextBox avec colorisation syntaxique(Pour Vb.Net au départ, et en même temps j'en avais besoin pour faire un projet(hihi je crois que tu sais c'est pour lequel) et pour le moment c'est plutôt bien parti ...

    Fin venons en aux erreurs

    -Ajoute Texte et couleur dans tes variables elle ont pas été déclarée

    -Vérifie et ajoute les classe suivante si elle sont pas présente dans ton projet : System.Xml , System.Xml.Linq et System.Core

    -colorationsynthaxique est inexistant dans Fenêtre_Krypton1

    -'Loop' doit être précédé d'un 'Do' correspondant. Je crois que le problème se trouve la dedans
    Code:
    project:WebCoditor|function:colorationsynthaxique|file:C:\Users\multisection\Documents\Mes Projets SoftwareZator\WebCoditor\WebCoditor\Fenêtre_Krypton1.szw|actionid:t0txv8zv817dfbt9uc3o020hx3h9n8dtc398oxae4udvw6mvty|actionname:Modifier une propriété d'un contrôle
    Me.richTextBox1.SelectionColor = Couleur_A_Donner
    End If
    Numero_Caractère = (Numero_Caractère + 1)
    Loop
    End Sub

    Et ">" doit se placer quelque part

    Cordialement,
    JHPC
    polien
    polien



    Masculin Nombre de messages : 3002
    Age : 27
    Localisation : Bouches du Rhones
    Emploi/loisirs : velo, informatique, électronique, robotique, modélisme feroviaire
    Humeur : Je commence tout mais ne finit rien :P
    Date d'inscription : 19/05/2011

    fonction coloration synthaxique [RESOLU] Empty Re: fonction coloration synthaxique [RESOLU]

    Message par polien Jeu 22 Mar 2012 - 19:37

    re,

    sa ne marche toujours pas...
    Sinon un code m'intéresserait ici: http://www.vbfrance.com/codes/VB-NET-CLASS-COLORATION-SYNTAXIQUE-ON-THE-FLY_52954.aspx

    je l'ai adapté et testé mais quand je tape du texte dans le richtextbox concerné, rien ne se passe...
    JHPC-Software
    JHPC-Software
    Connaisseur
    Connaisseur


    Masculin Nombre de messages : 761
    Age : 30
    Localisation : Bruxelles
    Emploi/loisirs : Etudiant en informatique / Informatique, Electronique, ...
    Humeur : Très bonne
    Date d'inscription : 07/01/2011

    fonction coloration synthaxique [RESOLU] Empty Re: fonction coloration synthaxique [RESOLU]

    Message par JHPC-Software Jeu 22 Mar 2012 - 19:56

    Bonsoir,
    A mon avis ton SyntaxRichtextBox a une erreur dans le code source ...
    Tien donc cette source je l'ai vu lors d'une recherche quand j'avais vu ca, j'ai dit tien donc Etienne est passer par la ...

    Moi ma source était d'un code C# et maintenant j'ai un peu retravailler en le mettant en vb Very Happy et quand j'écrit cela fonctionne a merveille ...

    Je vais être sympa (Comme a chaque fois Wink ) Voila ma source => http://www.codeproject.com/Articles/10675/Enabling-syntax-highlighting-in-a-RichTextBox

    Si sa t'intéresse je fais un projet contrôle vb et je te passe le code source en vb avec instruction pour implémenté et Pour son bon fonctionnement

    De toute façon on a beau mettre des licence sur notre logiciel et sur les composants qui vont avec mais bon moi j'ai trouver le docking et le tabControl (Editeur Visuel et éditeur d'action) de SoftwareZator 2011 Même si je compte pas les utiliser ...

    Cordialement,
    JHPC
    Admin
    Admin
    Administrateur
    Administrateur


    Masculin Nombre de messages : 1882
    Age : 31
    Localisation : Boulogne Billancourt(92100)(France)
    Emploi/loisirs : Software Development Engineer
    Date d'inscription : 24/01/2008

    fonction coloration synthaxique [RESOLU] Empty Re: fonction coloration synthaxique [RESOLU]

    Message par Admin Jeu 22 Mar 2012 - 21:55

    Bonjour,

    Pour corriger les erreurs :
    - Dans l'action "Exécuter une fonction d'un projet" de la fonction "timer1_Tick", il faut mettre une valeur pour la premier paramètre, au moins 2 guillemets, ou bien mettez "nothing" (sans guillemets).
    - Dans la première action "Modifier la valeur d'une variable" de la fonction "colorationsynthaxique", vous appelez une variable "Texte" qui n'existe pas. Il faut donc la créer, ou bien faire une autre modification, selon ce que votre fonction doit faire.
    - Idem juste après, dans la seconde action "Modifier la valeur d'une variable" de la
    fonction "colorationsynthaxique", vous appelez une variable "Couleur" qui
    n'existe pas.

    Les autres erreurs devraient se corriger toutes seules en ayant appliqué la première correction Smile

    Bonne soirée

    [EDIT]
    @JHPC-Software : mon éditeur de code VB.Net est en WPF Razz je n'ai jamais vu ce code là Smile Mais de toute façon après, tant que c'est OpenSource, vous être libre de la prendre et d'y apporter toutes les modifications que vous voulez Smile
    JHPC-Software
    JHPC-Software
    Connaisseur
    Connaisseur


    Masculin Nombre de messages : 761
    Age : 30
    Localisation : Bruxelles
    Emploi/loisirs : Etudiant en informatique / Informatique, Electronique, ...
    Humeur : Très bonne
    Date d'inscription : 07/01/2011

    fonction coloration synthaxique [RESOLU] Empty Re: fonction coloration synthaxique [RESOLU]

    Message par JHPC-Software Jeu 22 Mar 2012 - 22:10

    Bonsoir,
    Vous m'avez mal compris, l’éditeur je sais que c'est pas celui de softwareZator mais je parlais du tabControl et du docking (Celui de SoftwareZator 2011)... Je l'ai ai trouver sur la toile ....
    Et pour la source que vous avez vu c'est l'éditeur sur vbFrance et je sais que c'est pas celui de SoftwareZator mais vous êtes passer par la, vous avez commenter ...

    Cordialement,
    JHPC
    Admin
    Admin
    Administrateur
    Administrateur


    Masculin Nombre de messages : 1882
    Age : 31
    Localisation : Boulogne Billancourt(92100)(France)
    Emploi/loisirs : Software Development Engineer
    Date d'inscription : 24/01/2008

    fonction coloration synthaxique [RESOLU] Empty Re: fonction coloration synthaxique [RESOLU]

    Message par Admin Ven 23 Mar 2012 - 5:27

    Bonjour,

    Ah oui exacte Smile
    Le docking était une dll OpenSource. Quand à l'éditeur de code, à cette époque je m'étais basé sur plusieurs codes trouvés par ci par là, que j'ai au final étudié et réutilisé en partie, d'où les commentaires Wink
    polien
    polien



    Masculin Nombre de messages : 3002
    Age : 27
    Localisation : Bouches du Rhones
    Emploi/loisirs : velo, informatique, électronique, robotique, modélisme feroviaire
    Humeur : Je commence tout mais ne finit rien :P
    Date d'inscription : 19/05/2011

    fonction coloration synthaxique [RESOLU] Empty Re: fonction coloration synthaxique [RESOLU]

    Message par polien Ven 23 Mar 2012 - 11:55

    JHPC-Software a écrit:Bonsoir,
    A mon avis ton SyntaxRichtextBox a une erreur dans le code source ...
    Tien donc cette source je l'ai vu lors d'une recherche quand j'avais vu ca, j'ai dit tien donc Etienne est passer par la ...

    Moi ma source était d'un code C# et maintenant j'ai un peu retravailler en le mettant en vb Very Happy et quand j'écrit cela fonctionne a merveille ...

    Je vais être sympa (Comme a chaque fois Wink ) Voila ma source => http://www.codeproject.com/Articles/10675/Enabling-syntax-highlighting-in-a-RichTextBox

    Si sa t'intéresse je fais un projet contrôle vb et je te passe le code source en vb avec instruction pour implémenté et Pour son bon fonctionnement

    De toute façon on a beau mettre des licence sur notre logiciel et sur les composants qui vont avec mais bon moi j'ai trouver le docking et le tabControl (Editeur Visuel et éditeur d'action) de SoftwareZator 2011 Même si je compte pas les utiliser ...

    Cordialement,
    JHPC

    le code que j'avais trouvé marchait mais la coloration était lente et le controle ne fesait que clignoter Smile
    tu est très sympa en effet mais Laughing
    pour le lien que tu m'a indiqué le code n'est adapté que pour le NET FRAMEWORK 2 il me semble...
    au cas ou, oui je serais intéressé par ton code s'il te plait

    Admin a écrit:Bonjour,

    Pour corriger les erreurs :
    - Dans l'action "Exécuter une fonction d'un projet" de la fonction "timer1_Tick", il faut mettre une valeur pour la premier paramètre, au moins 2 guillemets, ou bien mettez "nothing" (sans guillemets).
    - Dans la première action "Modifier la valeur d'une variable" de la fonction "colorationsynthaxique", vous appelez une variable "Texte" qui n'existe pas. Il faut donc la créer, ou bien faire une autre modification, selon ce que votre fonction doit faire.
    - Idem juste après, dans la seconde action "Modifier la valeur d'une variable" de la
    fonction "colorationsynthaxique", vous appelez une variable "Couleur" qui
    n'existe pas.

    Les autres erreurs devraient se corriger toutes seules en ayant appliqué la première correction Smile

    Bonne soirée

    [EDIT]
    @JHPC-Software : mon éditeur de code VB.Net est en WPF Razz je n'ai jamais vu ce code là Smile Mais de toute façon après, tant que c'est OpenSource, vous être libre de la prendre et d'y apporter toutes les modifications que vous voulez Smile

    re,

    oui merci, maintenant sa fonctionne Wink
    mais quand je tape un code dans mon contrôle, il y a une erreur: " le cast spécifié n'est pas valide " (quelque chose comme ça...)
    JHPC-Software
    JHPC-Software
    Connaisseur
    Connaisseur


    Masculin Nombre de messages : 761
    Age : 30
    Localisation : Bruxelles
    Emploi/loisirs : Etudiant en informatique / Informatique, Electronique, ...
    Humeur : Très bonne
    Date d'inscription : 07/01/2011

    fonction coloration synthaxique [RESOLU] Empty Re: fonction coloration synthaxique [RESOLU]

    Message par JHPC-Software Ven 23 Mar 2012 - 13:08

    Bonjour,
    Polien dit :
    le code que j'avais trouvé marchait mais la coloration était lente et le controle ne fesait que clignoter
    Clignoter ?! Bizarre chez moi il clignote pas Laughing En plus le plus bizarre c'est qu'il y a pas de timer ... C'est l’évènement TextChanged donc je vois pas trop pourquoi ca clignote...

    Fin je te fais sa et je t'envoi le lien Smile

    Cordialement,
    JHPC
    polien
    polien



    Masculin Nombre de messages : 3002
    Age : 27
    Localisation : Bouches du Rhones
    Emploi/loisirs : velo, informatique, électronique, robotique, modélisme feroviaire
    Humeur : Je commence tout mais ne finit rien :P
    Date d'inscription : 19/05/2011

    fonction coloration synthaxique [RESOLU] Empty Re: fonction coloration synthaxique [RESOLU]

    Message par polien Sam 24 Mar 2012 - 10:17

    bonjour,

    @admin: en fait je n'envoyait pas la couleur et le texte à colorier à la fonction se qui m'a fait apparaitre ce message

    sujet résolu

    Contenu sponsorisé


    fonction coloration synthaxique [RESOLU] Empty Re: fonction coloration synthaxique [RESOLU]

    Message par Contenu sponsorisé


      La date/heure actuelle est Ven 26 Avr 2024 - 11:33