Rename UIItem to Item

This commit is contained in:
AJ
2021-10-04 19:16:51 -04:00
parent 5f3d95a4c9
commit 25b3cdcfdc
5 changed files with 12 additions and 11 deletions

View File

@@ -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>

View File

@@ -124,7 +124,7 @@
//
// itemBindingSource
//
this.itemBindingSource.DataSource = typeof(CutList.UIItem);
this.itemBindingSource.DataSource = typeof(CutList.Models.Item);
//
// label1
//

View File

@@ -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;

View File

@@ -202,7 +202,7 @@
//
// uIItemBindingSource
//
this.uIItemBindingSource.DataSource = typeof(CutList.UIItem);
this.uIItemBindingSource.DataSource = typeof(CutList.Models.Item);
//
// menuStrip1
//

View File

@@ -2,11 +2,11 @@
using SawCut;
using System;
namespace CutList
namespace CutList.Models
{
public class UIItem
public class Item
{
public UIItem()
public Item()
{
}