단축키 입력 관련 오류 수정 및 요청사항 수정

반출 오류 수정 (에디터 분리 건으로 인함)
This commit is contained in:
2026-01-30 23:52:14 +09:00
parent 87dbe17ec9
commit cfe68509f6
6 changed files with 248 additions and 46 deletions

View File

@@ -17,18 +17,12 @@ namespace UniMarc
public string call = ""; public string call = "";
Marc mac; Marc mac;
Marc_Plan_Sub_MarcEdit me; Marc_Plan_Sub_MarcEdit me;
Marc2 mae;
MarcEditorControl mec; MarcEditorControl mec;
public Helper008(MarcEditorControl _mae) public Helper008(MarcEditorControl _mae)
{ {
InitializeComponent(); InitializeComponent();
mec = _mae; mec = _mae;
} }
public Helper008(Marc2 _mae)
{
InitializeComponent();
mae = _mae;
}
public Helper008(Marc _mac) public Helper008(Marc _mac)
{ {
InitializeComponent(); InitializeComponent();

View File

@@ -425,6 +425,10 @@ namespace UniMarc
if (m != null) if (m != null)
m.SelectMarc_Sub(MarcFormRowIndex, GridData); m.SelectMarc_Sub(MarcFormRowIndex, GridData);
if(m2 != null)
m2.SelectMarc_Sub(MarcFormRowIndex, GridData);
if (am != null) if (am != null)
{ {
string Marc = richTextBox1.Text; string Marc = richTextBox1.Text;

View File

@@ -1145,15 +1145,26 @@ namespace UniMarc
{ {
TextBox tb = sender as TextBox; TextBox tb = sender as TextBox;
if (e.Alt && e.KeyCode >= Keys.A && e.KeyCode <= Keys.Z)
{
var letter = e.KeyCode.ToString().ToLower();
tb.InvokeInsertText("▽" + letter);
e.SuppressKeyPress = true;
return;
}
if (e.KeyCode == Keys.F3) if (e.KeyCode == Keys.F3)
{ {
tb.InvokeInsertText(""); tb.InvokeInsertText(";");
}
else if(e.KeyCode == Keys.OemSemicolon)
{
tb.InvokeInsertText("▽");
e.SuppressKeyPress = true;
} }
else if (e.KeyCode == Keys.F4) else if (e.KeyCode == Keys.F4)
{ {
tb.InvokeInsertText(""); tb.InvokeInsertText("");
} }
} }

View File

@@ -14,19 +14,13 @@ namespace UniMarc
{ {
Marc marc; Marc marc;
AddMarc am; AddMarc am;
Marc2 mae;
MarcEditorControl mae2; MarcEditorControl mae2;
AddMarc2 am2;
public Marc_memo(MarcEditorControl _mae) public Marc_memo(MarcEditorControl _mae)
{ {
InitializeComponent(); InitializeComponent();
mae2 = _mae; mae2 = _mae;
} }
public Marc_memo(Marc2 _mae)
{
InitializeComponent();
mae = _mae;
}
public Marc_memo(Marc _marc) public Marc_memo(Marc _marc)
{ {
InitializeComponent(); InitializeComponent();
@@ -37,11 +31,7 @@ namespace UniMarc
InitializeComponent(); InitializeComponent();
am = _am; am = _am;
} }
public Marc_memo(AddMarc2 _am)
{
InitializeComponent();
am2 = _am;
}
private void Marc_memo_Load(object sender, EventArgs e) private void Marc_memo_Load(object sender, EventArgs e)
{ {
string[] com_List = string[] com_List =
@@ -78,6 +68,8 @@ namespace UniMarc
if (marc != null) if (marc != null)
marc.richTextBox1.Text = result.Replace("↔", ""); marc.richTextBox1.Text = result.Replace("↔", "");
else if(mae2 != null)
mae2.richTextBox1.Text = result.Replace("↔", "");
else if (am != null) else if (am != null)
am.richTextBox1.Text = result.Replace("↔", ""); am.richTextBox1.Text = result.Replace("↔", "");
} }

View File

@@ -1,4 +1,5 @@
using AR; using AR;
using Org.BouncyCastle.Pkcs;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -17,11 +18,11 @@ namespace UniMarc
Marc marc; Marc marc;
CD_LP cp; CD_LP cp;
Helper_DB db = new Helper_DB(); Helper_DB db = new Helper_DB();
Marc2 mae; Marc2 marc2;
public Marc_mkList(Marc2 _mae) public Marc_mkList(Marc2 _mae)
{ {
InitializeComponent(); InitializeComponent();
mae = _mae; marc2 = _mae;
} }
public Marc_mkList(Marc _marc) public Marc_mkList(Marc _marc)
@@ -188,7 +189,7 @@ namespace UniMarc
private void btn_mkList_Click(object sender, EventArgs e) private void btn_mkList_Click(object sender, EventArgs e)
{ {
String_Text st = new String_Text();
if (tb_listName.Text == "") if (tb_listName.Text == "")
{ {
UTIL.MsgE("목록명을 입력해주세요!"); UTIL.MsgE("목록명을 입력해주세요!");
@@ -199,7 +200,195 @@ namespace UniMarc
UTIL.MsgE("차수가 비어있습니다."); UTIL.MsgE("차수가 비어있습니다.");
return; return;
} }
if((this.marc.List_Book?.RowCount ?? 0) <1 )
if (marc != null)
ExportOld();
else if (marc2 != null)
ExportNew();
}
void ExportNew()
{
String_Text st = new String_Text();
var marccnt1 = marc2?.List_Book.RowCount ?? 0;
if (marccnt1 < 1)
{
UTIL.MsgE("마크데이터 목록이 존재하지 않습니다");
return;
}
string listName = tb_listName.Text;
string Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
string outnum = tb_outnum.Text + "차";
string user = PUB.user.UserName;// Properties.Settings.Default.User;
var marc = this.marc2;
bool isAuthor = false;
bool isBook = false;
if (cb_FirstAuthor.SelectedIndex == 0)
isAuthor = true;
if (cb_FirstBook.SelectedIndex == 0)
isBook = true;
bool[] isType = { isAuthor, isBook };
// 시방서 목록 DB에 들어갈 것들.
string[] insert_list_col = {
"compidx", "work_list", "date", "state", "gu",
"first_Author", "symbol_Author","symbol_AuthorE", "book_Author", "divType", "divNum",
"etc", "user"
};
string[] insert_list_data = {
PUB.user.CompanyIdx, listName, Time, "진행", cb_listType.Text,
cb_FirstAuthor.Text, cb_authorTypeK.Text, cb_authorTypeE.Text, cb_FirstBook.Text, cb_divType.Text, cb_divNum.Text,
rtb_etc.Text, user
};
string cmdByList = db.DB_INSERT("Specs_List", insert_list_col, insert_list_data);
// 시방서 마크 DB에 들어갈 것들.
string[] insert_marc_col = {
"compidx", "work_list", "date", "ISBN", "book_name",
"s_book_name1", "s_book_num1", "author", "book_comp", "pubdate",
"price", "tag008", "class_symbol", "author_symbol", "marc",
"imageURL", "count", "num", "out_num", "midx",
"editDate", "user"
};
string[] insert_marc_data = {
PUB.user.CompanyIdx, listName, Time, "", "",
"", "", "", "", "",
"", "", "", "", "",
"", "", "", "", "",
Time, user
}; // 마크에서 추출 ( 3 ~ 12 )
int[] row = checkGridRow();
int num = 0;
progressBar1.Maximum = row.Length + 1;
string cmdByMarc = string.Format("INSERT INTO {0} {1} value", "Specs_Marc", db.DB_INSERT_SUB("", insert_marc_col));
bool CountSplit = chk_countSplit.Checked;
int listCount = 1;
int addCount = 1;
// 필터링하여 DB에 집어넣는 작업
for (int a = 0; a < row.Length; a++)
{
if (marc.List_Book.Rows[row[a]].Cells["db_marc"].Value.ToString() == "")
continue;
num += 1;
listCount = Convert.ToInt32(marc.List_Book.Rows[row[a]].Cells["count"].Value.ToString());
// ISBN, book_name, s_book_name1, s_book_num1, author, book_comp, pubdate, price, tag008, class_symbol
string[] Search = { "020a", "245a", "440a", "440v", "245d", "260b", "260c", "950b", "008", "056a" };
insert_marc_data[14] = marc.List_Book.Rows[row[a]].Cells["db_marc"].Value.ToString();
insert_marc_data[15] = marc.List_Book.Rows[row[a]].Cells["url"].Value.ToString();
insert_marc_data[16] = addCount.ToString();
if (rb_basicNum.Checked)
insert_marc_data[17] = marc.List_Book.Rows[row[a]].Cells["num"].Value.ToString();
else
insert_marc_data[17] = num.ToString();
insert_marc_data[18] = outnum;
insert_marc_data[19] = marc.List_Book.Rows[row[a]].Cells["marc_idx"].Value.ToString();
insert_marc_data[20] = marc.List_Book.Rows[row[a]].Cells["SaveDate"].Value.ToString();
insert_marc_data[21] = marc.List_Book.Rows[row[a]].Cells["user"].Value.ToString();
string[] Marc = st.Take_Tag(insert_marc_data[14], Search);
string[] Author = { "", Marc[1] }; // 저자, 도서명
// 100, 110, 111태그중 한개라도 있으면 저자로 인식.
string[] Author_Search = { "100a", "110a", "111a", "245d" };
string[] Author_res = st.Take_Tag(insert_marc_data[14], Author_Search);
if (Author_res[0].Length > 1) Author[0] = Author_res[0];
if (Author_res[1].Length > 1) Author[0] = Author_res[1];
if (Author_res[2].Length > 1) Author[0] = Author_res[2];
if (chk_CompSymbol.Checked)
if (Author_res[3].IndexOf("[외]") > -1)
Author[0] = Marc[5];
string tmp_ViewMarc = st.ConvertMarcType(insert_marc_data[14], out string errmessage);
// 마크에서 추출한 데이터 DB에 적용하기 위한 반복문
for (int b = 0; b < Marc.Length; b++)
{
insert_marc_data[b + 3] = Marc[b];
// 분류기호 설정값적용대로 가져오기.
if (b == 9)
{
string class_symbol = st.TakeTag_ConditionContent(tmp_ViewMarc, "056a", "056" + cb_divNum.Text);
if (class_symbol != "")
insert_marc_data[b + 3] = class_symbol;
}
}
// 22.10.24 740태그 삭제
tmp_ViewMarc = st.RemoveTagNumber(tmp_ViewMarc, "740");
// 마크 분류기호 설정값대로 적용
tmp_ViewMarc = st.RemoveTagNumber(tmp_ViewMarc, "056");
tmp_ViewMarc = st.AddTagInMarc(string.Format("056\t \t▼a{0}▼2{1}▲", insert_marc_data[12], cb_divNum.Text), tmp_ViewMarc);
insert_marc_data[14] = st.made_Ori_marc(tmp_ViewMarc);
if (Author[0].Length < 1)
{
MessageBox.Show(row[a] + "번째의 저자를 확인해주세요. \n (100a, 110a, 111a 중 1개 필수)");
return;
}
Author[0] = Regex.Replace(Author[0], @"[^a-zA-Z0-9가-힣_]", "", RegexOptions.Singleline);
Author[1] = st.RemoveWordInBracket(Author[1]);
Author[1] = Regex.Replace(Author[1], @"[^a-zA-Z0-9가-힣_]", "", RegexOptions.Singleline);
AuthorSymbol.Symbol sb = new AuthorSymbol.Symbol();
string authorTypeK = cb_authorTypeK.SelectedItem.ToString();
string authorTypeE = cb_authorTypeE.SelectedItem.ToString();
string res_Author = "";
if (chk_CompSymbol.Checked == false || cmb_author_four.Text == "출판사+서명")
res_Author = sb.SymbolAuthor(Author[0], Author[1], authorTypeK, authorTypeE, isType);
else //서명+출판사는 뒤집어서 입력한다 251110
res_Author = sb.SymbolAuthor(Author[1], Author[0], authorTypeK, authorTypeE, isType);
insert_marc_data[13] = res_Author;
cmdByMarc += db.DB_INSERT_SUB("value", insert_marc_data) + ",";
if (CountSplit && listCount > addCount)
{
a--;
addCount++;
continue;
}
else
{
addCount = 1;
progressBar1.PerformStep();
}
}
cmdByMarc = cmdByMarc.TrimEnd(',');
cmdByMarc += ";";
Helper_DB.ExcuteNonQuery(cmdByList);
Helper_DB.ExcuteNonQuery(cmdByMarc);
progressBar1.PerformStep();
if (progressBar1.Value == progressBar1.Maximum)
{
label2.Text = "완료되었습니다!";
}
}
void ExportOld()
{
String_Text st = new String_Text();
var marccnt2 = marc?.List_Book.RowCount ?? 0;
if ( marccnt2 < 1)
{ {
UTIL.MsgE("마크데이터 목록이 존재하지 않습니다"); UTIL.MsgE("마크데이터 목록이 존재하지 않습니다");
return; return;
@@ -369,18 +558,36 @@ namespace UniMarc
label2.Text = "완료되었습니다!"; label2.Text = "완료되었습니다!";
} }
} }
#region mkList_Sub #region mkList_Sub
int[] checkGridRow() int[] checkGridRow()
{ {
List<int> GridRow = new List<int>(); List<int> GridRow = new List<int>();
for (int a = 0; a < marc.List_Book.Rows.Count; a++)
{
bool isSuccess = true;
if (!marc.Check_BackColor(a) && marc.Check_List_V(a))
isSuccess = false;
if (isSuccess) if(marc != null)
GridRow.Add(a); {
for (int a = 0; a < marc.List_Book.Rows.Count; a++)
{
bool isSuccess = true;
if (!marc.Check_BackColor(a) && marc.Check_List_V(a))
isSuccess = false;
if (isSuccess)
GridRow.Add(a);
}
}
else if(marc2 != null)
{
for (int a = 0; a < marc2.List_Book.Rows.Count; a++)
{
bool isSuccess = true;
if (!marc2.Check_BackColor(a) && marc2.Check_List_V(a))
isSuccess = false;
if (isSuccess)
GridRow.Add(a);
}
} }
int[] Result = GridRow.ToArray(); int[] Result = GridRow.ToArray();
@@ -395,7 +602,7 @@ namespace UniMarc
private void chk_CompSymbol_CheckedChanged(object sender, EventArgs e) private void chk_CompSymbol_CheckedChanged(object sender, EventArgs e)
{ {
cmb_author_four.Enabled = chk_CompSymbol.Checked; cmb_author_four.Enabled = chk_CompSymbol.Checked;
} }
} }
} }

View File

@@ -18,10 +18,9 @@ namespace UniMarc
string find = ""; string find = "";
string change = ""; string change = "";
String_Text st = new String_Text(); String_Text st = new String_Text();
AddMarc am; AddMarc2 am2; AddMarc am;
Marc mac; Marc mac;
Marc_memo mmm; Marc_memo mmm;
Marc2 mae;
MarcEditorControl mec; MarcEditorControl mec;
public findNchange(MarcEditorControl _mac) public findNchange(MarcEditorControl _mac)
{ {
@@ -29,17 +28,6 @@ namespace UniMarc
mec = _mac; mec = _mac;
} }
public findNchange(Marc2 _mae)
{
InitializeComponent();
mae = _mae;
}
public findNchange(AddMarc2 _am)
{
InitializeComponent();
am2 = _am;
}
public findNchange(AddMarc _am) public findNchange(AddMarc _am)
{ {
InitializeComponent(); InitializeComponent();
@@ -82,6 +70,11 @@ namespace UniMarc
st.Color_change("▼", mac.richTextBox1); st.Color_change("▼", mac.richTextBox1);
st.Color_change("▲", mac.richTextBox1); st.Color_change("▲", mac.richTextBox1);
} }
if (mec != null)
{
st.Color_change("▼", mec.richTextBox1);
st.Color_change("▲", mec.richTextBox1);
}
if (am != null) { if (am != null) {
st.Color_change("▼", am.richTextBox1); st.Color_change("▼", am.richTextBox1);
st.Color_change("▲", am.richTextBox1); st.Color_change("▲", am.richTextBox1);
@@ -98,6 +91,7 @@ namespace UniMarc
public void textChange(string ftext, string ctext) public void textChange(string ftext, string ctext)
{ {
if (mac != null) mac.richTextBox1.Text = mac.richTextBox1.Text.Replace(ftext, ctext); if (mac != null) mac.richTextBox1.Text = mac.richTextBox1.Text.Replace(ftext, ctext);
if (mec != null) mec.richTextBox1.Text = mec.richTextBox1.Text.Replace(ftext, ctext);
if (mmm != null) mmm.richTextBox1.Text = mmm.richTextBox1.Text.Replace(ftext, ctext); if (mmm != null) mmm.richTextBox1.Text = mmm.richTextBox1.Text.Replace(ftext, ctext);
if (am != null) am.richTextBox1.Text = am.richTextBox1.Text.Replace(ftext, ctext); if (am != null) am.richTextBox1.Text = am.richTextBox1.Text.Replace(ftext, ctext);