public My_Kabinet() { InitializeComponent(); System.Drawing.Drawing2D.GraphicsPath oz = Terochka.BuildTransparencyPath(pictureBox10); pictureBox10.Region = new Region(oz); }
private void Skins_Load(object sender, EventArgs e) { saloLabel.Text = "салоcoin : " + MagazinForm.money.ToString(); InitializeComponent(); int x = 0; DirectoryInfo dir = new DirectoryInfo(Path.GetDirectoryName(Application.ExecutablePath) + "\\Terochki"); foreach (FileInfo fl in dir.GetFiles()) { if (fl.Extension == ".png") { PictureBox pb = new PictureBox(); pb.Location = new Point(x, 100); pb.Image = Image.FromFile(Path.GetDirectoryName(Application.ExecutablePath) + "\\Terochki\\" + fl.Name); pb.Size = new Size(200, 200); pb.SizeMode = PictureBoxSizeMode.StretchImage; pb.Click += new System.EventHandler(pictureBox3_Click); this.Controls.Add(pb); System.Drawing.Drawing2D.GraphicsPath blueTerkaOblast = Terochka.BuildTransparencyPath(pb); pb.Region = new Region(blueTerkaOblast); x = x + 200; } } System.Drawing.Drawing2D.GraphicsPath gp = Terochka.BuildTransparencyPath(pictureBox1); pictureBox1.Region = new Region(gp); }
private void Тёрочка_Click(object sender, EventArgs e) { Terochka mv = new Terochka(); mv.ShowDialog(); saloLabel.Text = "салоcoin : " + MagazinForm.money.ToString(); }
public ykea() { InitializeComponent(); //vse_tovary.Clear(); int x = 0; DirectoryInfo dir = new DirectoryInfo(Path.GetDirectoryName(Application.ExecutablePath) + "\\mebel\\"); foreach (FileInfo fl in dir.GetFiles()) { if (fl.Extension == ".png") { PictureBox pb = new PictureBox(); pb.Image = Image.FromFile(Path.GetDirectoryName(Application.ExecutablePath) + "\\mebel\\" + fl.Name); int width = pb.Image.Width; int height = pb.Image.Height; string[] split = fl.Name.Split(new Char[] { '_', '.' }); pb.Size = new Size(width, height); pb.Tag = split[1]; pb.AccessibleDescription = split[2]; pb.AccessibleName = split[3]; pb.Location = new Point(x, 300 - height); pb.Name = fl.Name; pb.SizeMode = PictureBoxSizeMode.StretchImage; pb.Click += new System.EventHandler(pictureBox3_Click); vse_mebel.Add(pb); /*if (vse_tovary.Count <= 4) * { * productsPanel1.Controls.Add(pb); * } * else if (vse_tovary.Count <= 8) * { * productsPanel2.Controls.Add(pb); * } * else if (vse_tovary.Count <= 16) * { * productsPanel3.Controls.Add(pb); * }*/ this.Controls.Add(pb); x = x + width; /*if (vse_tovary.Count % 4 == 0) * { * x = x - 560; * }*/ } } System.Drawing.Drawing2D.GraphicsPath oz = Terochka.BuildTransparencyPath(pictureBox10); pictureBox10.Region = new Region(oz); }
public ykea() { InitializeComponent(); //vse_tovary.Clear(); int x = 0; DirectoryInfo dir = new DirectoryInfo(Path.GetDirectoryName(Application.ExecutablePath) + "\\mebel\\"); foreach (FileInfo fl in dir.GetFiles()) { if (fl.Extension == ".jpg") { PictureBox pb = new PictureBox(); pb.Location = new Point(x, 100); pb.Image = Image.FromFile(Path.GetDirectoryName(Application.ExecutablePath) + "\\mebel\\" + fl.Name); pb.Size = new Size(150, 100); pb.Tag = fl.Name; pb.SizeMode = PictureBoxSizeMode.StretchImage; pb.Click += new System.EventHandler(pictureBox3_Click); vse_mebel.Add(pb); /*if (vse_tovary.Count <= 4) * { * productsPanel1.Controls.Add(pb); * } * else if (vse_tovary.Count <= 8) * { * productsPanel2.Controls.Add(pb); * } * else if (vse_tovary.Count <= 16) * { * productsPanel3.Controls.Add(pb); * }*/ this.Controls.Add(pb); x = x + 140; /*if (vse_tovary.Count % 4 == 0) * { * x = x - 560; * }*/ } } System.Drawing.Drawing2D.GraphicsPath oz = Terochka.BuildTransparencyPath(pictureBox10); pictureBox10.Region = new Region(oz); }
public MagazinForm() { InitializeComponent(); vse_tovary.Clear(); int x = 0; DirectoryInfo dir = new DirectoryInfo(Path.GetDirectoryName(Application.ExecutablePath) + "\\arhiv.zip"); foreach (FileInfo fl in dir.GetFiles()) { if (fl.Extension == ".png") { PictureBox pb = new PictureBox(); pb.Location = new Point(x, 0); pb.Image = Image.FromFile(Path.GetDirectoryName(Application.ExecutablePath) + "\\arhiv.zip\\" + fl.Name); pb.Size = new Size(150, 200); pb.SizeMode = PictureBoxSizeMode.StretchImage; pb.Click += new System.EventHandler(pictureBox3_Click); vse_tovary.Add(pb); if (vse_tovary.Count <= 4) { productsPanel1.Controls.Add(pb); } else if (vse_tovary.Count <= 8) { productsPanel2.Controls.Add(pb); } else if (vse_tovary.Count <= 16) { productsPanel3.Controls.Add(pb); } x = x + 140; if (vse_tovary.Count % 4 == 0) { x = x - 560; } } } System.Drawing.Drawing2D.GraphicsPath oz = Terochka.BuildTransparencyPath(pictureBox10); pictureBox10.Region = new Region(oz); }
private void My_Kabinet_Load(object sender, EventArgs e) { Controls.Clear(); Controls.Add(saloLabel); Controls.Add(button1); Controls.Add(pictureBox10); saloLabel.Text = "салоcoin : " + MagazinForm.money.ToString(); int x = 0; foreach (PictureBox pb in ykea.kypi_mebel) { int LocationX = Convert.ToInt32(pb.AccessibleDescription.ToString()); int LocationY = Convert.ToInt32(pb.AccessibleName.ToString()); pb.Location = new Point(LocationX, LocationY); System.Drawing.Drawing2D.GraphicsPath gey = Terochka.BuildTransparencyPath(pb); pb.Region = new Region(gey); Controls.Add(pb); x = x + pb.Size.Width; } }
private void Ya_Terochka_Load(object sender, EventArgs e) { saloLabel.Text = "салоcoin : " + MagazinForm.money.ToString(); System.Drawing.Drawing2D.GraphicsPath gp2 = Terochka.BuildTransparencyPath(pictureBox1); pictureBox1.Region = new Region(gp2); }