From 7d7ec52023f929ba9d9b4929b687de7e2b56adfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommy=20=C3=96man?= Date: Mon, 7 Jan 2019 16:41:07 +0100 Subject: [PATCH] =?UTF-8?q?Fungerar=20med=20inl=C3=A4sning=20och=20s=C3=B6?= =?UTF-8?q?kning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tomcatAnalys/frmStart.Designer.cs | 2 ++ tomcatAnalys/frmStart.cs | 9 +++++++++ 2 files changed, 11 insertions(+) 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