Ejemplo n.º 1
0
        // 추가 : 여기선 정보에 맞게 추가할 수 있어야함.
        // 받을 정보는 명령이 내려지는 시간(시작을 0기준), 명령타입, 좌표값
        // 추가를 누르면 밑 리스트에 한줄 추가되어야함.
        private void Macro_Addmacro_Click(object sender, EventArgs e)
        {
            AddandEdit addandedit = new AddandEdit();

            if (addandedit.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                String[]     _rowdata = { addandedit.Time, addandedit.Instruction, addandedit.KeyorCoordinate };
                ListViewItem _row     = new ListViewItem(_rowdata);

                Macro_Macrodata.Items.Add(_row);
            }
        }
Ejemplo n.º 2
0
 // 편집
 // 체크된것을 위와 같은 체크박스에서 수정해야됨
 private void Macro_Editmacro_Click(object sender, EventArgs e)
 {
     foreach (ListViewItem item in Macro_Macrodata.CheckedItems)
     {
         AddandEdit addandedit = new AddandEdit();
         addandedit.edittxt(Macro_Macrodata.Items[item.Index].SubItems[0].Text, Macro_Macrodata.Items[item.Index].SubItems[1].Text, Macro_Macrodata.Items[item.Index].SubItems[2].Text);
         if (addandedit.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             Macro_Macrodata.Items[item.Index].SubItems[0].Text = addandedit.Time;
             Macro_Macrodata.Items[item.Index].SubItems[1].Text = addandedit.Instruction;
             Macro_Macrodata.Items[item.Index].SubItems[2].Text = addandedit.KeyorCoordinate;
         }
     }
 }