コード例 #1
0
ファイル: EditTags.cs プロジェクト: Skalar/Indexer
 //        void Initialize ()
 //        {
 //            this.NavigationItem.SetRightBarButtonItem (new UIBarButtonItem (UIBarButtonSystemItem.Add), false);
 //            this.NavigationItem.RightBarButtonItem.Clicked += (sender, e) => ShowTagDetails (new ImageTag ());
 //        }
 //        Ic = new UIPopoverController (sl);
 //        Ic.PresentFromRect (this.btnIn.Bounds, this.View, UIPopoverArrowDirection.Up, true);
 //        UIPopoverController pc;
 void ShowTagDetails(ImageTag tag)
 {
     Console.WriteLine ("call tagdetailscreen()");
     TagDetailScreen tagdetails = new TagDetailScreen (tag);
     this.NavigationController.PushViewController (tagdetails, true);
 }
コード例 #2
0
        void EditTagFrame(UIGestureRecognizer gestureRecognizer)
        {
            Console.WriteLine ("edittagframe triggered");
            if (mylock == false) {
                Console.WriteLine ("mutex aquired");
                mylock = true;
                point = gestureRecognizer.LocationInView (this.blend);
            //			Console.WriteLine ("presspoint:" + point);
            //			PointF center = scrollView.Center;
            //			Console.WriteLine("center:"+scrollView.Center);
            //			float scale = scrollView.ZoomScale;
            //			PointF con = new PointF (scrollView.ContentOffset.X / scale, scrollView.ContentOffset.Y / scale);
            //			PointF con = new PointF (scrollView.ContentOffset.X, scrollView.ContentOffset.Y);
            //			Console.WriteLine ("con:" + con);
            //			PointF guess = new PointF (con.X + point.X, con.Y + point.Y);
            //			Console.WriteLine ("guess:" + guess);

                Rects = new List<RectangleF> ();
                Tags = AppDelegate.dao.GetTagsByGalleryObjectID (go.ID);
                for (int i = 0; i < Tags.Count; i++) {
                    TagUtility tu = new TagUtility (Tags [i]);
                    Rects.Add (tu.FetchAsRectangleF ());
                }
                for (int j = 0; j < Rects.Count; j++) {
                    if (Rects [j].Contains (point)) {
            //						if (finds.Exists (x => x.ID == Tags [j].ID)) {
            //							Console.WriteLine ("pushing:" + Tags [j]);
            //							finds.Remove (Tags [j]);
                        tds = new TagDetailScreen (Tags [j],this);

                        found = true;
            //						tds.backpush += (object sender, BackClickedEventArgs e) => {
            //							Console.WriteLine("mutex released");
            //							mylock = false;
            //						};
                        this.NavigationController.PushViewController(tds, true);
                        //this.NavigationController.PushViewController (tds, false);
                        break;
            //						} else {
            //							Console.WriteLine ("adder:" + Tags [j]);
            //							Console.WriteLine ("finds:" + finds.Count);
            //							finds.Add (Tags [j]);
            //							break;
            //						}
                    }
                }
                if (!found) {
                    Console.WriteLine ("releasing mutex");
                    mylock = false;
                }
            }
        }