示例#1
0
        private void StrokeService_AddStrokeEvent(object sender, AddStrokeEventArgs e)
        {
            if (e.NewStroke == null)
            {
                return;
            }

            var removedStrokes = strokes.RemoveAll(s => s.Id == e.OldStroke?.Id);

            if (removedStrokes > 0)
            {
                strokes.Add(e.NewStroke);
            }
        }
示例#2
0
 private void StrokesService_AddStrokeEvent(object sender, AddStrokeEventArgs e)
 {
     AddStroke(e.NewStroke);
 }