public FileObject DeepCopy() { FileObject fileObject = (FileObject)MemberwiseClone(); fileObject.FileName = string.Copy(FileName); fileObject.FilePath = string.Copy(FilePath); fileObject.FileFullPath = string.Copy(FileFullPath); fileObject.FileExtension = string.Copy(FileExtension); fileObject.BackupFileName = string.Copy(BackupFileName); fileObject.BackupFilePath = string.Copy(BackupFilePath); fileObject.BackupFileFullPath = string.Copy(BackupFileFullPath); fileObject.BackupFileExtension = string.Copy(BackupFileExtension); fileObject.FileSize = FileSize; fileObject.ModifyTime = string.Copy(ModifyTime); fileObject.CreateTime = string.Copy(CreateTime); return(fileObject); }
/// <summary> /// 선택항목 아래로 버튼 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnSelDown_Click(object sender, EventArgs e) { try { int nCurSelIndex = listView.SelectedItems[0].Index; if (nCurSelIndex != listView.Items.Count - 1) { FileObject prevObject = mFileList[nCurSelIndex + 1].Clone(); mFileList[nCurSelIndex + 1] = mFileList[nCurSelIndex].Clone(); mFileList[nCurSelIndex] = prevObject.Clone(); RefreshList(); listView.Items[nCurSelIndex + 1].Selected = true; listView.Focus(); listView.Items[nCurSelIndex + 1].EnsureVisible(); } } catch (Exception) { } }