/// <summary> /// Initializes a new instance of the <see cref="Keyboard"/> class. /// </summary> public Keyboard(DisplayForm display) { base.name = "EmulatedKeyboard"; base.parent = null; base.deviceStatus = DeviceStatus.Online; display.onKeyPressed = this.AcceptKey; }
/// <summary> /// Setups the primary display form. /// </summary> public static void SetupPrimaryDisplayForm() { PrimaryDisplayForm = new DisplayForm(800, 600); Thread thread = new Thread(new ThreadStart(CreatePrimaryDisplayForm)); thread.Start(); }
/// <summary> /// Initializes a new instance of the <see cref="PixelGraphicDevice"/> class. /// </summary> public PixelGraphicDevice(DisplayForm displayform) { base.name = "EmulatedPixelGraphicDevice"; base.parent = null; base.deviceStatus = DeviceStatus.Online; this.displayform = displayform; width = (ushort)displayform.bitmap.Width; height = (ushort)displayform.bitmap.Height; }
/// <summary> /// Initializes a new instance of the <see cref="VGAConsole"/> class. /// </summary> public VGAConsole(DisplayForm dislayForm) { ioBase = StandardIOBase; baseAddress = StandardAddressBase; width = 80; height = 27; cursorX = cursorY = 0; cursorPosition = 0; lastCommand = 0; font = new Font("Courier New", 9, FontStyle.Regular); fontWidth = (int)font.SizeInPoints; fontHeight = (int)font.SizeInPoints + 5; palette = Mosa.DeviceSystem.ColorPalette.CreateStandard16ColorPalette(); this.dislayForm = dislayForm; dislayForm.SetSize(fontWidth * width + 12, fontHeight * height + 10); MemoryDispatch.RegisterMemory(baseAddress, StandardMemorySize, Read8, Write8); Initialize(); }
/// <summary> /// Creates the form. /// </summary> private void CreateForm() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); dislayForm = new DisplayForm(bitmap); dislayForm.Width = Width; dislayForm.Height = Height; Application.Run(dislayForm); }