Ejemplo n.º 1
0
        public My_Kabinet()
        {
            InitializeComponent();

            System.Drawing.Drawing2D.GraphicsPath oz = Terochka.BuildTransparencyPath(pictureBox10);
            pictureBox10.Region = new Region(oz);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        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;
            }
        }
Ejemplo n.º 7
0
 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);
 }