public void onBtnClickOk() { if (TextAudioPath.text != "" && TextExcelPath.text != "" && TextOutPutPath.text != "") { /* * 初始化任务 */ if (!TaskManager.Instance.InitByExcel(TextExcelPath.text, TextOutPutPath.text)) { Debug.Log("excel == null"); return; } /* * 创建源数据保存文件到导出路径 */ SourceDataConfig s = new SourceDataConfig(); s.StrAudioSourcePath = TextAudioPath.text; s.StrExcelPath = TextExcelPath.text; string strJson = JsonUtility.ToJson(s); FileUtil.CreateFile(TextOutPutPath.text, FILE_NAME_SOURCE_CONFIG, strJson); /* * 跳转到翻译界面 */ ModuleParamToProcess mpp = new ModuleParamToProcess( TextExcelPath.text, TextAudioPath.text, TextOutPutPath.text ); CacheCanvasManager.StartModule(CanvasManager.ModuleType.E_PROCESS, mpp); } }
//---------------重写方法---------------------- public override void StartWithParam(ModuleParamBase param) { ModuleParamToProcess p = (ModuleParamToProcess)param; AudioEditManagercs.Instance.initWithNew(p.StrAudioPath, p.StrOutPutPath, onProcessChange, onProcessFinish); cacheParam_ = p; SliderProcess.value = 1; }