Bonjour,
je veux récupérer seulement les donnée hexadécimale et les convertie en décimale.
j'ai utiliser ce code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; private void button2_Click(object sender, EventArgs e) // boutton recuperation { String line; try { StreamReader sr = new StreamReader("C:\\Montext.txt"); line =sr.ReadLine(); while (line != null) { if ( line.Contains("00")) { richTextBox1.AppendText(line.Trim() + "\r"); } line = sr.ReadLine(); } sr.Close(); } catch (Exception ex) { Console.WriteLine("Exception: " + ex.Message); } finally { Console.WriteLine(" Execution terminer. "); } } }
Exemple de donnée -->
09:43:30.221291 VHM 155811 28973 32985994
Ntwrk Us:201263 Srvc: Ss:842a9b0 Sct:0 In --> L:2(0)
00000 01 00 01 11 00 00 00 00 12 00 37 00 1F 00 ..........7.....
00110 00 00 00 00 01 00 00 00 00 11 00 00 00 00 ................
09:43:34.274810 VHM 155811 70813 41610927
Ntwrk Us:273448 Srvc: Ss:842a9b0 Sct:0 M:0 <-- Out L:6(8)
00010 01 00 01 01 00 00 01 00 11 00 14 00 04 00 ................
11010 00 00 00 10 01 00 00 00 00 00 00 00 00 00 ................
Je suis très débutant...
Merci de votre aide!
Partager