/// <summary> /// 이름 추가 버튼 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnNameAddFront_Click(object sender, EventArgs e) { using (NameForm nameForm = new NameForm()) { nameForm.SetFormType(Global.FormType.AddName); nameForm.Owner = this; DialogResult result = nameForm.ShowDialog(); if (result == DialogResult.OK) { if (!string.IsNullOrEmpty(mStrDlgReturn)) { // mStrDlgReturn 데이터 스플릿 // [0] = 문자열을 넣을 위치 // [1] = 넣을 문자열 string[] strToken = mStrDlgReturn.Split(','); if (strToken.Length == 2) { if (strToken[0].CompareTo("0") == 0) // 앞에 추가 { foreach (FileObject file in mFileList) { file.FileName = strToken[1] + file.FileName; } } else // 뒤에 추가 { foreach (FileObject file in mFileList) { file.FileName = file.FileName + strToken[1]; } } } RefreshList(); } mStrDlgReturn = string.Empty; } } }
/// <summary> /// 확장자 변경 버튼 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnChangeExtension_Click(object sender, EventArgs e) { using (NameForm nameForm = new NameForm()) { nameForm.SetFormType(Global.FormType.ChangeExtension); nameForm.Owner = this; DialogResult result = nameForm.ShowDialog(); if (result == DialogResult.OK) { if (!string.IsNullOrEmpty(mStrDlgReturn)) { foreach (FileObject file in mFileList) { file.FileExtension = mStrDlgReturn; } RefreshList(); } mStrDlgReturn = string.Empty; } } }