Example #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            SignatureCollectorForm collector = new SignatureCollectorForm();

            collector.SignatureExistDelegate = CheckSignatureExist;
            collector.SaveSignatureDelegate  = SaveSignature;
            collector.ShowDialog();
        }
Example #2
0
 private void listView1_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Delete || e.KeyCode == Keys.Back)
     {
         if (listView1.SelectedItems.Count > 0)
         {
             int selIndex = listView1.SelectedItems[0].Index;
             sigRefList.RemoveAt(selIndex);
             listView1.Items.RemoveAt(selIndex);
             listView1.Refresh();
         }
     }
     else if (e.KeyCode == Keys.Enter)
     {
         if (listView1.SelectedItems.Count > 0)
         {
             SignatureReference     sigRef    = sigRefList[listView1.SelectedItems[0].Index];
             SignatureCollectorForm collector = new SignatureCollectorForm();
             collector.SignatureExistDelegate = CheckSignatureExist;
             collector.SaveSignatureDelegate  = SaveSignature;
             collector.ShowDialog(sigRef);
         }
     }
 }