Beispiel #1
0
        public BigItemMasterView()
            : base()
        {
            masterView = new BigItemsScreen();
            detailview = new BigItemDetailScreen();

            masterView.ActivateDetail += (object sender, BigItemDetailClickedEventArgs e) => detailview.ShowDetails (e.lagerobject);

            detailview.BigItemSaved += (object sender, BigItemSavedEventArgs e) => masterView.Refresh ();

            //			detailview.Derezzy += (object sender, DerezLargeObjectEventArgs e) => {
            //                detailnav.PopViewControllerAnimated(true);
            //                masterView.Refresh();
            //            };

            detailview.GotPicture += (object sender, GotPictureEventArgs e) => masterView.Refresh ();

            masternav = new UINavigationController();
            masternav.PushViewController(masterView, false);

            detailnav = new UINavigationController();
            detailnav.PushViewController(detailview, false);

            //always last
            ViewControllers = new UIViewController[] {masternav, detailnav};
        }
Beispiel #2
0
 public virtual void ShowBigItemDetails(LagerObject item)
 {
     //			if(UserInterfaceIdiomIsPhone){
         BigItemDetailScreen neo = new BigItemDetailScreen (item);
         this.NavigationController.PushViewController (neo, true);
         //this.NavigationController.PushViewController(neo, true);
     //			}else{
     //				RaiseLagerObjectClicked(item);
     //			}
 }
Beispiel #3
0
        void HandleResult(ZXing.Result result){

            if (result != null)
            {
                var msg = "NO barcode!";
                msg = "barcode: " + result.Text + "was not in your database";
//                LagerDAO dao = new LagerDAO();
                int id = -1;
                try{
                    id = Convert.ToInt32(result.Text);
                }catch(Exception e){
                    Console.WriteLine(e.Message);
                }
				IList<LagerObject> lol = null;
                if(id != -1){
					lol = new List<LagerObject> ();
					lol.Add(AppDelegate.dao.GetLagerObjectByID(id));
                }

                if (lol != null)
                {
                    if (lol.Count == 0)
                    {
                        var title = "no barcode";
                        var alert = new UIAlertView(title, msg, null, "cancel", null);
                        alert.Show();
                    }
                    else
                    {
                        LagerObject lo = lol[0];
                        if (lo.isContainer == "true")
                        {
							var cd = new no.dctapps.commons.events.screens.ContainerDetails(lo);
							parent.PresentViewControllerAsync(cd, true);
                        }
                        else if (lo.isLargeObject == "true")
                        {
                            BigItemDetailScreen bs = new BigItemDetailScreen(lo);
							parent.PresentViewControllerAsync(bs, true);
                       
                        }
                        else
                        {
                            var alert = new UIAlertView("No such object", msg, null, "cancel", null);
                            alert.Show();
                        }
                    }
                }
            }
        }
Beispiel #4
0
        void ExtractLarge()
        {
            LagerObject lo = new LagerObject ();

            String recomb = Recombine ();
            lo.Name = recomb;
            lo.Description = recomb;

            lo.ImageTagId = tag.ID;
            string[] res = ExtractTagImages (tag);
            lo.thumbFileName = res [1];
            lo.imageFileName = res [0];
            lo.isContainer = "false";
            lo.isLargeObject = "true";
            BigItemDetailScreen bids = new BigItemDetailScreen (lo);
            this.NavigationController.PushViewController (bids, true);
        }
Beispiel #5
0
            public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
            {
                IndexerDictionaryItem word = words [indexPath.Row];
                if (word.type == "GalleryObject") {
                    GalleryObject go = AppDelegate.dao.GetGalleryObjectByID (word.id);
                    if (go != null) {
                        EditImageModeController ec = new EditImageModeController (go);
                        ancestor.NavigationController.PushViewController (ec, true);
                    }
                }
                if (word.type == "Item") {
                    IList<Item> items = AppDelegate.dao.GetItemById (word.id);
                    if (items.Count > 0) {
                        Item it = items [0];
                        if (it != null) {
                            ItemDetailScreen ic = new ItemDetailScreen (it);
                            ancestor.NavigationController.PushViewController (ic, true);
                        }
                    }
                }
                if (word.type == "Container") {
                    LagerObject lo = AppDelegate.dao.GetLagerObjectByID (word.id);
                        if (lo != null) {
                            ContainerDetails cd = new ContainerDetails (lo);
                            ancestor.NavigationController.PushViewController (cd, true);
                    }
                }

                if (word.type == "LargeObject") {
                    LagerObject lo = AppDelegate.dao.GetLagerObjectByID (word.id);
                    if (lo != null) {
                        BigItemDetailScreen bids = new BigItemDetailScreen (lo);
                        ancestor.NavigationController.PushViewController (bids, true);
                    }
                }

                tableView.DeselectRow (indexPath, true);
            }