public static void Show(Action <bool> callback, bool selectedValue)
        {
            var control = new CheckerOperatorSelectView2(selectedValue);
            var dialog  = new DialogView(control);

            dialog.ShowUnderCursor = true;
            control.Selected      += (result) => {
                callback?.Invoke(result);
                dialog.Close();
            };
            dialog.Show();
        }
        public CheckerOperatorView()
        {
            InitializeComponent();

            btSelectOperator1.Click += (o, e) => {
                CheckerOperatorSelectView.Show(
                    (orSelected) => {
                    if (orSelected)
                    {
                        if (_operatorPair.Operator == LogicalOperator.And)
                        {
                            _operatorPair.Operator = LogicalOperator.Or;
                        }
                        else if (_operatorPair.Operator == LogicalOperator.AndNot)
                        {
                            _operatorPair.Operator = LogicalOperator.OrNot;
                        }
                    }
                    else
                    {
                        if (_operatorPair.Operator == LogicalOperator.Or)
                        {
                            _operatorPair.Operator = LogicalOperator.And;
                        }
                        else if (_operatorPair.Operator == LogicalOperator.OrNot)
                        {
                            _operatorPair.Operator = LogicalOperator.AndNot;
                        }
                    }
                    Refresh();
                    Modified?.Invoke(this);
                },
                    _operatorPair.Operator == LogicalOperator.Or || _operatorPair.Operator == LogicalOperator.OrNot);
            };

            btSelectOperator2.Click += (o, e) => {
                CheckerOperatorSelectView2.Show(
                    (notSelected) => {
                    if (notSelected)
                    {
                        if (_operatorPair.Operator == LogicalOperator.And)
                        {
                            _operatorPair.Operator = LogicalOperator.AndNot;
                        }
                        else if (_operatorPair.Operator == LogicalOperator.Or)
                        {
                            _operatorPair.Operator = LogicalOperator.OrNot;
                        }
                    }
                    else
                    {
                        if (_operatorPair.Operator == LogicalOperator.AndNot)
                        {
                            _operatorPair.Operator = LogicalOperator.And;
                        }
                        else if (_operatorPair.Operator == LogicalOperator.OrNot)
                        {
                            _operatorPair.Operator = LogicalOperator.Or;
                        }
                    }
                    Refresh();
                    Modified?.Invoke(this);
                },
                    _operatorPair.Operator == LogicalOperator.AndNot || _operatorPair.Operator == LogicalOperator.OrNot);
            };
        }