/* * //Sharpbox 1.1 and older * public void ConnectCloud(string username, string password) * { * DropBoxCredentials creds = new DropBoxCredentials(); * creds.ConsumerSecret = APP_SECRET; * creds.ConsumerKey = APP_KEY; * creds.UserName = username; * creds.Password = password; * * m_dropBox.BeginOpenRequest(LoginCallback, mCloudConfig, creds); * } */ public void ConnectCloud() { LoadingFileList = true; m_files.Clear(); CurrentItem = new CloudItem() { Name = "no files" }; m_files.Add(CurrentItem); if (token != null) { m_dropBox.BeginOpenRequest(LoginCallback, mCloudConfig, token); } }
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { CloudHandler ch = Application.Current.Resources["CloudHandler"] as CloudHandler; if (ch != null) { ListBox lb = sender as ListBox; if (lb != null) { if (lb.SelectedIndex > -1) { CloudItem ci = lb.SelectedItem as CloudItem; if (ci != null) { ch.CurrentItem = ci; lb.SelectedIndex = -1; NavigationService.Navigate(new Uri("/ImagePage.xaml", UriKind.RelativeOrAbsolute)); } } } } }