/// <summary> /// Writes the specified string and moves the cursor to the next line. /// </summary> /// <param name="text">The string to write.</param> public void WriteLine(string text) { if (text.Length < charLength) { //Erase cursor: VGADriver.driver.DoubleBuffer_DrawFillRectangle((uint)LocX, (uint)LocY + 13, 8, 2, bColor); VGADriver.driver.DoubleBuffer_Update(); // Go to next line: LocX = 0; LocY += 12; txt.Append(text); ScreenInput.Add(text); EndLine += 1; // Draw string: VGADriver.driver._DrawACSIIString(EndLine.ToString() + ", " + charHeight.ToString() + ", " + ScreenInput.Count.ToString(), (uint)Color.White.ToArgb(), (uint)LocX, (uint)LocY); VGADriver.driver.DoubleBuffer_Update(); // Go to next line: //LocX = 0; //LocY += 14; //DrawCursor(LocX, LocY); PromptLocX = 0; PromptLocY += 12; } //else //{ // //Erase cursor: // VGADriver.driver.DoubleBuffer_DrawFillRectangle((uint)LocX, (uint)LocY + 13, 8, 2, bColor); // VGADriver.driver.DoubleBuffer_Update(); // string first = text.Substring(0, charLength - 1); // // Go to next line: // LocX = 0; // LocY += 12; // // Draw string: // VGADriver.driver._DrawACSIIString(first, (uint)Color.White.ToArgb(), (uint)LocX, (uint)LocY); // VGADriver.driver.DoubleBuffer_Update(); // ScreenInput.Add(first); // string rest = text.Substring(charLength - 1); // //Save last coordinates: // LLocX = LocX + ((first.Length) * 8) - 8; // LLocY = LocY; // // Go to next line: // LocX = 0; // LocY += 12; // // Draw string: // VGADriver.driver._DrawACSIIString(rest, (uint)Color.White.ToArgb(), (uint)LocX, (uint)LocY); // VGADriver.driver.DoubleBuffer_Update(); // txt.Append(text); // ScreenInput.Add(rest); // LocX = (rest.Length) * 8; // EndLine += 2; // //// Go to next line: // //LocX = 0; // //LocY += 12; // PromptLocX = 0; // PromptLocY += 24; //} }
internal void SaveToMemory() { ScreenInput.Add(currentDirectory + ">" + txt.ToString()); txt.Clear(); EndLine += 1; //Erase cursor: VGADriver.driver.DoubleBuffer_DrawFillRectangle((uint)LocX, (uint)LocY + 13, 8, 2, bColor); VGADriver.driver.DoubleBuffer_Update(); Prompt(); }