示例#1
0
        private string GetPageEntity(PageEntity pageEntity, string baseFileName)
        {
            string fileNameFullPath = string.Format("C:\\git_cjonasl\\Leander\\Solutions\\Nr1\\WebApplication1\\{0}\\{1}", pageEntity.ToString(), baseFileName);

            if (System.IO.File.Exists(fileNameFullPath))
            {
                return(Utility.ReturnFileContents(fileNameFullPath));
            }
            else
            {
                return(null);
            }
        }
示例#2
0
        private void HandleSaveOfPageEntity(PageEntity pageEntity, int page, int menu, int sub1, int sub2, int tab, string fileContent)
        {
            string baseFileName, fileNameFullPath;

            if ((pageEntity == PageEntity.Icon) || (pageEntity == PageEntity.Title)) //Same icon and title for all 10 tabs
            {
                baseFileName = string.Format("Page{0}Menu{1}Sub{2}Sub{3}.txt", page, menu, sub1, sub2);
            }
            else
            {
                baseFileName = string.Format("Page{0}Menu{1}Sub{2}Sub{3}Tab{4}.txt", page, menu, sub1, sub2, tab);
            }

            fileNameFullPath = string.Format("C:\\git_cjonasl\\Leander\\Solutions\\Nr1\\WebApplication1\\{0}\\{1}", pageEntity.ToString(), baseFileName);
            Utility.CreateNewFile(fileNameFullPath, fileContent.Replace("\n", "\r\n"));
        }