예제 #1
0
        private void map_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (IsDisposed)
            {
                return;
            }

            if (sender is ILayer && e.PropertyName == "Map")
            {
                return; // performance optimization, avoid double rendering
            }

            foreach (var tool in tools.ToArray())
            {
                tool.OnMapPropertyChanged(sender, e); // might be a problem, events are skipped
            }
            if (Visible)
            {
                Refresh();
            }
            else
            {
                map.Layers.ForEach(l => { if (!l.RenderRequired)
                                          {
                                              l.RenderRequired = true;
                                          }
                                   });
            }
        }
예제 #2
0
        private void map_PropertyChanged_Delayed(object sender, PropertyChangedEventArgs e)
        {
            if (IsDisposed)
            {
                return;
            }

            foreach (IMapTool tool in tools.ToArray())
            {
                tool.OnMapPropertyChanged(sender, e); // might be a problem, events are skipped
            }

            Refresh();
        }
예제 #3
0
        public void ToArrayTest()
        {
            var a = new[] { new EClass(1), new EClass(2), new EClass(3) };
            var l = new EventedList <EClass>(a);

            Assert.That(l.ToArray(), Is.EquivalentTo(a));
        }
예제 #4
0
        private void map_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (IsDisposed)
            {
                return;
            }

            foreach (var tool in tools.ToArray())
            {
                tool.OnMapPropertyChanged(sender, e); // might be a problem, events are skipped
            }
            if (Visible)
            {
                Refresh();
            }
            else
            {
                map.Layers.ForEach(l => { if (!l.RenderRequired)
                                          {
                                              l.RenderRequired = true;
                                          }
                                   });
            }
        }