コード例 #1
0
        public void Add(string name, int type, string id, string id_shortcut = "")
        {
            if (type != -1)
            {
                var element = new DesktopElement(type, name, id);
                if (id_shortcut != String.Empty)
                {
                    element.setShortCut(id_shortcut);
                }
                if (x + (int)element.width + 15 > FileManager.Graphics.Window.Width)
                {
                    x  = Configuration.startX;
                    y += (int)(element.height + (element.height / 2));
                }
                element.nameElement.setPosition((int)(x), (int)(y + (element.height - 25)));
                element.nameElement.setSize(9);

                element.setPosition(x, y);
                FileElement.Add(element);
                x += (int)element.width + 15;
                count++;
                element.Generate();
                element.Display(canvas);
            }
        }