コード例 #1
0
ファイル: Models.cs プロジェクト: ElMoRad0/SmartGenerator
        public void EditFromModelsGuide()
        {
            string StartPath = Directory.GetParent(Application.ExecutablePath).ToString(); //Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName;
            //---- File from where to read
            string EndingPath_ModelsGuide = @"\Resources\src\ModelsGuide.txt";
            string ModelsGuideTxt         = StartPath + EndingPath_ModelsGuide;

            //--- File where to write temporary
            string EndingPath_Temporary = @"\Resources\src\Temporary.txt";
            string TemporaryTxt         = StartPath + EndingPath_Temporary;

            try
            {
                Treatments.EditModelRewritingFile(this.ModelID, this.Name, this.Content, this.ModelImplementations, ModelsGuideTxt, TemporaryTxt);
                //File.Delete(this.Content);
            }
            catch (Exception Ex)
            {
                Console.WriteLine("Error: " + Ex.Message);
            }
        }