Added even SingelClick event for checking list
This commit is contained in:
14
tomcatAnalys/ListItem.cs
Normal file
14
tomcatAnalys/ListItem.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
namespace tomcatAnalys
|
||||||
|
{
|
||||||
|
public class ListItem
|
||||||
|
{
|
||||||
|
public string GarantiNr { get; set; }
|
||||||
|
public string GarantiJob { get; set; }
|
||||||
|
public string[] xmlRader { get; set; }
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
string returStr = $"Garanti: {GarantiNr} Jobnr: {GarantiJob} ex: {xmlRader[6].Substring(0, 50) + "..."}";
|
||||||
|
return returStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1
tomcatAnalys/frmStart.Designer.cs
generated
1
tomcatAnalys/frmStart.Designer.cs
generated
@ -67,6 +67,7 @@
|
|||||||
this.lbInstances.Size = new System.Drawing.Size(744, 407);
|
this.lbInstances.Size = new System.Drawing.Size(744, 407);
|
||||||
this.lbInstances.Sorted = true;
|
this.lbInstances.Sorted = true;
|
||||||
this.lbInstances.TabIndex = 2;
|
this.lbInstances.TabIndex = 2;
|
||||||
|
this.lbInstances.Click += new System.EventHandler(this.lbInstances_Click);
|
||||||
this.lbInstances.DoubleClick += new System.EventHandler(this.lbInstances_DoubleClick);
|
this.lbInstances.DoubleClick += new System.EventHandler(this.lbInstances_DoubleClick);
|
||||||
//
|
//
|
||||||
// btnClose
|
// btnClose
|
||||||
|
|||||||
@ -107,22 +107,20 @@ namespace tomcatAnalys
|
|||||||
|
|
||||||
private void lbInstances_DoubleClick(object sender, EventArgs e)
|
private void lbInstances_DoubleClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ListItem aktRad= (ListItem)lbInstances.Items[lbInstances.SelectedIndex];
|
CheckClickedRow();
|
||||||
fileWindow.FileShowerFileName = aktRad.GarantiNr+"-"+aktRad.GarantiJob;
|
}
|
||||||
|
|
||||||
|
private void CheckClickedRow()
|
||||||
|
{
|
||||||
|
ListItem aktRad = (ListItem)lbInstances.Items[lbInstances.SelectedIndex];
|
||||||
|
fileWindow.FileShowerFileName = aktRad.GarantiNr + "-" + aktRad.GarantiJob;
|
||||||
fileWindow.FileShowerBox.Lines = aktRad.xmlRader;
|
fileWindow.FileShowerBox.Lines = aktRad.xmlRader;
|
||||||
fileWindow.ShowDialog();
|
fileWindow.ShowDialog();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public class ListItem
|
private void lbInstances_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
public string GarantiNr { get; set; }
|
CheckClickedRow();
|
||||||
public string GarantiJob { get; set; }
|
|
||||||
public string[] xmlRader { get; set; }
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
string returStr = $"Garanti: {GarantiNr} Jobnr: {GarantiJob} ex: {xmlRader[6].Substring(0, 50) + "..."}";
|
|
||||||
return returStr;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,6 +58,7 @@
|
|||||||
<Compile Include="frmStart.Designer.cs">
|
<Compile Include="frmStart.Designer.cs">
|
||||||
<DependentUpon>frmStart.cs</DependentUpon>
|
<DependentUpon>frmStart.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="ListItem.cs" />
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<EmbeddedResource Include="frmFileShower.resx">
|
<EmbeddedResource Include="frmFileShower.resx">
|
||||||
|
|||||||
Reference in New Issue
Block a user