예제 #1
0
        void OnFlightElementChanged(object sender, FlightElementChangedEventArgs args)
        {
            FlightElement element = (FlightElement)sender;
            NSIndexPath   path    = element.IndexPath;

            if (path == null || path.Section >= Root.Count || path.Row >= Root[path.Section].Count)
            {
                return;
            }

            if (args.DateChanged)
            {
                Root[path.Section].Remove(path.Row);
                if (Root[path.Section].Count == 0)
                {
                    Root.RemoveAt(path.Section, UITableViewRowAnimation.Fade);
                }
                InsertFlightElement(element);
            }
            else
            {
                Root.Reload(element, UITableViewRowAnimation.None);
            }
        }
예제 #2
0
        void OnFlightElementChanged(object sender, FlightElementChangedEventArgs args)
        {
            FlightElement element = (FlightElement) sender;
            NSIndexPath path = element.IndexPath;

            if (path == null || path.Section >= Root.Count || path.Row >= Root[path.Section].Count)
                return;

            if (args.DateChanged) {
                Root[path.Section].Remove (path.Row);
                if (Root[path.Section].Count == 0)
                    Root.RemoveAt (path.Section, UITableViewRowAnimation.Fade);
                InsertFlightElement (element);
            } else {
                Root.Reload (element, UITableViewRowAnimation.None);
            }
        }