private void SetRecline(Recline recline) { Recline = recline; OnUpdateZonesRequested(); ProjectLineChanged(); ProjectLinePointsChanged(); }
private Recline CreateUnknownRecline(string filename) { var recline = new Recline(this, filename); AddRecline(recline); return(recline); }
public static ProjectLine CreateNewFromRecline(Recline recline) { var projectLine = new ProjectLine() { RestPoints = new List <int>(), VowelPoints = new List <int>(), ConsonantPoints = new List <int>(), Recline = recline }; return(projectLine); }
public static ProjectLine Read(Recline recline, string pds, string pvs, string pcs) { var projectLine = new ProjectLine(); projectLine.SetRecline(recline); if (pds.Length > 0) { projectLine.RestPoints = pds.Split(' ').Select(n => int.Parse(n)).ToList(); } if (pvs.Length > 0) { projectLine.VowelPoints = pvs.Split(' ').Select(n => int.Parse(n)).ToList(); } if (pcs.Length > 0) { projectLine.ConsonantPoints = pcs.Split(' ').Select(n => int.Parse(n)).ToList(); } return(projectLine); }
public int AddPoint(int position, PhonemeType type) { var points = PointsOfType(type); var phonemes = Recline.PhonemesOfType(type); var neededCount = phonemes.Count * 2; if (points.Count >= neededCount) { return(-1); } var realPhonemes = PointsOfType(type, virtuals: false); if (realPhonemes.Contains(position)) { return(-1); } realPhonemes.Add(position); realPhonemes.Sort(); UpdateZones(); ProjectLinePointsChanged(); return(realPhonemes.IndexOf(position)); }
public void AddRecline(Recline recline) { reclineByFilename[recline.Name] = recline; Reclines.Add(recline); }