public Smi FromSync(SyncAttr sync) { start = sync.start; syncType = sync.startType; FromAttr(sync.text); return(this); }
public List <SyncAttr> ToSync() { List <SyncAttr> result = new List <SyncAttr>(); if (body.Count > 0) { int i = 0; SyncAttr last = null; for (; i + 1 < body.Count; i++) { if (body[i].text.Replace(" ", "").Length == 0) { continue; } last = body[i].ToSync(); last.end = (body[i + 1].start > 0 ? body[i + 1].start : 0); last.endType = body[i + 1].syncType; result.Add(last); } result.Add(last = body[i].ToSync()); } return(result); }
public Ass FromSync(SyncAttr sync) { start = sync.start / 10; end = sync.end / 10; style = ((sync.startType == SyncType.normal && sync.endType == SyncType.normal) ? "Default" : ((sync.startType == SyncType.frame ? "[" : "(") + (sync.endType == SyncType.frame ? "]" : ")") ) ); FromAttr(sync.text); return(this); }