} // end of initDashboard()

        public async void AddItem()
        {
            bool status = false;

            Debug.WriteLine("Adding new item");
            // request service to add new dashpost
            if (currPage.Equals("TestPage1"))
            {
                var lost = await NewDashpostDialog("New Lost Pet Dashpost");

                if (lost != null)
                {
                    status = await cloud_service.AddFeed(DashboardType.LOST, lost);
                }
            }
            else if (currPage.Equals("TestPage2"))
            {
                var found = await NewDashpostDialog("New Lost Pet Dashpost");

                if (found != null)
                {
                    status = await cloud_service.AddFeed(DashboardType.FOUND, found);
                }
            }

            // re-init dashboard after new item added
            if (status)
            {
                initDashboard(currPage);
            }
        }
Пример #2
0
 public async Task <bool> AddFeed(DashboardType type, Dashpost post)
 {
     return(await cs.AddFeed(type, post));
 }