diff --git a/tomcatAnalys/frmStart.Designer.cs b/tomcatAnalys/frmStart.Designer.cs index d9171ff..18b6113 100644 --- a/tomcatAnalys/frmStart.Designer.cs +++ b/tomcatAnalys/frmStart.Designer.cs @@ -65,7 +65,9 @@ this.lbInstances.Location = new System.Drawing.Point(13, 98); this.lbInstances.Name = "lbInstances"; this.lbInstances.Size = new System.Drawing.Size(744, 407); + this.lbInstances.Sorted = true; this.lbInstances.TabIndex = 2; + this.lbInstances.DoubleClick += new System.EventHandler(this.lbInstances_DoubleClick); // // btnClose // diff --git a/tomcatAnalys/frmStart.cs b/tomcatAnalys/frmStart.cs index 2efff07..86b0e6a 100644 --- a/tomcatAnalys/frmStart.cs +++ b/tomcatAnalys/frmStart.cs @@ -32,6 +32,7 @@ namespace tomcatAnalys private void btnAnalyse_Click(object sender, EventArgs e) { + lbInstances.Items.Clear(); fileWindow.FileShowerFileName = lblFileName.Text; fileWindow.FileShowerBox.Text = File.ReadAllText(lblFileName.Text); fileWindow.FileShowerBox.Text = fileWindow.FileShowerBox.Text.Replace("\n", "\r\n"); @@ -103,6 +104,14 @@ namespace tomcatAnalys { this.Close(); } + + private void lbInstances_DoubleClick(object sender, EventArgs e) + { + ListItem aktRad= (ListItem)lbInstances.Items[lbInstances.SelectedIndex]; + fileWindow.FileShowerFileName = aktRad.GarantiNr+"-"+aktRad.GarantiJob; + fileWindow.FileShowerBox.Lines = aktRad.xmlRader; + fileWindow.ShowDialog(); + } } public class ListItem