Exemplo n.º 1
0
        async void view_upload(DBNodeVM obj)
        {
            if (obj.stateOfChildren == DBChildState.Queryable)
                await QueryChildren(obj);

            var res = await view.GetFile();
            if (!res.success) return;

            Progger pr = new Progger(view.CreateProgress());
            bool dlSuccess = await pr.Run(model.Upload(res.path, obj.GetModel(), pr));
        }
Exemplo n.º 2
0
        async void view_download(DBNodeVM obj)
        {
            var res = await view.GetPath();
            if(!res.success) return;

            Progger pr = new Progger(view.CreateProgress());
            bool dlSuccess = await pr.Run(model.Download(obj.GetModel(), res.path, pr));
        }
Exemplo n.º 3
0
 // it's ok to have an async void on an event handler, so I hear.
 async void view_delete(DBNodeVM obj)
 {
     Progger pr = new Progger(view.CreateProgress());
     bool suc = await pr.Run(model.Delete(obj.GetModel(), pr));
 }