Esempio n. 1
0
        private void OnRegionsLoaded(DataLoaded <Region> e)
        {
            foreach (var region in e.Data)
            {
                var viewmodel = new RegionViewModel(region);
                AllRegions.Add(viewmodel);

                //viewmodel.Exists();
                viewmodel.AddToUI(Overlay);
            }
        }
Esempio n. 2
0
        private void OnMouseStateChanged(MouseState e)
        {
            if (e.IsLeftButtonDown)
            {
                if (EditingRegion == null)
                {
                    EditingRegion = new RegionViewModel(e.Position);
                    EditingRegion.AddToUI(Overlay);
                    DragOrigin = e.Position;
                    return;
                }

                EditingRegion.ApplyDrag(DragOrigin, e.Position);
            }
            else
            {
                CommitRegion();
            }
        }