private void btnAddPrio_Click(object sender, EventArgs e) { if (fpChamps.Controls.Count < 10) { ChampSelector csObj = new ChampSelector(); csObj.Champions = dictChampions; fpChamps.Controls.Add(csObj); } }
private void UpdateImageList() { ImageList.Clear(); foreach (object itCs in fpChamps.Controls) { ChampSelector champSelector = (ChampSelector)itCs; if (champSelector.Champion != "") { var img = CvMat.FromFile(champSelector.ChampionFile); var gray = new CvMat(img.Rows, img.Cols, MatrixType.U8C1); img.CvtColor(gray, ColorConversion.BgrToGray); ImageList.Add(gray); } } }