Exemplo n.º 1
0
            public SSSheetsCollectionHelper(SSSlideNetworkService service, string property, SheetMessage.SheetCollection selector) : base(service.m_Sender, service.m_Slide, property)
            {
                this.m_Service  = service;
                this.m_Selector = selector;

                base.Initialize();
            }
Exemplo n.º 2
0
        private void HandleSlideRemoved(object sender, PropertyEventArgs args_)
        {
            PropertyCollectionEventArgs args = ((PropertyCollectionEventArgs)args_);
            SlideModel slide = ((SlideModel)args.Removed);

            using (Synchronizer.Lock(this.m_SlideNetworkServices.SyncRoot)) {
                SSSlideNetworkService service = ((SSSlideNetworkService)this.m_SlideNetworkServices[slide]);
                if (service != null)
                {
                    this.m_SlideNetworkServices.Remove(service);
                    service.Dispose();
                }
            }
        }
Exemplo n.º 3
0
 private void AttachSlide(SlideModel slide)
 {
     // Ensure that nothing about the slide can change between sending the slide's information
     // and creating the SlideNetworkService to listen for changes.
     // TODO: Find a way to also ensure that nothing about the SheetModels change either, but this is less of a concern.
     using (Synchronizer.Lock(slide.SyncRoot)) {
         using (Synchronizer.Lock(this.m_SlideNetworkServices.SyncRoot)) {
             if (!this.m_SlideNetworkServices.ContainsKey(slide))
             {
                 SSSlideNetworkService service = new SSSlideNetworkService(this.m_Sender, this.m_Presentation, this.m_Deck, slide);
                 this.m_SlideNetworkServices.Add(slide, service);
             }
         }
     }
 }
            public SSSheetsCollectionHelper(SSSlideNetworkService service, string property, SheetMessage.SheetCollection selector)
                : base(service.m_Sender, service.m_Slide, property)
            {
                this.m_Service = service;
                this.m_Selector = selector;

                base.Initialize();
            }
 private void AttachSlide(SlideModel slide)
 {
     // Ensure that nothing about the slide can change between sending the slide's information
     // and creating the SlideNetworkService to listen for changes.
     // TODO: Find a way to also ensure that nothing about the SheetModels change either, but this is less of a concern.
     using(Synchronizer.Lock(slide.SyncRoot)) {
         using(Synchronizer.Lock(this.m_SlideNetworkServices.SyncRoot)) {
             if(!this.m_SlideNetworkServices.ContainsKey(slide)) {
                 SSSlideNetworkService service = new SSSlideNetworkService(this.m_Sender, this.m_Presentation, this.m_Deck, slide);
                 this.m_SlideNetworkServices.Add(slide, service);
             }
         }
     }
 }