Exemplo n.º 1
0
 void HandleM_textViewBufferChanged(object sender, EventArgs e)
 {
     if (BufferChanged != null)
     {
         BufferChanged.Invoke(sender, new Whee.WordBuilder.Model.Events.DocumentChangedEventArgs(m_textView.Buffer.Text));
     }
 }
Exemplo n.º 2
0
 void HandleTextViewTextDidChange(NSNotification aNotification)
 {
     if (BufferChanged != null && !m_highlighting)
     {
         BufferChanged.Invoke(this, new Whee.WordBuilder.Model.Events.DocumentChangedEventArgs(m_textView.String.ToString()));
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Adds the given media into the buffer.
        /// </summary>
        /// <param name="mediaSegmentContent">The media to add.</param>
        public void Add(MediaSegmentContent mediaSegmentContent)
        {
            FileWriter.WriteBytesToFile(
                mediaSegmentContent.FullContent,
                string.Format(MediaSegmentContentFilename, _mediaSegmentContentList.Count));

            _mediaSegmentContentList.Add(mediaSegmentContent);

            System.Diagnostics.Debug.WriteLine($"Media segment number {_mediaSegmentContentList.Count} added to buffer");

            BufferChanged?.Invoke(this, _mediaSegmentContentList.Count);
        }
Exemplo n.º 4
0
 public void Add(T val)
 {
     m_array[(m_startIndex + Count) % MaxLength] = val;
     if (Count < MaxLength)
     {
         Count++;
     }
     else
     {
         m_startIndex = (m_startIndex + 1) % MaxLength;
     }
     BufferChanged?.Invoke(this, new EventArgs());
 }
Exemplo n.º 5
0
        private static string GetText(KeyHandler keyHandler)
        {
            ConsoleKeyInfo keyInfo = Console.ReadKey(true);

            while (keyInfo.Key != ConsoleKey.Enter)
            {
                keyHandler.Handle(keyInfo);
                BufferChanged?.Invoke(keyInfo.Key, keyHandler.Text);
                keyInfo = Console.ReadKey(true);
            }

            BufferChanged?.Invoke(keyInfo.Key, keyHandler.Text);
            Console.WriteLine();
            return(keyHandler.Text);
        }
Exemplo n.º 6
0
 /// <summary>
 /// Fires the OnBufferChanged event
 /// </summary>
 /// <param name="clipRectangles">The Rectangle in pixels</param>
 protected virtual void OnBufferChanged(List <Rectangle> clipRectangles)
 {
     BufferChanged?.Invoke(this, new ClipArgs(clipRectangles));
 }
 /// <summary>
 /// This simply forwards the call from a layer to the container of this collection (like a MapFrame).
 /// </summary>
 /// <param name="sender">The layer that actually changed</param>
 /// <param name="e">The clip args.</param>
 protected virtual void OnBufferChanged(object sender, ClipArgs e)
 {
     BufferChanged?.Invoke(sender, e);
 }