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