Esempio n. 1
0
        private void New_list_btn_Click(object sender, EventArgs e)
        {
            splitContainer1.Panel2.Enabled = true;

            Top_lb.Text         = "Todas as listas";
            Count_notes_lb.Text = List_lists.Controls.Count.ToString() + " listas";

            Holder_panel.Controls.Clear();
            Holder_panel.Controls.Add(List_lists);

            Panel list_pn = (Panel)List_cr_pn.Controls[0];

            list_pn.Controls.Clear();

            MetroFramework.Controls.MetroTextBox title_list = (MetroFramework.Controls.MetroTextBox)List_cr_pn.Controls[3];
            title_list.Text = "";

            Bunifu.Framework.UI.BunifuCards card = new Bunifu.Framework.UI.BunifuCards();
            card.color     = Color.Purple;
            card.BackColor = Color.FromArgb(64, 64, 64);

            Panel layout = new Panel();

            MetroFramework.Controls.MetroCheckBox check = new MetroFramework.Controls.MetroCheckBox();
            check.Style = MetroFramework.MetroColorStyle.Green;
            check.Theme = MetroFramework.MetroThemeStyle.Dark;

            MetroFramework.Controls.MetroTextBox title_task = new MetroFramework.Controls.MetroTextBox();
            title_task.FontSize   = MetroFramework.MetroTextBoxSize.Tall;
            title_task.FontWeight = MetroFramework.MetroTextBoxWeight.Bold;
            title_task.Theme      = MetroFramework.MetroThemeStyle.Dark;
            title_task.Multiline  = true;

            layout.Controls.Add(check);
            check.SetBounds(4, 20, 30, 15);
            layout.Controls.Add(title_task);
            title_task.SetBounds(40, 12, 275, 31);

            card.Controls.Add(layout);
            layout.SetBounds(3, 3, 413, 61);

            list_pn.Controls.Add(card);
            card.SetBounds(3, 3, 421, 67);

            splitContainer1.Panel2.Controls.Clear();
            splitContainer1.Panel2.Controls.Add(List_cr_pn);
        }
Esempio n. 2
0
        private void create_panel_list()
        {
            List_cr_pn.Size       = new Size(467, 472);
            List_cr_pn.AutoScroll = true;

            Panel list_pn = new Panel();

            list_pn.AutoScroll  = true;
            list_pn.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

            Bunifu.Framework.UI.BunifuCards card = new Bunifu.Framework.UI.BunifuCards();
            card.color     = Color.Purple;
            card.BackColor = Color.FromArgb(64, 64, 64);

            Panel layout = new Panel();

            MetroFramework.Controls.MetroCheckBox check = new MetroFramework.Controls.MetroCheckBox();
            check.Style = MetroFramework.MetroColorStyle.Green;
            check.Theme = MetroFramework.MetroThemeStyle.Dark;

            MetroFramework.Controls.MetroTextBox title_task = new MetroFramework.Controls.MetroTextBox();
            title_task.FontSize   = MetroFramework.MetroTextBoxSize.Tall;
            title_task.FontWeight = MetroFramework.MetroTextBoxWeight.Bold;
            title_task.Theme      = MetroFramework.MetroThemeStyle.Dark;
            title_task.Multiline  = true;

            layout.Controls.Add(check);
            check.SetBounds(4, 20, 30, 15);
            layout.Controls.Add(title_task);
            title_task.SetBounds(40, 12, 275, 31);

            card.Controls.Add(layout);
            layout.SetBounds(3, 3, 413, 61);

            list_pn.Controls.Add(card);
            card.SetBounds(3, 3, 421, 67);

            List_cr_pn.Controls.Add(list_pn);
            list_pn.SetBounds(4, 4, 460, 357);

            MetroFramework.Controls.MetroTile add_task = new MetroFramework.Controls.MetroTile();
            add_task.Text      = "+ Adicionar Nova Tarefa";
            add_task.TextAlign = ContentAlignment.MiddleCenter;
            add_task.Click    += this.New_task_btn_click;

            MetroFramework.Controls.MetroTile save_list = new MetroFramework.Controls.MetroTile();
            save_list.Text      = "Salvar";
            save_list.TextAlign = ContentAlignment.MiddleCenter;
            save_list.Style     = MetroFramework.MetroColorStyle.Green;
            save_list.Click    += this.Save_list_btn_click;

            MetroFramework.Controls.MetroTextBox title_list = new MetroFramework.Controls.MetroTextBox();
            title_list.Theme      = MetroFramework.MetroThemeStyle.Dark;
            title_list.FontSize   = MetroFramework.MetroTextBoxSize.Tall;
            title_list.Multiline  = true;
            title_list.FontWeight = MetroFramework.MetroTextBoxWeight.Bold;

            List_cr_pn.Controls.Add(add_task);
            add_task.SetBounds(3, 367, 170, 46);
            List_cr_pn.Controls.Add(save_list);
            save_list.SetBounds(181, 423, 170, 46);
            List_cr_pn.Controls.Add(title_list);
            title_list.SetBounds(6, 423, 169, 35);
        }