Esempio n. 1
0
        private void create_new_task(int x, int y, Panel pn)
        {
            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);

            pn.Controls.Add(card);
            card.SetBounds(x, y, 421, 67);
        }
Esempio n. 2
0
        private void load_list(Lista list)
        {
            string[] tasks = list.tasks.Split(';');

            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 = list.title;

            int y = 3;

            for (int i = 0; i < tasks.Length; i++)
            {
                string text = tasks[i].Split('@')[0];
                if (text == "")
                {
                    break;
                }
                bool is_checked = false;
                if (tasks[i].Split('@')[1] == "True")
                {
                    is_checked = true;
                }

                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;
                check.Checked = is_checked;

                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;
                title_task.Text       = text;

                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, y, 421, 67);
                y += 73;
            }
        }
Esempio n. 3
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. 4
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);
        }