示例#1
0
        public List <Activity> Activity(PageParameters?pageParameters = null, SortingParameters?sortingParameters = null)
        {
            Action <RestRequest> prepareRequest = (RestRequest request) => {
                AddPagingParameters(pageParameters, request);
                AddSortingParameters(sortingParameters, request);
            };

            return(CallEndpoint <List <Activity> > ("activity", prepareRequest));
        }
示例#2
0
        public List <Branding> Branding(PageParameters?pageParameters = null, SortingParameters?sortingParameters = null)
        {
            Action <RestRequest> prepareRequest = (RestRequest request) => {
                AddPagingParameters(pageParameters, request);
                AddSortingParameters(sortingParameters, request);
            };

            return(CallEndpoint <List <Branding> > ("brandings", prepareRequest));
        }
示例#3
0
        public List <Payment> Payments(PageParameters?pageParameters = null, SortingParameters?sortingParameters = null)
        {
            Action <RestRequest> prepareRequest = (RestRequest request) => {
                AddPagingParameters(pageParameters, request);
                AddSortingParameters(sortingParameters, request);
            };

            return(CallEndpoint <List <Payment> > ("payments", prepareRequest));
        }
 protected void AddPagingParameters(PageParameters?pageParameters, RestRequest request)
 {
     if (pageParameters == null)
     {
         return;
     }
     request.AddParameter("page", pageParameters.Value.Page);
     request.AddParameter("page_size", pageParameters.Value.PageSize);
 }
示例#5
0
        void anim_CurrentTimeInvalidated(object sender, EventArgs e)
        {
            PageParameters?parameters = ComputePage(this, CornerPoint, origin);

            _cornerPoint = CornerPoint;
            if (parameters != null)
            {
                ApplyParameters(parameters.Value);
            }
        }
示例#6
0
        private void CornerPointRefreshed()
        {
            PageParameters?parameters = ComputePage(this, CornerPoint, origin);

            _cornerPoint = CornerPoint;
            if (parameters != null)
            {
                ApplyParameters(parameters.Value);
            }
        }
示例#7
0
        void anim_CurrentTimeInvalidated(object sender, EventArgs e)
        {
            //Application.Current.MainWindow.Title += "I";
            PageParameters?parameters = ComputePage(this, CornerPoint, origin);

            _cornerPoint = CornerPoint;
            if (parameters != null)
            {
                ApplyParameters(parameters.Value);
            }
        }
示例#8
0
        public void MoveGrabPoint(UIElement source, Point p)
        {
            if ((Status == PageStatus.DropAnimation) || (Status == PageStatus.TurnAnimation) ||
                (Status == PageStatus.None))
            {
                return;
            }

            PageParameters?parameters = ComputePage(source, p, origin);

            _cornerPoint = p;
            if (parameters != null)
            {
                ApplyParameters(parameters.Value);
            }
        }
示例#9
0
        private void OnMouseMove(object sender, MouseEventArgs args)
        {
            UIElement source = sender as UIElement;
            Point     p      = args.GetPosition(source);

            DropPage(ComputeAnimationDuration(source, p, origin));
            if ((Status == PageStatus.DropAnimation) || (Status == PageStatus.TurnAnimation))
            {
                return;
            }

            //Application.Current.MainWindow.Title += "M";



            if (!(sender as UIElement).IsMouseCaptured)
            {
                CornerOrigin?tmp = GetCorner(source, p);

                if (tmp.HasValue)
                {
                    origin = tmp.Value;
                }
                else
                {
                    //if (Status == PageStatus.DraggingWithoutCapture)
                    //{
                    DropPage(ComputeAnimationDuration(source, p, origin));
                    //}
                    return;
                }
                Status = PageStatus.DraggingWithoutCapture;
            }

            PageParameters?parameters = ComputePage(source, p, origin);

            _cornerPoint = p;
            if (parameters != null)
            {
                ApplyParameters(parameters.Value);
            }
        }
        public List <AclResource> AclResources(AccountType accountType = AccountType.Any, PageParameters?pageParameters = null)
        {
            Action <RestRequest> prepareRequest = (RestRequest request) => {
                AddPagingParameters(pageParameters, request);
                if (accountType != AccountType.Any)
                {
                    request.AddParameter("account_type", accountType.GetName());
                }
            };

            return(CallEndpoint <List <AclResource> > ("acl-resources", prepareRequest));
        }