Ejemplo n.º 1
0
        private Document GetThing(string address)
        {
            var getThingReq = data.Get("projects/sipp-1f4c4/databases/(default)/documents/data/step/things/" + address);

            try
            {
                Document doc = getThingReq.Execute();
                if (doc == null)
                {
                    MessageBox.Show("Can't find device");
                    return(null);
                }

                return(doc);
            }
            catch (Google.GoogleApiException e)
            {
                Dispatcher.BeginInvoke(new Action(() =>
                {
                    LoadingCover.Visibility = Visibility.Hidden;
                    CoverText.Visibility    = Visibility.Hidden;
                }));

                MessageBox.Show(e.ToString());
                return(null);
            }
        }