private void ProcSetColor(SpeechEvent se, int totime, PartsTalkBar tar) { if (tar == null) { return; } tar.BarColor = Color.FromArgb(int.Parse(se.Text)); }
private void ProcUpdate(SpeechEvent se, int totime, PartsTalkBar tar) { if (tar == null) { return; } tar.Text = se.Text; tar.Rect = CodeRect.FromLTRB(Math.Min(totime - 1, tar.Rect.LT.X), tar.Rect.LT.Y, totime, tar.Rect.RB.Y); if (se.Action == SpeechEvent.Actions.Canceled) { tar.IsCancelled = true; } }
public void OnMouseUp(MouseState e) { if (SelectedParts.Count != 1) { SelectedBar = null; Update(); } else { foreach (PartsCollectionBase.PartsEntry pe in SelectedParts) { SelectedBar = pe.Parts as PartsTalkBar; } if (SelectedBar != null) { Update(); } } }
private void ProcStart(SpeechEvent se, int totime) { var p1 = (int)(se.TimeGenerated - Hot.FirstSpeech).TotalSeconds; if (p1 > totime - 1) { p1 = totime - 1; } var pt = new PartsTalkBar { SessionID = se.SessionID, TimeTalkStarted = se.TimeGenerated, PartsPositioner = base.TalkPositioner, PartsPositionCorder = base.TalkPosCoder, Rect = CodeRect.FromLTRB( l: p1, r: totime, t: se.RowID, b: se.RowID), }; Parts.Add(TarPane, pt, LayerTalkBar); }