private void btnTags_Click(object sender, EventArgs e)
        {
            SelectTagForm stf = new SelectTagForm();

            stf.ShowDialog();

            if (stf.DialogResult == DialogResult.OK)
            {
                tags = stf.GetSelectedTags();

                int   off = 3;
                Label lbl;
                pnlTags.Controls.Clear();
                foreach (string t in tags)
                {
                    lbl           = new Label();
                    lbl.Width     = 15 + 5 * t.Length;
                    lbl.Text      = MainForm.tags[t].ID;
                    lbl.BackColor = MainForm.tags[t].Color;
                    lbl.Left      = off;
                    pnlTags.Controls.Add(lbl);
                    lbl.Left = off;
                    off     += lbl.Width + 3;
                }

                pnlTags.Refresh();
            }
        }
Exemple #2
0
        private void btnTag_Click(object sender, EventArgs e)
        {
            SelectTagForm nt = new SelectTagForm(tags);

            nt.ShowDialog();

            if (nt.DialogResult == DialogResult.OK)
            {
                tags.Clear();
                List <string> ret = nt.GetSelectedTags();
                foreach (string s in ret)
                {
                    if (MainForm.tags.ContainsKey(s))
                    {
                        Tag t = MainForm.tags[s];
                        tags.Add(s, t);
                    }
                }
                lblTag.Text = tags.Count.ToString() + " etiketa";
            }
        }