private void btn_ExtChng_Click(object sender, EventArgs e) { ExtChng ec = new ExtChng(); FormSpec.Init(ec); ec.mf = this; ec.StartPosition = FormStartPosition.CenterParent; ec.ShowDialog(); }
private void btn_ExtAdd_Click(object sender, EventArgs e) { ExtAdd ea = new ExtAdd(); FormSpec.Init(ea); ea.mf = this; ea.StartPosition = FormStartPosition.CenterParent; ea.ShowDialog(); }
private void btn_WriteNumber_Click(object sender, EventArgs e) { WriteNumber wn = new WriteNumber(); FormSpec.Init(wn); wn.mf = this; wn.StartPosition = FormStartPosition.CenterParent; wn.ShowDialog(); }
private void btn_NummerComma_Click(object sender, EventArgs e) { NumberComma nc = new NumberComma(); FormSpec.Init(nc); nc.mf = this; nc.StartPosition = FormStartPosition.CenterParent; nc.ShowDialog(); }
private void btn_SelfName_Click(object sender, EventArgs e) { if (Listview1.SelectedItems.Count == 1) { SelfName sn = new SelfName(); FormSpec.Init(sn); sn.mf = this; sn.StartPosition = FormStartPosition.CenterParent; sn.ShowDialog(); } }
private void btn_GroupDel_Click(object sender, EventArgs e) { try { GroupDel gd = new GroupDel(); FormSpec.Init(gd); gd.mf = this; gd.StartPosition = FormStartPosition.CenterParent; gd.ShowDialog(); } catch { } }
private void btn_PositionDel_Click(object sender, EventArgs e) { try { PositionDel pd = new PositionDel(); FormSpec.Init(pd); pd.mf = this; pd.StartPosition = FormStartPosition.CenterParent; pd.ShowDialog(); } catch { } }
private void btn_BackAdd_Click(object sender, EventArgs e) { try { BackAdd ba = new BackAdd(); FormSpec.Init(ba); ba.mf = this; ba.StartPosition = FormStartPosition.CenterParent; ba.ShowDialog(); } catch { } }
private void btn_FrontAdd_Click(object sender, EventArgs e) { try { FrontAdd fa = new FrontAdd(); FormSpec.Init(fa); fa.mf = this; fa.StartPosition = FormStartPosition.CenterParent; fa.ShowDialog(); } catch { } }
private void btn_Replace_Click(object sender, EventArgs e) { try { Replace rp = new Replace(); FormSpec.Init(rp); rp.mf = this; rp.StartPosition = FormStartPosition.CenterParent; rp.ShowDialog(); } catch { } }
private void listView1_DragDrop(object sender, DragEventArgs e) { try { string[] s = (string[])e.Data.GetData(DataFormats.FileDrop, false); //이름순으로 정렬먼저 하자. Array.Sort(s, StringComparer.OrdinalIgnoreCase); // 데이터 중복검사 for (int y = 0; y < s.Length; y++) { for (int i = 0; i < Listview1.Items.Count; i++) { string item = Listview1.Items[i].SubItems[2].Text + "\\" + Listview1.Items[i].SubItems[1].Text; if (s[y] == item) { s[y] = string.Empty; } } } mfChecked = string.Empty; //리스트뷰에 아이템 넣기 for (int i = 0; i < s.Length; i++) { string Fname = s[i].ToString(); if (s[i] != string.Empty) { FileInfo fi = new FileInfo(Fname); //파일일때 if (fi.Exists) { string[] subItems = new string[Listview1.Columns.Count]; subItems[0] = Path.GetFileName(Fname); subItems[1] = Path.GetFileName(Fname); subItems[2] = Path.GetDirectoryName(Fname); subItems[3] = Path.GetDirectoryName(Fname); ListViewItem item = new ListViewItem(subItems); Listview1.Items.Add(item); } //폴더일때 if (!fi.Exists) { //메세지 폼 띄우기 if (mfChecked == "False" || mfChecked == string.Empty) { MsgFileFolder mff = new MsgFileFolder(); FormSpec.Init(mff); mff.mf = this; mff.StartPosition = FormStartPosition.CenterParent; mff.ShowDialog(); Console.WriteLine(mfChecked); Console.WriteLine(mfReturn); } //연속대답 체크시 if (mfChecked == "True") { //폴더를 넣었는데 파일을 넣을 때 if (mfReturn == "file") { string[] files = Directory.GetFiles(Fname); foreach (string _Fname in files) { string[] subItems = new string[Listview1.Columns.Count]; subItems[0] = Path.GetFileName(_Fname); subItems[1] = Path.GetFileName(_Fname); subItems[2] = Path.GetDirectoryName(_Fname); subItems[3] = Path.GetDirectoryName(_Fname); ListViewItem item = new ListViewItem(subItems); Listview1.Items.Add(item); } } //폴더를 넣을 때 else if (mfReturn == "folder") { string[] subItems = new string[Listview1.Columns.Count]; subItems[0] = Path.GetFileName(Fname); subItems[1] = Path.GetFileName(Fname); subItems[2] = Path.GetDirectoryName(Fname); subItems[3] = Path.GetDirectoryName(Fname); ListViewItem item = new ListViewItem(subItems); Listview1.Items.Add(item); } // 취소 else { break; } } //연속대답 미체크시 else if (mfChecked == "False") { if (mfReturn == "file") { string[] files = Directory.GetFiles(Fname); foreach (string _Fname in files) { string[] subItems = new string[Listview1.Columns.Count]; subItems[0] = Path.GetFileName(_Fname); subItems[1] = Path.GetFileName(_Fname); subItems[2] = Path.GetDirectoryName(_Fname); subItems[3] = Path.GetDirectoryName(_Fname); ListViewItem item = new ListViewItem(subItems); Listview1.Items.Add(item); } } //폴더를 넣을 때 else if (mfReturn == "folder") { string[] subItems = new string[Listview1.Columns.Count]; subItems[0] = Path.GetFileName(Fname); subItems[1] = Path.GetFileName(Fname); subItems[2] = Path.GetDirectoryName(Fname); subItems[3] = Path.GetDirectoryName(Fname); ListViewItem item = new ListViewItem(subItems); Listview1.Items.Add(item); } // 취소 else { } } } } } //리스트뷰에 한줄마다 색칠하기 SetAlternatingRowColors(Listview1, Color.FromArgb(255, 255, 255), Color.FromArgb(232, 242, 255)); if (Listview1.Items.Count > 0) { btn_enable(); btn_SelfName.Enabled = false; } } catch (Exception x) { Console.WriteLine(x); } }
public Mainform() { InitializeComponent(); FormSpec.Init(this); this.ShowIcon = true; }