using Prism.Commands;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Imaging;

namespace PDF_Office.Model.PageEdit
{
    public class PageEditItem:BindableBase
    {

        private int pageNumber;
        /// <summary>
        /// 页码
        /// </summary>
        public int PageNumber
        {
            get { return pageNumber; }
            set
            {
                SetProperty(ref pageNumber, value);
            }
        }


        private string pageSize = "";
        /// <summary>
        /// 用于显示的页面尺寸
        /// </summary>
        public string PageSize
        {
            get { return pageSize; }
            set
            {
                SetProperty(ref pageSize, value);
            }
        }

        /// <summary>
        /// Size类型的页面尺寸 用于插入功能
        /// </summary>
        public Size Size { get; set; }

        private BitmapSource image;
        /// <summary>
        /// 页面缩略图
        /// </summary>
        public BitmapSource Image
        {
            get { return image; }
            set
            {
                SetProperty(ref image, value);
            }
        }

        private bool showPageSize = false;
        /// <summary>
        /// 是否显示页码尺寸
        /// </summary>
        public bool ShowPageSize
        {
            get { return showPageSize; }
            set
            {
                SetProperty(ref showPageSize, value);
            }
        }

        private bool haveBookMark = false;
        /// <summary>
        /// 该页是否有书签标记
        /// </summary>
        public bool HaveBookMark
        {
            get { return haveBookMark; }
            set
            {
                SetProperty(ref haveBookMark, value);
            }
        }

        private Visibility visible = Visibility.Visible;
        /// <summary>
        /// 是否显示
        /// </summary>
        public Visibility Visible
        {
            get { return visible; }
            set
            {
                SetProperty(ref visible, value);
            }
        }

        private bool selected = false; 
        /// <summary>
        /// 是否选中
        /// </summary>
        public bool Selected
        {
            get { return selected; }
            set
            {
                SetProperty(ref selected, value);
            }
        }


        private Size itemSize = new Size(208, 294);
        /// <summary>
        /// 控件大小
        /// 直接修改Listbox 容器的项大小，会导致间距有问题，所有采用动态绑定大小的方式来实现Item大小更新
        /// </summary>
        public Size ItemSize
        {
            get { return itemSize; }
            set
            {
                SetProperty(ref itemSize, value);
            }
        }

        /// <summary>
        /// 此次打开中是否已经获取图片，避免重复拿图
        /// </summary>
        public bool IsGetImage = false;

        /// <summary>
        /// 是否是竖直的图
        /// </summary>
        public bool isVertical = true;
    }
}
