Skip over items that have 0 length
This commit is contained in:
@@ -1,15 +1,10 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace CutToLength
|
namespace CutToLength
|
||||||
@@ -56,9 +51,9 @@ namespace CutToLength
|
|||||||
{
|
{
|
||||||
var bins = GetResults();
|
var bins = GetResults();
|
||||||
|
|
||||||
var form = new Form2();
|
var form = new Form2();
|
||||||
form.Bins = bins;
|
form.Bins = bins;
|
||||||
form.ShowDialog();
|
form.ShowDialog();
|
||||||
|
|
||||||
//var saveFileDialog = new SaveFileDialog();
|
//var saveFileDialog = new SaveFileDialog();
|
||||||
//saveFileDialog.Filter = "Text File|*.txt";
|
//saveFileDialog.Filter = "Text File|*.txt";
|
||||||
@@ -100,6 +95,9 @@ namespace CutToLength
|
|||||||
|
|
||||||
foreach (var item in items)
|
foreach (var item in items)
|
||||||
{
|
{
|
||||||
|
if (item.Length == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
for (int i = 0; i < item.Quantity; i++)
|
for (int i = 0; i < item.Quantity; i++)
|
||||||
{
|
{
|
||||||
items2.Add(new BinItem
|
items2.Add(new BinItem
|
||||||
@@ -240,7 +238,7 @@ namespace CutToLength
|
|||||||
public class UIItem
|
public class UIItem
|
||||||
{
|
{
|
||||||
private string name;
|
private string name;
|
||||||
|
|
||||||
public UIItem()
|
public UIItem()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user