Пример #1
0
 protected override void Dispose(bool disposing)
 {
     tag = null;
     tlc = null;
     //backpush = null;
     extractButton.Dispose ();
     ExtractPressed = null;
     ancestor = null;
     base.Dispose (disposing);
 }
Пример #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();
            RectangleF frame;

            Background back = new Background ();
            View.AddSubview (back.View);
            View.SendSubviewToBack (back.View);

            if (UserInterfaceIdiomIsPhone) {
                frame = new RectangleF (10, 110, UIScreen.MainScreen.Bounds.Width - 20, 125);
            } else {
                frame = new RectangleF (10, 450, UIScreen.MainScreen.Bounds.Width - 20, 125);
            }
            tlc = new TagListController (tag, frame);
            this.Add (tlc.View);
            backOne = new UIBarButtonItem (backarrow.MakeBackArrow (), UIBarButtonItemStyle.Plain, null);

            backAll = new UIBarButtonItem (Xmark.MakeImage (), UIBarButtonItemStyle.Plain, null);

            backOne.Clicked += (object sender, EventArgs e) => {
                if(ancestor != null){
                    ancestor.ReleaseLock();
                }
                this.NavigationController.PopViewControllerAnimated (true);
            };
            backAll.Clicked += (object sender, EventArgs e) => {
                if(ancestor != null){
                    ancestor.ReleaseLock();
                }
                this.NavigationController.PopToRootViewController (true);
            };

            UIBarButtonItem[] leftbuttons = { backOne, backAll };

            this.NavigationItem.SetLeftBarButtonItems (leftbuttons, true);

            this.ShowDetails (tag);
            CreateMenuOptions ();

            //			CreateSlideDownMenu ();

            //			UIButton backbutton = new UIButton(new RectangleF(10,25,48,32));
            //			backbutton.SetImage (backarrow.MakeBackArrow(), UIControlState.Normal);
            //			backbutton.TouchUpInside += (object sender, EventArgs e) => {
            //				var handler = this.backpush;
            //				if (handler != null) {
            //					handler (this, new BackClickedEventArgs ());
            //				}
            //				DismissViewControllerAsync (true);
            //			};
            //			Add (backbutton);
        }
Пример #3
0
        void AddTagList()
        {
            RectangleF frame;
            if (UserInterfaceIdiomIsPhone) {
                frame = new RectangleF (10, 170, View.Bounds.Width -20, 125);
            } else {
                frame = new RectangleF (10, 300, View.Bounds.Width -20, 125);
            }

            Console.WriteLine ("frame:" + frame);
            tag = AppDelegate.dao.GetImageTagById (this.currentItem.ImageTagId);
            if (tag == null) {
                Console.WriteLine ("Tag er null");
                tag = new ImageTag ();
                int key = AppDelegate.dao.SaveTag (tag);
                tag.ID = key;
                Console.WriteLine ("key:" + key);
                this.currentItem.ImageTagId = key;
                AppDelegate.dao.SaveItem (this.currentItem);
            }

            tlc = new TagListController (tag, frame);
            this.View.AddSubview (tlc.View);
        }
Пример #4
0
 protected override void Dispose(bool disposing)
 {
     //			OutputImage.Dispose ();
     //			Pc.Dispose ();
     ItemSaved = null;
     ItemDeleted = null;
     InContainerTouched = null;
     InLocationTouched = null;
     currentItem = null;
     ancestor = null;
     ipc = null;
     ass = null;
     tlc = null;
     tag = null;
     base.Dispose (disposing);
 }
Пример #5
0
        void AddTagList()
        {
            RectangleF frame;
            ImageTag tag = null;

            if (UserInterfaceIdiomIsPhone) {
                frame = new RectangleF (10, 180, View.Bounds.Width -20, 125);
            } else {
                frame = new RectangleF (10, 190, View.Bounds.Width -20, 125);
            }

            //			Console.WriteLine("frame:"+frame);
            if (MyCurrentObject != null) {
                tag = AppDelegate.dao.GetImageTagById (this.MyCurrentObject.ImageTagId);
            }
            if (tag == null) {
                Console.WriteLine ("Tag er null");
                tag = new ImageTag ();
                int key = AppDelegate.dao.SaveTag (tag);
                tag.ID = key;
                if (MyCurrentObject != null) {
                    this.MyCurrentObject.ImageTagId = key;
                    AppDelegate.dao.SaveLagerObject (MyCurrentObject);
                }
            }

            tlc = new TagListController (tag, frame);
            View.AddSubview (tlc.View);
            tlc.entertag.EditingDidBegin += (object sender, EventArgs e) => tlc.entertag.Placeholder = "";
        }
Пример #6
0
        void AddTagList()
        {
            RectangleF frame;

            if (UserInterfaceIdiomIsPhone) {
                frame = new RectangleF (10, 185, UIScreen.MainScreen.Bounds.Width -20, 125);
            } else {
                frame = new RectangleF (10, 200, UIScreen.MainScreen.Bounds.Width -20, 125);
            }

            Console.WriteLine("frame:"+frame);
            ImageTag tag = AppDelegate.dao.GetImageTagById (this.boks.ImageTagId);
            if (tag == null) {
                Console.WriteLine ("Tag er null");
                tag = new ImageTag ();
                int key = AppDelegate.dao.SaveTag (tag);
                tag.ID = key;
                Console.WriteLine ("key:" + key);
                this.boks.ImageTagId = key;
                AppDelegate.dao.SaveLagerObject (boks);
            }

            tlc = new TagListController (tag, frame);
            this.Add (tlc.View);
        }