Exemplo n.º 1
0
        private void DropCondition(string str, Point mouse)
        {
            SmartEvent el = events.EventAt(mouse.X, mouse.Y);

            switch (dropResult)
            {
            case DropResult.INSERT:
                el.InsertCondition(SmartFactory.GetInstance().ConditionFactory(str), el.GetInsertConditionIndexFromPos(mouse.X, mouse.Y));
                break;

            case DropResult.REPLACE:
                DrawableElement condition = el.GetElementFromPos(mouse.X, mouse.Y);
                el.ReplaceCondition(SmartFactory.GetInstance().ConditionFactory(str), (SmartCondition)condition);
                break;
            }
        }