private void GetLinkables(Point pos, TouchDevice d) { Shape resizeNode = null; var sh = DocTools.DetectSelectedShape(_doc, pos, d, out resizeNode) as IVdShape; var end = DocTools.RequestLinkable(sh); if (end == null) { MessageDlg.Show("Can only link points and groups/付箋とグループ以外はリンクできません", "Tip", MessageBoxButton.OK, MessageBoxImage.Information); _palette.ResetTool(); _modeMgr.Mode = ShapeInputMode.ManipulationExpected; return; } if (_linkCreation.end1 == null) { _linkCreation.end1 = end; } else if (end == _linkCreation.end1) { _palette.ResetTool(); _modeMgr.Mode = ShapeInputMode.ManipulationExpected; MessageDlg.Show("Cannot link points with itself/同じ付箋・グループをリンクする事はできません", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } else { _linkCreation.end2 = end; } }
void GetLinkables(Point pos, TouchDevice d) { Shape resizeNode = null; var sh = DocTools.DetectSelectedShape(_doc, pos, d, out resizeNode) as IVdShape; var end = DocTools.RequestLinkable(sh); if (end == null) { MessageBox.Show("Badges or clusters are accepted as link endpoints", "Tip", MessageBoxButton.OK, MessageBoxImage.Information); return; } if (linkCreation.end1 == null) { linkCreation.end1 = end; } else if (end == linkCreation.end1) { MessageBox.Show("Cannot link object with itself", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } else { linkCreation.end2 = end; } }