Ejemplo n.º 1
0
        public Control Add(string item)
        {
            Control c = null;

            if (item.StartsWith(ItemTypes.Note))
            {
                c = new NoteBlock(item);
            }
            else if (item.StartsWith(ItemTypes.Board))
            {
                c = new BoardIcon(item);
            }
            else if (item.StartsWith(ItemTypes.Bubi))
            {
                c = new Bubi(item);
            }
            else if (item.StartsWith(ItemTypes.Column))
            {
                c = new BoardColumn(item);
            }

            ((IItem)c).Interact += Item_Interact;
            Parent.Controls.Add(c);

            return(c);
        }
Ejemplo n.º 2
0
        private void addBoardToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();

            fbd.Description = "A fő mappa kiválasztásához nyomj a mégsére.";

            BoardIcon bi = new BoardIcon();

            DialogResult res = fbd.ShowDialog();

            if (res == DialogResult.OK)
            {
                bi.Folder = fbd.SelectedPath;
            }
            else if (res == DialogResult.Cancel)
            {
                bi.Folder = "./";
            }

            itemManager.Add(bi.GetItemData(), selectedPosition);
        }