Example #1
0
        private void Dr_OnRectDoubleClick(DragableRectangle sender)
        {
            var newId = FrmSetBoundingClassId.Execute(sender.ClassId);

            if (newId != -1)
            {
                sender.ClassId = newId;
            }
        }
 public static int Execute(int classId)
 {
     using (var frm = new FrmSetBoundingClassId())
     {
         frm.cmbClassesName.SelectedIndex = classId;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             return(frm.cmbClassesName.SelectedIndex);
         }
         else
         {
             return(-1);
         }
     }
 }