private int ListGenerator(int i) { int ret = -1; if (List == null) { List = new SupremeList(i); if (List.Executed) { ret = default(int); } else { List = null; } } else { SupremeList Tmp = new SupremeList(i); if (Tmp.Executed) { if (List.Count() != Tmp.Count()) { List = Tmp; ret = default(int); } else if (!List.SequenceEqual(Tmp, new SupremeComparer())) { List = Tmp; ret = 1; } } else { Tmp = null; } } return(ret); }
private void GeneratePictureBoxImage(SupremeList _list, int i) { if (this.pictureBox1.InvokeRequired) { SetPictureBoxCallback p = new SetPictureBoxCallback(GeneratePictureBoxImage); this.Invoke(p, new object[] { _list, i }); } else { switch (i) { case 0: if (!Block) { if (Navigation != 0) { Navigation--; } pictureBox1.Image = Images.Images[Navigation]; } break; case 1: if (!Block) { if (Navigation != _list.Count() - 1) { Navigation++; } pictureBox1.Image = Images.Images[Navigation]; } break; default: Navigation = default(int); pictureBox1.Image = Images.Images[Navigation]; if (Type != 0) { pictureBox1.Cursor = Cursors.Hand; } else { pictureBox1.Cursor = Cursors.Help; } Block = false; break; } if (!Block) { if (_list[Navigation].Sold) { toolTip1.SetToolTip(pictureBox1, _list[Navigation].Name + " : SOLD OUT"); } else { toolTip1.SetToolTip(pictureBox1, _list[Navigation].Name); } } EmptyWorkingSet(Process.GetCurrentProcess().Handle); } }