private CustomResource CreateCustomResource(int res_id, string caption, Color ResColor)
        {
            CustomResource cr = new CustomResource();

            cr.ResID = res_id;
            cr.Name  = caption;
            return(cr);
        }
        private CustomResource CreateCustomResource(int res_id, string caption, Color ResColor, Stream imageStream)
        {
            CustomResource cr = new CustomResource();

            cr.ResID = res_id;
            cr.Name  = caption;
            if (imageStream != null)
            {
                cr.ResImage = Image.FromStream(imageStream);
            }

            return(cr);
        }