Ejemplo n.º 1
0
        private bool InsertButton(MButton btn, string path)
        {
            // 파일명 읽어와야 함
            string      fileName = Path.GetFileName(path);
            ImageSource imgIcon  = IconManager.GetIcon(path);

            byte[] baIcon = IconManager.ImageSourceToByte(imgIcon);

            if (DataBase.InsertButton(btn.TabId, btn.Col, btn.Row, fileName, path, baIcon) < 1)
            {
                return(false);
            }

            btn.IconImage = imgIcon;
            btn.Text      = fileName;
            btn.Path      = path;
            return(true);
        }