public ClientAnnotationViewModel(ISharedDataService sharedDataService, MeetingViewModel meeting) : base(sharedDataService, meeting)
 {
     // create the client annotations property, a mapped version of the agent's properties based on the screen sizes.
     _annotationsChangedSub = _clientAnnotations = AnnotationsModel
                                                   .WhenAnyValue(v => v.Annotations, v => v.Select(p => CreateAnnotationViewModel(p)))
                                                   .ToProperty(this, v => v.Annotations);
 }
        /// <summary>
        /// Undoes the last annotation by the Agent
        /// </summary>
        public void UndoAnnotation()
        {
            if (AnnotationsModel.Annotations.Count == 0)
            {
                return;
            }

            // find the last annotation for this page/tool

            var last = _annotations.LastOrDefault(IsInCurrentPage);

            if (last == null)
            {
                return;
            }

            _annotations.Remove(last);
            AnnotationsModel.Annotations.Remove(last.Annotation);

            this.RaisePropertyChanged("Annotations");             // rebinds to UI
            AnnotationsModel.RaisePropertyChanged("Annotations"); // do this to ensure annotations are sent
        }
Пример #3
0
 public SharedDataService()
 {
     Person           = new PersonModel();
     MeetingState     = new MeetingStateModel();
     AnnotationsModel = new AnnotationsModel();
 }