Exemple #1
0
        private void expander_expanderClickItem(EXPANDER_FUNCTION function, UIElement element)
        {
            BlockJoint bj = (BlockJoint)((LMD_GUI.LMD_CircleExpander)element).Tag;             // Блок следующей/предидущей связи

            switch (function)
            {
            case EXPANDER_FUNCTION.joint:
                if (workspace.selectJoint == null)
                {
                    workspace.selectJoint = new BlockJoint(workspace);
                    workspace.selectJoint.element_begin   = bj.element_begin;
                    workspace.selectJoint.createNewJoint += workspace.selectJoint_createNewJoint;
                    workspace.selectJoint.removeJoint    += workspace.selectJoint_removeJoint;
                    workspace.selectJoint.SelectXY(Canvas.GetLeft(element) + 10, Canvas.GetTop(element) + 10);
                    workspace.selectJoint.type_line = TYPE_LINE.line_block;
                    workspace.joint_select          = true;
                }
                else if (workspace.selectJoint != null)                         // Линия к линии
                {
                    SelectXY(Canvas.GetLeft(workspace.selectJoint.element_begin) + 10,
                             Canvas.GetTop(workspace.selectJoint.element_begin) + 10);
                    workspace.selectJoint.type_line   = TYPE_LINE.end_condition;
                    workspace.selectJoint.element_end = bj.element_begin;
                    workspace.selectJoint.Create(workspace.canvas, Canvas.GetLeft(element) + 10, Canvas.GetTop(element) + 10);
                    workspace.joint_select = false;

                    createNewJoint(this);
                }
                break;

            case EXPANDER_FUNCTION.properties: break;

            case EXPANDER_FUNCTION.delete: ThisRemove(); break;
            }
        }
Exemple #2
0
 public void SetNext(BlockJoint block)
 {
     this.block_next = block;
 }
 /// <summary>
 /// Происходит при удалении связи
 /// </summary>
 /// <param name="block_joint"></param>
 private void workspace_RemoveLine(LMD_BLOCKS.BlockJoint block_joint)
 {
 }
 /// <summary>
 /// Происходит при добавлении любой новой связи
 /// </summary>
 /// <param name="block_joint">Связь</param>
 private void workspace_createNewLine(LMD_BLOCKS.BlockJoint block_joint)
 {
 }