Example #1
0
        private void SearchNextName(object sender, EventArgs e)
        {
            bool res;

            if (Options.DesignAlternative)
            {
                res = LandTilesAlternative.SearchName(textBoxItemName.Text, true);
            }
            else
            {
                res = LandTiles.SearchName(textBoxItemName.Text, true);
            }
            if (!res)
            {
                DialogResult result = MessageBox.Show(
                    "No landtile found",
                    "Result",
                    MessageBoxButtons.OKCancel,
                    MessageBoxIcon.Error,
                    MessageBoxDefaultButton.Button2);
                if (result == DialogResult.Cancel)
                {
                    Close();
                }
            }
        }
 public LandTilesAlternative()
 {
     InitializeComponent();
     SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint, true);
     pictureBox.MouseWheel += new MouseEventHandler(OnMouseWheel);
     refMarker = this;
 }
Example #3
0
        private void SearchGraphic(object sender, EventArgs e)
        {
            int graphic;

            if (Utils.ConvertStringToInt(textBoxGraphic.Text, out graphic, 0, 0x3FFF))
            {
                bool res;
                if (Options.DesignAlternative)
                {
                    res = LandTilesAlternative.SearchGraphic(graphic);
                }
                else
                {
                    res = LandTiles.SearchGraphic(graphic);
                }
                if (!res)
                {
                    DialogResult result = MessageBox.Show(
                        "No landtile found",
                        "Result",
                        MessageBoxButtons.OKCancel,
                        MessageBoxIcon.Error,
                        MessageBoxDefaultButton.Button2);
                    if (result == DialogResult.Cancel)
                    {
                        Close();
                    }
                }
            }
        }