Пример #1
0
        void ImagePanel_Paint(object sender, GUI.PaintEventArgs e)
        {
            if (m_BGThread != null)
            {
                if (m_BGThread.IsAlive)
                {
                    lock (m_LogCache)
                    {
                        if (m_LogCache.Count > 0)
                        {
                            foreach (string text in m_LogCache)
                            {
                                TableRow row = m_Log.AddRow(text);
                                row.SetTextColor(Color.DarkBlue);
                            }

                            m_LogCache.Clear();

                            m_Log.ScrollToBottom();
                        }
                    }
                }
                else
                {
                    m_BGThread      = null;
                    m_TopLabel.Text = label_TOP_text;
                }
            }


            Bitmap image;

            lock (m_ImageLock)
            {
                if (m_Image == null)
                {
                    return;
                }

                image = m_Image;

                if (image == null)
                {
                    return;
                }


                m_ImagePanel.Size = image.PixelSize;

                e.Graphics.DrawImage(image, PointI.Zero);
            }
        }
Пример #2
0
 public void PrintText(String str)
 {
     m_TextOutput.AddRow(str);
     m_TextOutput.ScrollToBottom();
 }