Beispiel #1
0
 private static void OnText(Message msg, bool isEdited)
 {
     TextEvent?.Invoke(new MessageEventArgs()
     {
         msg = msg, isEdited = isEdited
     });
 }
Beispiel #2
0
 public static void OnText(Message Msg, bool isEdited)
 {
     TextEvent?.Invoke(new MessageEventArgs()
     {
         msg = Msg, isEdited = isEdited
     });
 }
 void TextSubmitted(string text)
 {
     if (text != "")
     {
         Write("> " + text);
         onInput.Invoke(text);
         input.text = "";
     }
     input.ActivateInputField();
 }
Beispiel #4
0
        /// <summary>
        /// Thread that loops the Draw and speciesAndAmount events.
        /// </summary>
        private void VisualThread()
        {
            DateTime lastTime = DateTime.Now;

            while (true)
            {
                double passedTime = (DateTime.Now - lastTime).TotalSeconds;
                if (passedTime >= TimeInSecondsBetweenFrames)
                {
                    lastTime = DateTime.Now;
                    PaintEvent?.Invoke(this, new ImageEventArgs {
                        BitMapImage = Draw(Map, DrawPublisher.Draw())
                    });
                    TextEvent?.Invoke(this, new TextEventArgs {
                        ListInformation = DrawPublisher.SpeciesAndAmount()
                    });
                }
            }
        }
 public void OnText(ICharSequence text)
 {
     TextEvent?.Invoke(text);
 }
Beispiel #6
0
 private void UpdateText()
 {
     m_text = string.Format(m_format, m_args);
     m_onTextChanged.Invoke(m_text);
 }