示例#1
0
        public ExtendedConsole(ExtendedConsoleOptions Options)
        {
            this.Options  = Options;
            Options.Owner = this;

            Matrix = new ExtendedConsoleCellMatrix();
            var s = System.Windows.Forms.Screen.AllScreens[0].Bounds.Size;

            Matrix.SetSize(s.Width / Options.BoxWidth, s.Height / Options.BoxHeight);
            Matrix.Changed = OptionsChanged;

            KeyManager             = new In.KeyManager();
            Marker                 = new ExtendedConsoleMarker(this);
            Cursor                 = new In.Cursor(this);
            MainContainer          = new Elements.ElementContainer();
            MainContainer.Changed += () =>
            {
                if (Form != null)
                {
                    Flush();
                }
            };

            if (Options.RunFormInExtraThread)
            {
                Viewer      = new System.Threading.Thread(StartViewer);
                Viewer.Name = "Viewer Thread";
                Viewer.Start();
                while (Form == null || !Form.Visible)
                {
                    System.Threading.Thread.Sleep(1);
                }
            }
        }
示例#2
0
 public BasicCountainerElement()
 {
     Elements = new ElementContainer();
 }