예제 #1
0
        /// <summary>
        /// Generates VHDL Code using a DataPathModel and DataPathTemplate
        /// </summary>
        private void GenerateDatapath(DataPathModel Data)
        {
            try
            {
                if (Data != null && Data.Name != null)
                {
                    DataPathTemplate DPTemplate = new DataPathTemplate(Data);                               //Creates an instance of the datapath templates using the Data passed into the function
                    String           DPText     = DPTemplate.TransformText();                               //Generates the code into a string using the DataPath Template file

                    File.WriteAllText(System.IO.Path.Combine(_newFolderPath, Data.Name + ".txt"), DPText);  //Combines the folder path and datapath name to create the code file and writes the string to it
                    File.WriteAllText(System.IO.Path.Combine(_newFolderPath, Data.Name + ".vhd"), DPText);  //Combines the folder path and datapath name to create the code file and writes the string to it
                }
            }
            catch (Exception) { }
        }
예제 #2
0
        private void GenerateDatapath(DataPathModel Data)
        {
            try
            {
                if (Data != null && Data.Name != null)
                {
                    DataPathTemplate DPTemplate = new DataPathTemplate(Data);
                    String           DPText     = DPTemplate.TransformText();

                    //string textpath = Data.Name + ".txt";
                    //string newpath = System.IO.Path.Combine(NewFolderPath, textpath);
                    File.WriteAllText(System.IO.Path.Combine(NewFolderPath, Data.Name + ".txt"), DPText);

                    //File.WriteAllText(Data.Name + ".txt", DPText);
                }
            }
            catch (Exception) { }
        }