示例#1
0
        private void getCategoriesFromServiceCallback(RequestResult result)
        {
            CategoryList catList = new CategoryList();
            if (result.StatusCode == 200)
            {
                foreach (UniValue value in result["contents"])
                {
                    String folderName = value["path"].ToString().Replace("/", "");

                    if ((Boolean)value["is_dir"] == true && !catList.isInserted(folderName))
                    {
                        Category c = new Category();
                        c.name = folderName;
                        c.owner_id = Easyshare.Classes.Owner.SessionOwnerId;
                        c.sync = true;
                        c.insert();
                        this.getFilesFromService(c);
                    }
                    
                }
                /*
                String userName = result["display_name"].ToString();
                String userEmail = result["email"].ToString();
                this.Dispatcher.Invoke((Action)(() =>
                {
                    this.user_email_text.Text = userEmail;
                    RegisterEventHandler(this.registerButton, null);
                }));
                */
                // show a list of files 

            }
        }