private void Complete_Auth_Click(object sender, RoutedEventArgs e) { if (String.IsNullOrEmpty(CodeText.Text)) { ErrorLabel.Content = "Please Enter a Token Below:"; return; } try { FlickrManager f = (FlickrManager)p.Manager; f.CompleteAuth(CodeText.Text); MessageBox.Show("User authenticated!"); if (f.IsAuthenticated()) { ImageDataStore imgsDataObj = f.StorePhotosAndImageData(); //ImageAnalyzer procImages = new ImageAnalyzer(imgObjs); UserImageDisplay imageDisplay = new UserImageDisplay(imgsDataObj); imageDisplay.LoadImages(); imageDisplay.Show(); this.Close(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public ImageDataStore StorePhotosAndImageData() { List <Image> images = new List <Image>(); ImageDataStore iODObj = new ImageDataStore(); ImageColorData iCDObj = new ImageColorData(); PhotoCollection photocollection = Instance.PeopleGetPhotos(); foreach (Photo p in photocollection) { if (p.LargeUrl != null) { Image userImage = new Image(p.LargeUrl); iCDObj.GetColorData(userImage); images.Add(userImage); } } iODObj.Images = images; iODObj.imgObjColorData = iCDObj; return(iODObj); }
public options(ImageDataStore imgsData) { InitializeComponent(); this.imgsData = imgsData; }
public SortedImagesByRainbowDisplay(ImageDataStore imgs) { this.imgDataObj = imgs; InitializeComponent(); LoadImages(); }
public SortedImagesByColorDisplay(ImageDataStore imgsData) { this.imgsData = imgsData; InitializeComponent(); }
public UserImageDisplay(ImageDataStore userImagesData) { InitializeComponent(); this.userImagesData = userImagesData; }