public LocationsSchemePage(LocationsPlanViewModel model) : base(model) { Model = model; InitializeComponent(); abslayout.GestureRecognizers.Add(TapGesture); abslayout.GestureRecognizers.Add(PanGesture); Menu(); }
public void BringToFront(LocationsPlanViewModel obj) { foreach (SchemeBaseView lv in Views) { if (lv.Model.IsSelected) { abslayout.RaiseChild(lv); } } }
private async void HorizontalListView_SelectedItemChanged(object sender, System.EventArgs e) { if (sender is ConnectionViewModel) { ConnectionViewModel selected = (ConnectionViewModel)sender; model.Select(selected); LocationsPlanViewModel lpvm = new LocationsPlanViewModel(Navigation); LocationsSchemePage lsp = new LocationsSchemePage(lpvm); await Navigation.PushAsync(lsp); } }
public LocationsSchemePage(LocationsPlanViewModel model) : base(model) { Model = model; InitializeComponent(); abslayout.GestureRecognizers.Add(TapGesture); abslayout.GestureRecognizers.Add(PanGesture); MessagingCenter.Subscribe <LocationsPlanViewModel>(this, "Rebuild", Rebuild); MessagingCenter.Subscribe <LocationsPlanViewModel>(this, "Reshape", Reshape); }
private void Rebuild(LocationsPlanViewModel lmv) { abslayout.Children.Clear(); SelectedViews.Clear(); Views.Clear(); foreach (LocationViewModel lvm1 in Model.LocationViewModels) { LocationView lv = new LocationView(lvm1); AbsoluteLayout.SetLayoutBounds(lv, new Rectangle(lvm1.ViewLeft, lvm1.ViewTop, lvm1.ViewWidth, lvm1.ViewHeight)); abslayout.Children.Add(lv); Views.Add(lv); lvm1.LoadZones(); } }
private async Task LocationsTaped() { LocationsPlanViewModel lpvm = new LocationsPlanViewModel(Navigation); LocationsSchemePage lsp = new LocationsSchemePage(lpvm); await Navigation.PushAsync(lsp); }
private void Reshape(LocationsPlanViewModel lmv) { Reshape(); }