105040 Update 独立获取项目名称的逻辑
This commit is contained in:
parent
7871cf01ff
commit
707cf928ee
|
@ -176,7 +176,7 @@ public class LectotypeViewModel(string docId) : INotifyPropertyChanged
|
|||
}
|
||||
var designer = FlexProject.CurrentProject.GetDesigners().FirstOrDefault(designer => designer.ID == docId);
|
||||
// 获取项目名
|
||||
DocName = designer.Name.Split('+').FirstOrDefault();
|
||||
DocName = GetDocName(designer);
|
||||
LectotypeManager.CURRENT_DOC_NAME = DocName;
|
||||
LectotypeManager.CURRENT_DOC_CREATE_TIME = new DateTimeOffset(designer.CreatedDateDateTime).ToUnixTimeMilliseconds().ToString();
|
||||
|
||||
|
@ -256,6 +256,18 @@ public class LectotypeViewModel(string docId) : INotifyPropertyChanged
|
|||
}
|
||||
}
|
||||
|
||||
public string GetDocName(FlexDesigner designer)
|
||||
{
|
||||
var docName = designer.Name;
|
||||
if(docName.Contains("+"))
|
||||
{
|
||||
return docName.Split('+').FirstOrDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
return docName;
|
||||
}
|
||||
}
|
||||
public List<LectotypeLineModel> StuffData(List<LectotypeLineModel> cables)
|
||||
{
|
||||
List<LectotypeLineModel> datas = [];
|
||||
|
|
Loading…
Reference in New Issue