public ImageViewerViewModel(long userOrGroupId, bool isGroup, string aid, int photosCount, int date, List <Photo> photos, ViewerMode mode) { this._aid = aid; this._userOrGroupId = userOrGroupId; this._isGroup = isGroup; this._mode = mode; this._photosCount = photosCount; if (photos != null) { this.ReadPhotos(photos); } this._date = date; }
public ImageViewerViewModel(long userOrGroupId, bool isGroup, List <Photo> photos, bool canLoadMorePhotos, long albumId = 0) { this._canLoadMoreProfileListPhotos = canLoadMorePhotos; this._mode = ViewerMode.ProfilePhotosList; this._userOrGroupId = userOrGroupId; this._photosCount = -1; this._isGroup = isGroup; this._albumId = albumId; if (photos == null || photos.Count <= 0) { return; } this.ReadPhotos(photos); }
public ImageViewerViewModel(string aid, AlbumType albumType, long userOrGroupId, bool isGroup, int photosCount, List <Photo> photos) { this._aid = aid; this._userOrGroupId = userOrGroupId; this._isGroup = isGroup; this._albumType = albumType; this._photosCount = photosCount <= 0 ? -1 : photosCount; this._mode = ViewerMode.AlbumPhotos; if (photos == null || photos.Count <= 0) { return; } this.ReadPhotos(photos); }
public static void ShowPhotosById(int photosCount, int initialOffset, int selectedPhotoIndex, List <long> photoIds, List <long> ownerIds, List <string> accessKeys, List <Photo> photos, bool fromDialog = false, bool friendsOnly = false, Func <int, Image> getImageByIdFunc = null, PageBase page = null, bool hideActions = false) { ViewerMode mode = ViewerMode.PhotosByIds; ImageViewerViewModel ivvm = new ImageViewerViewModel(photosCount, initialOffset, photoIds, ownerIds, accessKeys, photos, mode); ImageViewerDecoratorUC decoratorForCurrentPage = ImageViewerDecoratorUC.GetDecoratorForCurrentPage(page); decoratorForCurrentPage.InitWith(ivvm, getImageByIdFunc, null, null, null); decoratorForCurrentPage._fromDialog = fromDialog; decoratorForCurrentPage._friendsOnly = friendsOnly; decoratorForCurrentPage._hideActions = hideActions; if (hideActions) { decoratorForCurrentPage.gridBottom.Visibility = Visibility.Collapsed; } decoratorForCurrentPage.Show(selectedPhotoIndex); }
public ImageViewerViewModel(int photosCount, int initialOffset, List <long> photoIds, List <long> ownerIds, List <string> accessKeys, List <Photo> photos, ViewerMode mode) { this._mode = mode; this._photosCount = photosCount; this._accessKeys = accessKeys; this._ownerIds = ownerIds; this._initialOffset = initialOffset; if (photos != null && photos.Count > 0) { this.ReadPhotos(photos); } else { this.LoadPhotosByIds(photoIds); } }
public static void ShowPhotosFromFeed(long userOrGroupId, bool isGroup, string aid, int photosCount, int selectedPhotoIndex, int date, List <Photo> photos, string mode, Func <int, Image> getImageByIdFunc) { ViewerMode mode1 = (ViewerMode)Enum.Parse(typeof(ViewerMode), mode); ImageViewerViewModel ivvm = new ImageViewerViewModel(userOrGroupId, isGroup, aid, photosCount, date, photos, mode1); ImageViewerDecoratorUC dec = ImageViewerDecoratorUC.GetDecoratorForCurrentPage(null); dec.InitWith(ivvm, getImageByIdFunc, null, null, null); ivvm.LoadPhotosFromFeed((Action <bool>)(res => { if (!res) { return; } Execute.ExecuteOnUIThread((Action)(() => dec.HandlePhotoUpdate(ivvm))); })); dec.Show(selectedPhotoIndex); }
public ImageViewerViewModel(List <PhotoOrDocument> photosOrDocuments) { this._mode = ViewerMode.PhotosByIds; this._photosCount = photosOrDocuments.Count; this.ReadPhotosOrDocuments(photosOrDocuments); }
public TreeViewer(IntPtr handle, ViewerMode mode = ViewerMode.RawView) { RootElement = AutomationElement.FromHandle(handle); Mode = mode; }
public TreeViewer(AutomationElement element, ViewerMode mode = ViewerMode.RawView) { RootElement = element; Mode = mode; }
public Application(Process process, ViewerMode mode = ViewerMode.RawView) { CurrentWindow = new Window(AutomationElement.FromHandle(process.MainWindowHandle)); Viewer = new TreeViewer(AutomationElement.FromHandle(process.MainWindowHandle), mode); }
public Application(string name, ViewerMode mode = ViewerMode.RawView) { CurrentWindow = new TreeViewer(AutomationElement.RootElement).FindByName <Window>(name); Viewer = new TreeViewer(AutomationElement.FromHandle((IntPtr)CurrentWindow.WindowHandle), mode); }