Пример #1
0
 public static List <Light> Test(Dictionary <String, ScriptModel> scriptModelDictionary, String stepName)
 {
     if (ScriptFileBusiness.Test(scriptModelDictionary, stepName).ContainsKey(stepName))
     {
         return(ScriptFileBusiness.Test(scriptModelDictionary, stepName)[stepName]);
     }
     else
     {
         return(new List <Light>());
     }
 }
Пример #2
0
        public static LightGroup CreateFromLightScriptFile(string fileName, string stepName)
        {
            ProjectConfigModel projectConfigModel = new ProjectConfigModel();

            XmlSerializerBusiness.Load(ref projectConfigModel, "Config/project.xml");
            String midPath = AppDomain.CurrentDomain.BaseDirectory + @"Project\" + projectConfigModel.Path + @"\_Cache\_" + fileName.Substring(0, fileName.LastIndexOf('.')) + ".mid";

            if (stepName.Equals(String.Empty) && File.Exists(midPath))
            {
                return(FileBusiness.CreateInstance().ReadMidiFile(midPath));
            }
            return(ScriptFileBusiness.FileToLight(AppDomain.CurrentDomain.BaseDirectory + @"Project\" + projectConfigModel.Path + @"\LightScript\" + fileName, stepName));
        }
Пример #3
0
 public static Dictionary <string, List <Light> > Test(Dictionary <String, ScriptModel> scriptModelDictionary)
 {
     return(ScriptFileBusiness.Test(scriptModelDictionary));
 }