コード例 #1
0
        //Get the image file name for this command
        public static string GetImageNameFileName(CommandImage cmdImage)
        {
            if (cmdImage != CommandImage.None)
            {
                if (_imagesFolder == null)
                {
                    _imagesFolder = DemosGlobal.ImagesFolder;
                }


                string name     = cmdImage.ToString().Replace("____", " ");
                string name2    = name.Replace("___", "-");
                string name3    = name2.Replace("__", "\\");
                string name4    = name3.Replace("_", ".");
                string fullPath = Path.Combine(_imagesFolder, "");
                fullPath = Path.Combine(fullPath, name4);

                return(fullPath);
            }
            else
            {
                return(string.Empty);
            }
        }