Example #1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);


            m_ConsoleTop                    = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_ConsoleTop.Margin             = Margin.Two;
            m_ConsoleTop.Dock               = Pos.Top;
            m_ConsoleTop.AutoSizeToContents = true;
            m_ConsoleTop.TextColor          = Color.Yellow;
            m_ConsoleTop.Text               = "Console:";


            Base bg = new Base(this);

            bg.Dock            = Pos.Fill;
            bg.ClientBackColor = Color.Black;
            bg.DrawBorder      = true;
            bg.BorderColor     = Color.DodgerBlue;

            ScrollControl scrollControl = new ScrollControl(bg);

            scrollControl.Dock = Pos.Fill;
            scrollControl.EnableScroll(true, true);
            scrollControl.AutoHideBars = true;
            scrollControl.Margin       = Margin.Five;

            m_Console                    = new Alt.GUI.Temporary.Gwen.Control.Label(scrollControl);
            m_Console.Margin             = Margin.Two;
            m_Console.Location           = PointI.Zero;
            m_Console.AutoSizeToContents = true;
            m_Console.TextColor          = Color.White;
            m_Console.MouseInputEnabled  = true;


            m_Timer          = new GUI.Timer();
            m_Timer.Interval = 1;
            m_Timer.Tick    += new EventHandler(Timer_Tick);
            m_Timer.Enabled  = true;


            m_BGThread = new Thread(new ThreadStart(this.RunTest));
#if !SILVERLIGHT && !UNITY_WEBPLAYER
            m_BGThread.SetApartmentState(ApartmentState.STA);
#endif
            m_BGThread.Start();
        }
Example #2
0
        public override void Dispose()
        {
            if (m_Timer != null)
            {
                m_Timer.Stop();
                m_Timer.Dispose();
                m_Timer = null;
            }

            if (m_BGThread != null &&
                m_BGThread.IsAlive)
            {
                m_BGThread.Abort();
            }

            base.Dispose();
        }