Esempio n. 1
0
        private void DropEvent(string strEvent, Point mouse)
        {
            switch (dropResult)
            {
            case DropResult.INSERT:
                events.Insert(SmartFactory.GetInstance().EventFactory(strEvent), events.GetInsertIndexFromPos(mouse.X, mouse.Y));
                break;

            case DropResult.REPLACE:
                SmartEvent ev        = (SmartEvent)events.ElementAt(mouse.X, mouse.Y);
                SmartEvent new_event = SmartFactory.GetInstance().EventFactory(strEvent);
                new_event.Copy(ev);
                events.Replace(ev, new_event);
                break;
            }
        }