示例#1
0
        public ListOfEmployeesPage()
        {
            identifyPage = new IdentifyPage();
            adminPage    = new AdminPage();

            InitalizeViewModel(new ListOfEmployeesViewModel());
            InitializeComponent();

            EmployeesList.ItemAppearing += (object sender, ItemVisibilityEventArgs scrollArgs) =>
            {
                if (scrollArgs.Item is UserDetailModel user)
                {
                    user.PhotoSource = user.hasPhoto ? PhotoSourceType.URL : PhotoSourceType.DUMMY_LIST;
                    if (GetViewModel().IsTheLastItem(scrollArgs.Item) && !String.IsNullOrEmpty(GetViewModel().LinkToNext))
                    {
                        LoadMore();
                    }
                }
            };

            EmployeesList.ItemDisappearing += (object sender, ItemVisibilityEventArgs scrollArgs) =>
            {
                if (scrollArgs.Item is UserDetailModel user)
                {
                    user.PhotoSource = PhotoSourceType.NO_PHOTO;
                }
            };

            isFilterShowed = false;
        }
示例#2
0
        protected override void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                identifyPage = null;
            }

            disposed = true;
            base.Dispose(disposing);
        }