Fungerar med inläsning och sökning

This commit is contained in:
Tommy Öman
2019-01-07 16:41:07 +01:00
parent 60615f80e7
commit 7d7ec52023
2 changed files with 11 additions and 0 deletions

View File

@ -65,7 +65,9 @@
this.lbInstances.Location = new System.Drawing.Point(13, 98); this.lbInstances.Location = new System.Drawing.Point(13, 98);
this.lbInstances.Name = "lbInstances"; this.lbInstances.Name = "lbInstances";
this.lbInstances.Size = new System.Drawing.Size(744, 407); this.lbInstances.Size = new System.Drawing.Size(744, 407);
this.lbInstances.Sorted = true;
this.lbInstances.TabIndex = 2; this.lbInstances.TabIndex = 2;
this.lbInstances.DoubleClick += new System.EventHandler(this.lbInstances_DoubleClick);
// //
// btnClose // btnClose
// //

View File

@ -32,6 +32,7 @@ namespace tomcatAnalys
private void btnAnalyse_Click(object sender, EventArgs e) private void btnAnalyse_Click(object sender, EventArgs e)
{ {
lbInstances.Items.Clear();
fileWindow.FileShowerFileName = lblFileName.Text; fileWindow.FileShowerFileName = lblFileName.Text;
fileWindow.FileShowerBox.Text = File.ReadAllText(lblFileName.Text); fileWindow.FileShowerBox.Text = File.ReadAllText(lblFileName.Text);
fileWindow.FileShowerBox.Text = fileWindow.FileShowerBox.Text.Replace("\n", "\r\n"); fileWindow.FileShowerBox.Text = fileWindow.FileShowerBox.Text.Replace("\n", "\r\n");
@ -103,6 +104,14 @@ namespace tomcatAnalys
{ {
this.Close(); 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 public class ListItem