Exemple #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);
                }
            }
        }
Exemple #2
0
 internal ExtendedConsoleDataStrip(ExtendedConsoleCellMatrix m, int index, bool vertical)
 {
     Vertical = vertical;
     Cells    = new ExtendedConsoleCell[vertical ? m.Height : m.Width];
     for (int i = 0; i < Cells.Length; ++i)
     {
         Cells[i] = m[vertical ? index : i, vertical ? i : index];
     }
 }
Exemple #3
0
 internal void CopyData(ExtendedConsoleCellMatrix m)
 {
     for (int x = 0; x < Width && x < m.Width; ++x)
     {
         for (int y = 0; y < Height && y < m.Height; ++y)
         {
             this[x, y].CopyData(m[x, y]);
         }
     }
 }
Exemple #4
0
 internal ExtendedConsoleCell(ExtendedConsoleCellMatrix Owner)
 {
     this.Owner = Owner;
 }
Exemple #5
0
 public Enumerator(bool Vertical, ExtendedConsoleCellMatrix matrix)
 {
     vertical    = Vertical;
     this.matrix = matrix;
 }
Exemple #6
0
 internal ExtendedConsoleDataCatcher(ExtendedConsoleCellMatrix matrix, bool Vertical)
 {
     this.matrix   = matrix;
     this.Vertical = Vertical;
 }