public CreatePattern()
        {
            InitializeComponent();
            Associator = new AutoAssociator(PatternGrid.Pattern.Children.Count);

            // As this holds the original AutoAssociator, it should be kept alive so more training can be done
            KeepAlive = true;

            TrainButton.Click   += TrainButton_Click;
            ToQueryButton.Click += ToQueryButton_Click;
        }
 public QueryPattern(AutoAssociator associator) : this()
 {
     Associator = associator;
 }