public MainViewModel(PhotoStationClient photoStationClient, INavigationService navigationService, ISettingsHelper settingsHelper) { this.photoClient = photoStationClient; this.navigationService = navigationService; this.settingsHelper = settingsHelper; GoToSettingsCommand = new RelayCommand(HandleGoToSettingsCommand); }
public ImageModel(string url, PhotoItem photoItem, PhotoStationClient client) { Url = url; Client = client; var info = photoItem.info; Width = !info.rotated ? info.resolutionx : info.resolutiony; Height = !info.rotated ? photoItem.info.resolutiony : info.resolutionx; }
public SettingsViewModel(INavigationService navigationService, PhotoStationClient photoStationClient, ISettingsHelper settingsHelper) { this.navigationService = navigationService; this.photoStationClient = photoStationClient; this.settingsHelper = settingsHelper; CheckCredetialsCommand = new RelayCommand(HandleCheckCredetialsCommand); SaveSettingsCommand = new RelayCommand(HandleSaveSettingsCommand, CanExecuteSettingsCommand); CancelCommand = new RelayCommand(HandleCancelCommand); UseSmartAlbum = true; }
static async Task Main(string[] args) { Console.WriteLine("Hello World!"); var photoClient = new PhotoStationClient(); photoClient.Initialize(new DemoApiSettings()); await photoClient.LoginAsync(); var albums = await photoClient.ListSmartAlbumsAsync(); //var album = albums.data.items.First(x => x.info.name == "SamsungAlex"); var album = albums.data.smart_albums.First(x => x.name == "PhotoFrame"); //var photos = await photoClient.ListPhotosAsync(album.id); PhotoItem[] photos = null; await photoClient.ListSmartAlbumItemsAsync(album.id); var url = photoClient.GetThumbnailUrl(photos[0]); await photoClient.GetThumbnailData(url); Console.ReadKey(); }