Ejemplo n.º 1
0
        private void SweeperView_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
        {
            SmileEventArgs ee = new SmileEventArgs(MyResource.Qoo2);

            LEDEventArgs ex = null;

            Notify(ee);

            int x = e.RowIndex;

            int y = e.ColumnIndex;

            if (e.Button == MouseButtons.Left)
            {
                if (!getSetControl.LeftClick(x, y, new Presenter(SetGridImage)))
                {
                    ee = new SmileEventArgs(MyResource.Qoo1);

                    Notify(ee);

                }
            }
            else
                if (e.Button == MouseButtons.Right)
            {

                if (getSetControl.RightClick(x, y, new Presenter(SetFlagImage)))
                {
                    ee = new SmileEventArgs(MyResource.Qoo3);

                    Notify(ee);

                    ex = new LEDEventArgs(getSetControl.Flags.Length);

                    Notify(ex);

                    this.Enabled = this.EnableThis = false;

                    MessageBox.Show("И это победа!", "Уведомление", MessageBoxButtons.OK, MessageBoxIcon.Information);

                    return;


                }

                ex = new LEDEventArgs(getSetControl.Flags.Length);

                Notify(ex);

            }
        }
Ejemplo n.º 2
0
        private void SweeperView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            int x = e.RowIndex;

            int y = e.ColumnIndex;


            if (!getSetControl.BothClick(x, y, new Presenter(SetGridImage)))
            {
                SmileEventArgs ee = new SmileEventArgs(MyResource.Qoo1);

                Notify(ee);
            }
        }