/// <summary> /// 添加函数框 /// </summary> /// <param name="fb"></param> protected override void Add(IFunctionBox ffb) { FunctionBox fb = ffb as FunctionBox; contentsCanvas.Children.Add(fb); iFunctionBoxs.Add(fb); fb.MouseEnter += Fb_MouseEnter; fb.MouseLeave += Fb_MouseLeave; }
/// <summary> /// 设置单个为被选中 /// </summary> /// <param name="box"></param> public override void SelectBox(IFunctionBox box) { foreach (var item in iFunctionBoxs) { if (box == item) { (item.Ibox).Thickness = 6; } else { (item.Ibox).Thickness = 2; } } Canvas.SetZIndex(box, 9999); selectedBoxs.Clear(); selectedBoxs.Add(box as FunctionBox); base.SelectBox(box); }