예제 #1
0
        private void ProcSetColor(SpeechEvent se, int totime, PartsTalkBar tar)
        {
            if (tar == null)
            {
                return;
            }

            tar.BarColor = Color.FromArgb(int.Parse(se.Text));
        }
예제 #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;
            }
        }
예제 #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();
         }
     }
 }
예제 #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);
        }