コード例 #1
0
        public LocationsSchemePage(LocationsPlanViewModel model) : base(model)
        {
            Model = model;
            InitializeComponent();

            abslayout.GestureRecognizers.Add(TapGesture);
            abslayout.GestureRecognizers.Add(PanGesture);
            Menu();
        }
コード例 #2
0
 public void BringToFront(LocationsPlanViewModel obj)
 {
     foreach (SchemeBaseView lv in Views)
     {
         if (lv.Model.IsSelected)
         {
             abslayout.RaiseChild(lv);
         }
     }
 }
コード例 #3
0
 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);
     }
 }
コード例 #4
0
        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);
        }
コード例 #5
0
 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();
     }
 }
コード例 #6
0
 private async Task LocationsTaped()
 {
     LocationsPlanViewModel lpvm = new LocationsPlanViewModel(Navigation);
     LocationsSchemePage    lsp  = new LocationsSchemePage(lpvm);
     await Navigation.PushAsync(lsp);
 }
コード例 #7
0
 private void Reshape(LocationsPlanViewModel lmv)
 {
     Reshape();
 }