Example #1
0
        public PersonContainer(Person person)
        {
            InitializeComponent();
            this.person = person;
            Color color = GlobalColorConstants.GetRandomColor(180, 236, 140, 180, 180, 236);

            if (person.Gender == "Male")
            {
                pictureBox1.Image = imageList1.Images[1];
                color             = GlobalColorConstants.GetRandomColor(120, 176, 140, 180, 200, 256);
            }
            else
            {
                pictureBox1.Image = imageList1.Images[0];
                color             = GlobalColorConstants.GetRandomColor(200, 256, 140, 180, 120, 176);
            }

            Color mainRandomColor = color;

            this.BackColor = mainRandomColor;

            label_Nickname.Text = "Nickname: \t" + person.Nickname;
            label_Name.Text     = "Name: \t" + person.Name;
            label_Surname.Text  = "Surname: \t" + person.Surname;
            label_Birthday.Text = "Birthday: \t" + person.Birthday.ToString("dd/MM/yyyy");


            contextMenuStrip1.Renderer = new ToolStripProfessionalRenderer(new MenuColorTable());
        }
Example #2
0
        private void Coloring()
        {
            contextMenuStrip1.Renderer = new ToolStripProfessionalRenderer(new MenuColorTable());

            //this.BackColor = GlobalColorConstants.sideBackgroundColor;

            Color color = GlobalColorConstants.GetShadeColor(GlobalColorConstants.GetOccasionColor(occasion[0], 0), 50);

            this.BackColor = color;
            color          = GlobalColorConstants.GetShadeColor(GlobalColorConstants.GetOccasionColor(occasion[0], 0), -125);
            this.ForeColor = color;
        }
        private void Coloring()
        {
            this.BackColor = GlobalColorConstants.GetRandomColor(180, 200, 200, 256, 200, 256);

            textBox_Name.BackColor  = GlobalColorConstants.sideTextBoxInnerColor;
            textBox_Info1.BackColor = GlobalColorConstants.sideTextBoxInnerColor;
            textBox_Info2.BackColor = GlobalColorConstants.sideTextBoxInnerColor;
            textBox_Info3.BackColor = GlobalColorConstants.sideTextBoxInnerColor;
            textBox_Info4.BackColor = GlobalColorConstants.sideTextBoxInnerColor;
            textBox_Info5.BackColor = GlobalColorConstants.sideTextBoxInnerColor;

            contextMenuStrip1.Renderer = new ToolStripProfessionalRenderer(new MenuColorTable());
        }
        public BirthdayNotifier(Person person)
        {
            InitializeComponent();
            CenterToScreen();

            Header header = new Header(this);

            this.Controls.Add(header);
            header.Parent = splitContainer_Main.Panel1;
            header.Show();
            header.DeleteMaximizeButton();
            header.ChangeAppTextSize(8);
            header.ChangeAppText("Home Life");
            header.DeleteMenuStrip();

            label_bd.Text += " " + person.Nickname + " !";

            int years = (int)(DateTime.Now - person.Birthday).TotalDays / 365;

            label1.Text = "Congratulations on your " + years + ". birthday!";

            this.BackColor = GlobalColorConstants.GetRandomColor(120, 256);
        }