static public void RefreshPicture(ElementView view, PictureBox picture, int id_height, int id_width, object additionalArgument = null) { if (Puzzle.Instance.EditMode) { picture.Image = view.ChooseImage_EditMode(id_height, id_width, additionalArgument).Value; } else { picture.Image = view.ChooseImage(id_height, id_width, additionalArgument).Value; } }
static public PictureBox Show(ElementView view, int id_height, int id_width, int loc_height, int loc_width, object additionalArgument = null) { PictureBox picture = new PictureBox(); picture.Name = view.typeName + " " + id_height + " " + id_width + " " + additionalArgument; picture.Size = view.ChooseSize(additionalArgument); picture.SizeMode = PictureBoxSizeMode.StretchImage; if (Puzzle.Instance.EditMode) { picture.Image = view.ChooseImage_EditMode(id_height, id_width, additionalArgument).Value; } else { picture.Image = view.ChooseImage(id_height, id_width, additionalArgument).Value; } picture.MouseClick += PuzzleController.Instance.Handler; picture.Location = new System.Drawing.Point(loc_width, loc_height); return(picture); }