Example #1
0
        private void Start()
        {
            //开始镜像前,检测剩余空间
            long freeValue = _driverInfo.GetTargetDriverFreeSpace(TargetPosition.DirPath);

            if (freeValue <= SourcePosition.CurrentSelectedDisk.SelectedTotalSize * 1.1)
            {
                _msgBox.ShowErrorMsg(string.Format("目录{0}所在的磁盘空间不足以存放镜像后的数据", TargetPosition.DirPath));
                return;
            }
            //开始镜像
            if (SourcePosition.CurrentSelectedDisk.Items != null)
            {
                ProgressPosition.TotalSize = SourcePosition.CurrentSelectedDisk.SelectedTotalSize;
                ProgressPosition.Start();
            }
            SourcePosition.Start(TargetPosition.DirPath);
            SourcePosition.IsMirroring = true;
        }