Ejemplo n.º 1
0
        private void ProcSetColor(SpeechEvent se, int totime, PartsTalkBar tar)
        {
            if (tar == null)
            {
                return;
            }

            tar.BarColor = Color.FromArgb(int.Parse(se.Text));
        }
Ejemplo n.º 2
0
        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;
            }
        }
Ejemplo n.º 3
0
 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();
         }
     }
 }
Ejemplo n.º 4
0
        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);
        }