/// <summary>
 /// Constructor
 /// </summary>
 public FaceDetectionSettings(EnumMode mode = EnumMode.Online)
 {
     if (mode == EnumMode.Online)
     {
         this.scale = 1.3;
         this.minNeighbors = 5;
         this.minSize = new Size(10, 10);
     }
     else
     {
         this.scale = 1.1;
         this.minNeighbors = 5;
         this.minSize = new Size(5, 5);
     }
 }
 public CRC16(EnumMode mode)
 {
     ushort polynomial = (ushort)mode;
     ushort value;
     ushort temp;
     for (ushort i = 0; i < table.Length; ++i)
     {
         value = 0;
         temp = i;
         for (byte j = 0; j < 8; ++j)
         {
             if (((value ^ temp) & 0x0001) != 0)
             {
                 value = (ushort)((value >> 1) ^ polynomial);
             }
             else
             {
                 value >>= 1;
             }
             temp >>= 1;
         }
         table[i] = value;
     }
 }
 public FormFaceDetectionSettings(EnumMode mode = EnumMode.Online)
 {
     InitializeComponent();
     this.faceDetectionSettings = new FaceDetectionSettings(mode);
     propertyGridFacedetectionSettings.SelectedObject = this.faceDetectionSettings;
 }