public void AddBehideDesign(Bitmap bm) { if (bm != null && Style.ishavebehide) { if (AddBehidepic == null) { AddBehidepic = new DesignView(bm); AddBehidepic.Location = new Point(0, 0); AddBehidepic.Size = new Size(50, 50); AddBehidepic.BackgroundImageLayout = ImageLayout.Stretch; AddBehidepic.setmainHeight(this.Height); AddBehidepic.setmainWidth(this.Width); Stylepic.Controls.Add(AddBehidepic); AddBehidepic.BackgroundImage = bm; if (!IsBehide) { AddBehidepic.Visible = false; } } else { AddBehidepic.BackgroundImage = bm; } } else { //TODO } }
public void AddBehideDesign(string FileName) { if (File.Exists(FileName) && Style.ishavebehide) { if (AddBehidepic == null) { AddBehidepic = new DesignView(Image.FromFile(FileName)); AddBehidepic.Location = new Point(0, 0); AddBehidepic.Size = new Size(50, 50); AddBehidepic.BackgroundImageLayout = ImageLayout.Stretch; AddBehidepic.setmainHeight(this.Height); AddBehidepic.setmainWidth(this.Width); Stylepic.Controls.Add(AddBehidepic); AddBehidepic.BackgroundImage = Image.FromFile(FileName); if (!IsBehide) { AddBehidepic.Visible = false; } } else { AddBehidepic.BackgroundImage = Image.FromFile(FileName); } } else { //TODO } }
public void RemoveBehideDesign() { if (AddBehidepic != null) { this.Controls.Remove(AddBehidepic); AddBehidepic.Dispose(); AddBehidepic = null; } }
public void RemoveFrontDesign() { if (AddFrontpic != null) { this.Controls.Remove(AddFrontpic); AddFrontpic.Dispose(); AddFrontpic = null; } }