/// <summary>
 /// If Checked, Alerter will monitor the table if buttons will appear => Player has options
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void AlertCheckBox_CheckedChanged(object sender, EventArgs e)
 {
     if (this.Checked)
     {
         TableHandler.alerter[TableHandle] = true;
         Console.WriteLine(String.Format("Scanning: {0}", WinAPI.GetWindowTitle((int)TableHandle)));
     }
     else
     {
         TableHandler.alerter[TableHandle] = false;
         Console.WriteLine(String.Format("Stopped: {0}", WinAPI.GetWindowTitle((int)TableHandle)));
     }
 }
        /// <summary>
        /// Attach ScanButton to Emulator instances
        /// </summary>
        public void attachScanControls()
        {
            updateSession(); // check for new emulator instances
            foreach (IntPtr emulator in emulatorList)
            {
                if (scanButtonList == null)
                {
                    scanButtonList = new Dictionary <IntPtr, ScanButton>();
                }

                // check if ScanButton for this emulator is already getting tracked
                if (scanButtonList.ContainsKey(emulator))
                {
                    continue;
                }
                //else Console.WriteLine("new emulator found");     // Debug

                // Check & Set Emulator Window Size
                checkEmulatorSize(emulator);

                // Init ScanButton with all necessary components (ComboBox for chosing tablesize, custom context menu, etc)
                ScanButton    scanButton         = new ScanButton();
                ScanComboBox  scanButtonComboBox = new ScanComboBox();
                AlertCheckBox box = new AlertCheckBox();
                ScanButtonContextMenuStrip scanButtonCMS = new ScanButtonContextMenuStrip();

                scanButton.ContextMenuStrip = scanButtonCMS;
                scanButton.scanComboBox     = scanButtonComboBox;
                scanButton.checkBox         = box;
                scanButton.TableName        = WinAPI.GetWindowTitle((int)emulator);
                scanButton.Click           += ControlButton_Click;

                scanButton.SetParent(emulator);
                scanButtonComboBox.SetParent(emulator);
                box.SetParent(emulator);

                // Add Emulator/Button to tracking
                scanButtonList[emulator] = scanButton;
            }
        }