public string GetTemplateName() { string str = ""; if (_dic.ContainsKey("选择题")) { str += "选择题" + _dic["选择题"].Count; } if (_dic.ContainsKey("非选择题")) { str += "_非选择题" + _dic["非选择题"].Count; } if (Correctrect != null) { str += "_" + Correctrect.ToString("-"); } return(str); }
public void SetFeaturePoint(List <Rectangle> list, Rectangle cr) { if (Correctrect.ToString() != cr.ToString()) { return; } Point midpoint = new Point(cr.Width / 2, cr.Height / 2); string key = "特征点"; if (!_dic.ContainsKey(key)) { _dic[key] = new List <Area>(); } _dic[key].Clear(); for (int i = 0; i < list.Count; i++) { Rectangle r = list[i]; r.Offset(-cr.X, -cr.Y); _dic[key].Add(new FeaturePoint(r, midpoint)); } }