private void pictureBox1_Click(object sender, EventArgs e) { DesignClass.BUTTON_BACKGROUND_IMG = ((PictureBox)sender).Image; this.Close(); // DesignClass.BUTTON_BACKGROUND_IMG_ADRESS = ((PictureBox)sender).Tag.ToString(); AdminMainForm.pic(this); }
/// <summary> /// Цвет кнопок деолтный /// </summary> private void buttonColor_Click(object sender, EventArgs e) { ColorDialog MyDialog = new ColorDialog(); MyDialog.Color = DesignClass.BUTTON_COLOR; MyDialog.ShowDialog(); DesignClass.BUTTON_COLOR = MyDialog.Color; AdminMainForm.pic(this); }
private void buttonFont_Click(object sender, EventArgs e) { if (fontDialog1.ShowDialog() != DialogResult.Cancel) { if (fontDialog1.Font.Size > 5 && fontDialog1.Font.Size < 38) { DesignClass.BUTTON_FONT = fontDialog1.Font; AdminMainForm.pic(this); } } }
private void button3_Click(object sender, EventArgs e) { try { DesignClass.BUTTON_BACKGROUND_IMG_ADRESS = textBox1.Text; pictureBox4.Load(textBox1.Text); } catch (Exception) { DesignClass.BUTTON_BACKGROUND_IMG_ADRESS = null; pictureBox4.Image = pictureBox1.Image; } DesignClass.BUTTON_BACKGROUND_IMG = pictureBox4.Image; AdminMainForm.pic(this); }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { if (comboBoxPicAlign.SelectedIndex == 0) { DesignClass.BUTTONIMAGE_ALLINE = System.Drawing.ContentAlignment.TopLeft; } else if (comboBoxPicAlign.SelectedIndex == 1) { DesignClass.BUTTONIMAGE_ALLINE = System.Drawing.ContentAlignment.TopCenter; } else if (comboBoxPicAlign.SelectedIndex == 2) { DesignClass.BUTTONIMAGE_ALLINE = System.Drawing.ContentAlignment.TopRight; } else if (comboBoxPicAlign.SelectedIndex == 3) { DesignClass.BUTTONIMAGE_ALLINE = System.Drawing.ContentAlignment.MiddleLeft; } else if (comboBoxPicAlign.SelectedIndex == 4) { DesignClass.BUTTONIMAGE_ALLINE = System.Drawing.ContentAlignment.MiddleCenter; } else if (comboBoxPicAlign.SelectedIndex == 5) { DesignClass.BUTTONIMAGE_ALLINE = System.Drawing.ContentAlignment.MiddleRight; } else if (comboBoxPicAlign.SelectedIndex == 6) { DesignClass.BUTTONIMAGE_ALLINE = System.Drawing.ContentAlignment.BottomLeft; } else if (comboBoxPicAlign.SelectedIndex == 7) { DesignClass.BUTTONIMAGE_ALLINE = System.Drawing.ContentAlignment.BottomCenter; } else if (comboBoxPicAlign.SelectedIndex == 8) { DesignClass.BUTTONIMAGE_ALLINE = System.Drawing.ContentAlignment.BottomRight; } AdminMainForm.pic(this); }
private void Form2_Load(object sender, EventArgs e) { bool ASSA = false; pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; pictureBox2.SizeMode = PictureBoxSizeMode.StretchImage; pictureBox3.SizeMode = PictureBoxSizeMode.StretchImage; AdminMainForm.pic(this); flatStyleComboBox.Text = (DesignClass.FLAT_OF_BUTTON).ToString(); comboBoxPicAlign.Text = (DesignClass.BUTTONIMAGE_ALLINE).ToString(); if (ASSA) { this.BackColor = Color.FromArgb(123, 234, 121); this.TransparencyKey = Color.FromArgb(123, 234, 121); } else { this.BackColor = new Color(); this.TransparencyKey = new Color(); } }
private void flatStyleComboBox_SelectedIndexChanged(object sender, EventArgs e) { switch (flatStyleComboBox.Text) { case "System": DesignClass.FLAT_OF_BUTTON = FlatStyle.System; break; case "Standard": DesignClass.FLAT_OF_BUTTON = FlatStyle.Standard; break; case "Popup": DesignClass.FLAT_OF_BUTTON = FlatStyle.Popup; break; case "Flat": DesignClass.FLAT_OF_BUTTON = FlatStyle.Flat; break; } AdminMainForm.pic(this); }