Exemple #1
0
        private void lstItems_SelectionChanged(object sender,
                                               NavigationListControl.NavigationEventArgs e)
        {
            var meta = e.Item as MetaListItemInfo;

            if (meta == null)
            {
                return;
            }

            if (!Network.CheckNetwork())
            {
                return;
            }

            if (meta.IsDir)
            {
                NavigateTo(meta.Path);
                return;
            }

            progBusy.IsBusy = true;

            var client = DropBoxUtils
                         .Create(_token, _secret);

            var url = client.GetUrl(meta.Path);

            client.GetFileAsync(meta.Path,
                                x => OnFileDownloaded(x.RawBytes, url,
                                                      meta.Title, meta.Modified),
                                OnFileDownloadFailed);
        }
        public DropBoxAuth()
        {
            InitializeComponent();

            _indicator = AddIndicator();
            _client    = DropBoxUtils.Create();
        }
Exemple #3
0
        private static DropNetClient CreateClient(string userInfo)
        {
            var parts = userInfo.Split(':');

            return(DropBoxUtils.Create(
                       parts[0], parts[1]));
        }
Exemple #4
0
        private void RefreshList()
        {
            progBusy.IsBusy       = true;
            _cmdRefresh.IsEnabled = false;

            var client = DropBoxUtils.Create(
                _token, _secret);

            client.GetMetaDataAsync(_path,
                                    OnListComplete, OnListFailed);
        }