Rename UIItem to Item
This commit is contained in:
@@ -101,7 +101,7 @@
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Tool.cs" />
|
||||
<Compile Include="Models\UIItem.cs" />
|
||||
<Compile Include="Models\Item.cs" />
|
||||
<EmbeddedResource Include="Forms\MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
2
CutList/Forms/MainForm.Designer.cs
generated
2
CutList/Forms/MainForm.Designer.cs
generated
@@ -124,7 +124,7 @@
|
||||
//
|
||||
// itemBindingSource
|
||||
//
|
||||
this.itemBindingSource.DataSource = typeof(CutList.UIItem);
|
||||
this.itemBindingSource.DataSource = typeof(CutList.Models.Item);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json;
|
||||
using CutList.Models;
|
||||
using Newtonsoft.Json;
|
||||
using SawCut;
|
||||
using SawCut.Nesting;
|
||||
using SimpleExpressionEvaluator;
|
||||
@@ -15,13 +16,13 @@ namespace CutList.Forms
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
private BindingList<UIItem> items;
|
||||
private BindingList<Item> items;
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
items = new BindingList<UIItem>();
|
||||
items = new BindingList<Item>();
|
||||
items.ListChanged += Items_ListChanged;
|
||||
|
||||
itemBindingSource.DataSource = items;
|
||||
@@ -98,7 +99,7 @@ namespace CutList.Forms
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var data = File.ReadAllText(openFileDialog.FileName);
|
||||
items = JsonConvert.DeserializeObject<BindingList<UIItem>>(data);
|
||||
items = JsonConvert.DeserializeObject<BindingList<Item>>(data);
|
||||
|
||||
dataGridView1.ClearSelection();
|
||||
itemBindingSource.DataSource = items;
|
||||
@@ -287,7 +288,7 @@ namespace CutList.Forms
|
||||
{
|
||||
if (e.ColumnIndex == lengthDataGridViewTextBoxColumn.Index)
|
||||
{
|
||||
var item = dataGridView1.Rows[e.RowIndex].DataBoundItem as UIItem;
|
||||
var item = dataGridView1.Rows[e.RowIndex].DataBoundItem as Item;
|
||||
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
2
CutList/Forms/ResultsForm.Designer.cs
generated
2
CutList/Forms/ResultsForm.Designer.cs
generated
@@ -202,7 +202,7 @@
|
||||
//
|
||||
// uIItemBindingSource
|
||||
//
|
||||
this.uIItemBindingSource.DataSource = typeof(CutList.UIItem);
|
||||
this.uIItemBindingSource.DataSource = typeof(CutList.Models.Item);
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
using SawCut;
|
||||
using System;
|
||||
|
||||
namespace CutList
|
||||
namespace CutList.Models
|
||||
{
|
||||
public class UIItem
|
||||
public class Item
|
||||
{
|
||||
public UIItem()
|
||||
public Item()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user