public GUI() { Items = new ITEMS("Temp.json"); Filter = new FILTER(ref Items); Sorter = new SORTER(ref Items); Select = new SELECT(ref Items); Search = new SEARCH(ref Items); Import = new IMPORT(ref Items); Export = new EXPORT(ref Items); Mulits = new MULTIS(ref Items); Nexusx = new NEXUSX(ref Items); }
//"Grammer","XXX",23,4 public List <ITEM> FindTopSim(ref ITEMS Items, List <string> Keys, List <string> Vals, int?ExcludedID, int TopX) { List <ITEM> Res = new List <ITEM>(); List <SimRes> ResTemp = new List <SimRes>(); if (Keys.Count == 0 || Items.Internal.Count == 0 || Keys.Count != Vals.Count || TopX <= 0) { return(Res); } foreach (ITEM Item in Items.Internal) { if (ExcludedID != null && ExcludedID == Item.UniqueID) { continue; } ResTemp.Add(new SimRes() { Sim = Sim(Item, Keys, Vals), ID = Item.UniqueID, }); } ResTemp.Sort(SortList); int j = 0; for (int i = 0; i < TopX; i++) { if (Vals[0] != Items.Internal[Items.GetIndexByID(ResTemp[j].ID)].MainBody[Keys[0]]) { Res.Add(Items.Internal[Items.GetIndexByID(ResTemp[j].ID)]); } else { i--; } j++; } return(Res); }
public SORTER(ref ITEMS Items) { this.Items = Items; Mode = SupportedMode[0]; }
public MULTIS(ref ITEMS Items) { this.Items = Items; }
public NEXUSX(ref ITEMS Items) { this.Items = Items; }
public EXPORT(ref ITEMS Items) { this.Items = Items; }
public SEARCH(ref ITEMS Items) { this.Items = Items; }
public SELECT(ref ITEMS Items) { this.Items = Items; Mode = SupportedMode[0]; }