current working omni inspection
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
namespace InspectionUI.ViewModels
|
||||
{
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public abstract class ItemsGridVM : VM, IEnumerable<ItemsGridRowVM>
|
||||
{
|
||||
private readonly IList<ItemsGridRowVM> rows;
|
||||
|
||||
protected ItemsGridVM() : base()
|
||||
{
|
||||
this.rows = new List<ItemsGridRowVM>();
|
||||
}
|
||||
|
||||
public IEnumerator<ItemsGridRowVM> GetEnumerator()
|
||||
{
|
||||
return this.rows.GetEnumerator();
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
protected void Add(ItemsGridRowVM item)
|
||||
{
|
||||
this.rows.Add(item);
|
||||
}
|
||||
|
||||
protected void Clear()
|
||||
{
|
||||
foreach (var item in this.rows)
|
||||
{
|
||||
item.Dispose();
|
||||
}
|
||||
|
||||
this.rows.Clear();
|
||||
}
|
||||
|
||||
protected int IndexOf(ItemsGridRowVM item)
|
||||
{
|
||||
return this.rows.IndexOf(item);
|
||||
}
|
||||
|
||||
protected void Insert(int index, ItemsGridRowVM item)
|
||||
{
|
||||
this.rows.Insert(index, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user