Commits

Mathias Kluba  committed 0153ebd

better string handling with multi-line

  • Participants
  • Parent commits 14c384b

Comments (0)

Files changed (2)

File FormMain.Designer.cs

             // 
             this.splitContainerObjectDumpDetails.Dock = System.Windows.Forms.DockStyle.Fill;
             this.splitContainerObjectDumpDetails.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
-            this.splitContainerObjectDumpDetails.Location = new System.Drawing.Point(0, 158);
+            this.splitContainerObjectDumpDetails.Location = new System.Drawing.Point(0, 198);
             this.splitContainerObjectDumpDetails.Name = "splitContainerObjectDumpDetails";
             this.splitContainerObjectDumpDetails.Orientation = System.Windows.Forms.Orientation.Horizontal;
             // 
             // 
             this.splitContainerObjectDumpDetails.Panel2.Controls.Add(this.listViewFieldArray);
             this.splitContainerObjectDumpDetails.Panel2Collapsed = true;
-            this.splitContainerObjectDumpDetails.Size = new System.Drawing.Size(723, 445);
+            this.splitContainerObjectDumpDetails.Size = new System.Drawing.Size(723, 405);
             this.splitContainerObjectDumpDetails.SplitterDistance = 311;
             this.splitContainerObjectDumpDetails.TabIndex = 7;
             // 
             this.listViewObjectDump.HideSelection = false;
             this.listViewObjectDump.Location = new System.Drawing.Point(0, 0);
             this.listViewObjectDump.Name = "listViewObjectDump";
-            this.listViewObjectDump.Size = new System.Drawing.Size(723, 445);
+            this.listViewObjectDump.Size = new System.Drawing.Size(723, 405);
             this.listViewObjectDump.TabIndex = 4;
             this.listViewObjectDump.UseCompatibleStateImageBehavior = false;
             this.listViewObjectDump.View = System.Windows.Forms.View.Details;
             this.panelObjectDumpDetails.Dock = System.Windows.Forms.DockStyle.Top;
             this.panelObjectDumpDetails.Location = new System.Drawing.Point(0, 48);
             this.panelObjectDumpDetails.Name = "panelObjectDumpDetails";
-            this.panelObjectDumpDetails.Size = new System.Drawing.Size(723, 110);
+            this.panelObjectDumpDetails.Size = new System.Drawing.Size(723, 150);
             this.panelObjectDumpDetails.TabIndex = 5;
             // 
             // textBoxObjectDumpToString
             // 
             this.textBoxObjectDumpToString.Location = new System.Drawing.Point(102, 84);
+            this.textBoxObjectDumpToString.Multiline = true;
             this.textBoxObjectDumpToString.Name = "textBoxObjectDumpToString";
             this.textBoxObjectDumpToString.ReadOnly = true;
-            this.textBoxObjectDumpToString.Size = new System.Drawing.Size(428, 20);
+            this.textBoxObjectDumpToString.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+            this.textBoxObjectDumpToString.Size = new System.Drawing.Size(428, 60);
             this.textBoxObjectDumpToString.TabIndex = 3;
             // 
             // textBoxObjectDumpSize

File SosController.cs

                 match = Regex.Match(line, ".*String: (.*)");
                 if (match.Success)
                 {
-                    result.String = match.Groups[1].Value;
+                    StringBuilder toString = new StringBuilder();
+                    toString.AppendLine(match.Groups[1].Value);
+
+                    // read the other lines to reach the "Fields"
+                    match = Regex.Match(line, ".*Fields: (.*)");
+                    while (!match.Success && line != null)
+                    {
+                        line = reader.ReadLine();
+                        if (line != null)
+                        {
+                            match = Regex.Match(line, ".*Fields:(.*)");
+                            if(!match.Success)
+                                toString.AppendLine(line);
+                        }
+                    }
+                    result.String = toString.ToString();
                 }
                 line = reader.ReadLine();
             }
                     match = Regex.Match(line, ".*String: (.*)");
                     if (match.Success)
                     {
-                        result.String = match.Groups[1].Value;
+                        StringBuilder toString = new StringBuilder();
+                        toString.AppendLine(match.Groups[1].Value);
+
+                        // read the other lines to reach the "Fields"
+                        match = Regex.Match(line, ".*Fields: (.*)");
+                        while (!match.Success && line != null)
+                        {
+                            line = reader.ReadLine();
+                            if (line != null)
+                            {
+                                match = Regex.Match(line, ".*Fields:(.*)");
+                                if (!match.Success)
+                                    toString.AppendLine(line);
+                            }
+                        }
+                        result.String = toString.ToString();
                     }
                     line = reader.ReadLine();
                 }