void DisposeArrowLine(IArrowLine _newLine) { if (null == _newLine) { return; } _newLine.Dispose(); }
void DisposeArrowLine(IArrowLine _newLine) { if (null == _newLine) { return; } _newLine.DeleteLine -= _newLine_DeleteLine; _newLine.ResetDirection -= _newLine_ResetDirection; _newLine.Dispose(); }
/// <summary> /// 删除线 /// </summary> /// <param name="line"></param> void RemoveArrowLine(IArrowLine line) { if (null == line) { return; } DisposeArrowLine(line); if (line.ArrowCapControl is IActivity) { (line.ArrowCapControl as IActivity).RemoveLine(line); } if (line.ArrowFootControl is IActivity) { (line.ArrowFootControl as IActivity).RemoveLine(line); } var ctl = this.print.FindName(line.CtrName) as UIElement; this.print.Children.Remove(ctl); }
/// <summary> /// /// </summary> /// <param name="line"></param> public void RemoveLine(IArrowLine line) { //if (DictArrowCapPoint.ContainsKey(line)) //{ // DictArrowCapPoint.Remove(line); //} //if (DictArrowFootPoint.ContainsKey(line)) //{ // DictArrowFootPoint.Remove(line); //} if (DictArrowCapPoint.ContainsKey(line.CtrName)) { DictArrowCapPoint.Remove(line.CtrName); } if (DictArrowFootPoint.ContainsKey(line.CtrName)) { DictArrowFootPoint.Remove(line.CtrName); } }