Exemple #1
0
 //dataGridView handler
 private void dataGridView_IM_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e)
 {
     // remove corresponding item in the list
     IMList.RemoveAt(e.RowIndex);
     // save the modification
     LEDConfig.saveIMList(IMList);
 }
Exemple #2
0
        private void inputButton_Click(object sender, EventArgs e)
        {
            try
            {
                // message input method, including add and modify.
                inputIM();
                // save modification made
                LEDConfig.saveIMList(IMList);
            }
            catch (FormatException ex)
            {
                MessageBox.Show(ex.Message);
            }

            // clear dataGridView selection
            dataGridView_IM.ClearSelection();
            // reset input button to "Add" since all selection are cleared
            inputButton.Text = "Add";
        }