Exemplo n.º 1
0
        private void stroqs_Changed(object sender, StroqCollection.ChangedEventArgs e)
        {
            switch (e.Action)
            {
            case System.Collections.Specialized.NotifyCollectionChangedAction.Add:
                StroqsAdded(e.NewItems);
                break;

            case System.Collections.Specialized.NotifyCollectionChangedAction.Remove:
                StroqsDeleted(e.OldItems);
                break;

            case System.Collections.Specialized.NotifyCollectionChangedAction.Reset:
                if (StrokesDeleting != null)
                {
                    StrokesDeleting(_ink.Strokes);
                }
                _ink.DeleteStrokes();
                _map.Clear();
                _map2.Clear();

                if (e.NewItems != null)
                {
                    StroqsAdded(e.NewItems);
                }
                break;

            default:
                throw new NotImplementedException();
            }
        }