public CadreData Add( string[] marks, DifData[] difs, seTe text, List <seSo> sounds, bool installtoglobal = false, int?indexToInsert = null ) { CadreData data = new CadreData(); data.TextData = text; if (sounds != null && sounds.Any()) { data.SoundList.AddRange(sounds); } data.MarkList.AddRange(marks); foreach (var mark in marks) { if (!this.CadreGroups.Contains(mark)) { this.CadreGroups.Add(mark); } } // sort by level var difsSortedByLevel = difs.OrderBy(x => x.Z).ToList(); foreach (var dif in difsSortedByLevel) { data.AlignList.Add(dif); if (installtoglobal && !string.IsNullOrEmpty(dif.Parent)) { data.IsGlobalAlign = true; AddToGlobalAlign(dif, difs.Where(x => x.Name == dif.Parent).FirstOrDefault()); } } if (indexToInsert.HasValue && indexToInsert.Value <= CadreDataList.Count()) { CadreDataList.Insert(indexToInsert.Value, data); } else { CadreDataList.Add(data); } return(data); }
//public List<OpEf> CurrTransitions = new List<OpEf>(); public CadreData CreateCadreData(string text, List <DifData> difdata, List <Info_Scene> infodata, int?indexToInsert = null) { List <DifData> cdata = new List <DifData>(); foreach (var item in difdata) { var ndd = new DifData(item.Name); ndd.AssingFrom(item); cdata.Add(ndd); } this.ClearSound(false, true, true); seTe textData = new seTe(this.DefaultSceneText); textData.Text = text; var result = Add(new string[] { currentGr }, cdata.ToArray(), textData, this.CurrentSounds, false, indexToInsert); // save it to futher modifications result.OriginalInfo.AddRange(infodata); return(result); }
public seTe(seTe origin) : this() { this.Align = origin.Align; this.VAlign = origin.VAlign; this.Text = origin.Text; this.Shift = origin.Shift; this.Size = origin.Size; this.Width = origin.Width; this.FontSize = origin.FontSize; this.FontStyle = origin.FontStyle; this.Opacity = origin.Opacity; this.Bottom = origin.Bottom; this.FontColor = origin.FontColor; this.FontName = origin.FontName; this.AutoShow = origin.AutoShow; this.ClearBack = origin.ClearBack; this.Animated = origin.Animated; this.T = origin.T; }
internal void AddText(seTe newtext) { this.TextList.Add(newtext); }