日期:2014-05-17  浏览次数:20798 次

为什么会出现“系统找不到指定文件”
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Cinch;
using System.Windows.Forms;
using System.Windows.Threading;

namespace PIC
{
    public  class VM:ViewModelBase
    {
         /// <summary>
        /// 路径
        /// </summary>
        public string FolderPath { get; private set; }
        //public IList<string> imageList{get;set;}
        public string ImagePath { get; set; }
        private int index = 0;
        //private string path = System.Environment.CurrentDirectory;
        DispatcherTimer timer = new DispatcherTimer();
        /// <summary>
        /// 图片文件名
        /// </summary>
        public IList<string> ImageFileList { get; private set; }

        public SimpleCommand ChangeFolderCommand { get; private set; }
        public SimpleCommand PreviousImageCommand { get; private set; }
        public SimpleCommand NextImageCommand { get; private set; }
        public SimpleCommand ClockWiseCommand { get; private set; }
        public SimpleCommand CounterClockWiseCommand { get; private set; }
        public SimpleCommand StartSlideShowCommand { get; private set; }
        public SimpleCommand StopSlideShowCommand { get; private set; }
        public SimpleCommand DeleteImageCommand { get; private set; }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="folderPath"></param>
        public VM(string folderPath)
        {
            this.ImageFileList = new List<string>();
            ChangeFolderPath(folderPath);
            
            this.ChangeFolderCommand = new SimpleCommand