Sysnet.TouchScreen/AppCode/ViewMode/FileToMergeViewModel.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GalaSoft.MvvmLight;

namespace Sysnet.TouchScreen
{
    /// <summary>
    /// A view model for the files to merge
    /// </summary>
    public class FileToMergeViewModel : ViewModelBase
    {
        public enum PagesIntervalEnum
        {
            AllPages,
            Interval
        }

        static System.Text.RegularExpressions.Regex _intervalRegex = new System.Text.RegularExpressions.Regex(
                @"^[0-9]+((-?,?[0-9]+)*)$"); /* Checks for a valid pages interval:
                                              *     1. Start with a number 
                                              *     2. Can have 0 or more combination
                                              *        of "-" or "," characters, followed by a number
                                              */


        string _fileName;
        string _uri;
        PagesIntervalEnum _pagesInterval;
        string _interval;
        bool _isValidInterval;


        public FileToMergeViewModel(string path)
        {
            this.PdfDocument = new PDFDocument(path);

            this.FullName = path;
            this.PagesInterval = PagesIntervalEnum.AllPages;
        }

        public PDFDocument PdfDocument { get; private set; }

        public string FileName
        {
            get
            {
                return this._fileName;
            }
            private set
            {
                this._fileName = value;
                RaisePropertyChanged("FileName");
            }
        }

        public string FullName
        {
后面还有 130 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。