Example #1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            ButtonDesign buttonDesign = new ButtonDesign();

            buttonDesign.ShowDialog();
            Vars.ColorAllButtons(this);
        }
Example #2
0
 private void Button9_Click(object sender, EventArgs e)
 {
     colorDialog1.Color = Vars.LABEL_COLOR;
     colorDialog1.ShowDialog();
     Vars.LABEL_COLOR = colorDialog1.Color;
     Vars.ColorAllButtons(this);
 }
Example #3
0
        private void Button6_Click(object sender, EventArgs e)
        {
            openFileDialog1.ShowDialog();
            pictureBox2.Load(openFileDialog1.FileName);
            Vars.BUTTON_IMAGE = pictureBox2.Image;

            Vars.ColorAllButtons(this);
            //fontDialog1.Color
        }
Example #4
0
 private void BunifuFlatButton9_Click(object sender, EventArgs e)
 {
     colorDialog1.Color = Vars.PANEL_COLOR;
     colorDialog1.ShowDialog();
     Vars.PANEL_COLOR = colorDialog1.Color;
     Vars.ColorAllButtons(this);
     Vars.Update("UPDATE DefaultDesign SET Value='" +
                 Vars.PANEL_COLOR.ToArgb().ToString() +
                 "' WHERE Parameter = 'Panel_Color' AND objectType='System.Windows.Forms.Panel'");
 }
Example #5
0
        private void BunifuFlatButton3_Click(object sender, EventArgs e)
        {
            openFileDialog1.ShowDialog();
            pictureBox2.Load(openFileDialog1.FileName);
            Vars.BUTTON_IMAGE = pictureBox2.Image;
            Vars.ColorAllButtons(this);

            Vars.Update("UPDATE DefaultDesign SET Value='" +
                        openFileDialog1.FileName.ToString() +
                        "' WHERE Parameter = 'Button_Image' AND objectType='System.Windows.Forms.Button'");
        }
Example #6
0
        private void BunifuFlatButton7_Click(object sender, EventArgs e)
        {
            fontDialog1.Font = Vars.BUTTON_FONT;
            fontDialog1.ShowDialog();
            Vars.BUTTON_FONT = fontDialog1.Font;
            Vars.ColorAllButtons(this);
            //fontDialog1.Color

            Vars.Update("UPDATE DefaultDesign SET Value='" +
                        Vars.BUTTON_FONT.FontFamily.Name + "," + Vars.BUTTON_FONT.Size.ToString() +
                        "' WHERE Parameter = 'Button_Font' AND objectType='System.Windows.Forms.Button'");
        }
Example #7
0
        private void Button8_Click(object sender, EventArgs e)
        {
            openFileDialog1.RestoreDirectory = false;
            DirectoryInfo di1 = new DirectoryInfo(@"..\..\images\FON");

            openFileDialog1.InitialDirectory = di1.FullName;

            if (openFileDialog1.ShowDialog() != DialogResult.Cancel)
            {
                pictureBox1.Load(openFileDialog1.FileName);
                Vars.BUTTON_BACKGROUND_IMAGE = pictureBox1.Image;
                Vars.ColorAllButtons(this);
            }
        }
Example #8
0
        public ButtonDesign()
        {
            InitializeComponent();
            Vars.ColorAllButtons(this);



            foreach (Control ctrl in Controls)
            {
                try
                {
                    //ExtremeCode Курс C# для маленьких и тупых
                    if (ctrl is Button)
                    {
                        ctrl.MouseEnter += new System.EventHandler(buttonmovedown);
                        ctrl.MouseLeave += new System.EventHandler(buttonmoveup);
                    }
                }
                catch (Exception) { }
            }
        }
Example #9
0
        private void BunifuFlatButton4_Click(object sender, EventArgs e)
        {
            openFileDialog1.RestoreDirectory = false;
            DirectoryInfo di1 = new DirectoryInfo(@"..\..\images\FON");

            openFileDialog1.InitialDirectory = di1.FullName;

            if (openFileDialog1.ShowDialog() != DialogResult.Cancel)
            {
                pictureBox1.Load(openFileDialog1.FileName);
                Vars.BUTTON_BACKGROUND_IMAGE = pictureBox1.Image;
                Vars.ColorAllButtons(this);
                Vars.Update("UPDATE DefaultDesign SET Value='" +
                            Path.GetFileName(openFileDialog1.FileName) +
                            "' WHERE Parameter = 'Button_Background_Image' AND objectType='System.Windows.Forms.Button'");
                try
                {
                    File.Copy(openFileDialog1.FileName, @"..\..\images\FON\" + Path.GetFileName(openFileDialog1.FileName));
                }
                catch (Exception) { }
            }
        }
Example #10
0
 private void Form3_Load(object sender, EventArgs e)
 {
     Vars.ColorAllButtons(this);
 }