diff --git a/Hattory/Kernel.cs b/Hattory/Kernel.cs index 48ab5cd..19a3ed8 100644 --- a/Hattory/Kernel.cs +++ b/Hattory/Kernel.cs @@ -1,20 +1,16 @@ -using Cosmos.System.Graphics; +using Cosmos.Core; +using Cosmos.Core.Multiboot; +using Cosmos.HAL; +using Cosmos.HAL.Drivers.Video; +using Cosmos.System.FileSystem; +using Cosmos.System.FileSystem.VFS; +using Cosmos.System.Graphics; +using IL2CPU.API.Attribs; using System; -using System.IO; using System.Drawing; -using sus = Cosmos.System; +using System.IO; using ConsoleKeyy = Cosmos.System.ConsoleKeyEx; -using Cosmos.Core; -using IL2CPU.API.Attribs; -using Cosmos.System.FileSystem; -using Cosmos.System.FileSystem.VFS; -using Cosmos.HAL.Drivers.Video; -using Cosmos.Core.Multiboot; -using Cosmos.HAL; -using Cosmos.System.Audio; -using Cosmos.HAL.Drivers.Audio; -using Cosmos.System.Audio.IO; -using System.Diagnostics; +using sus = Cosmos.System; #pragma warning disable CA1416 // бля меня этот ебучий варнинг заебал @@ -126,8 +122,7 @@ bool canvber() if (VBEDriver.ISAModeAvailable()) { return true; } if (PCI.Exists(VendorID.VirtualBox, DeviceID.VBVGA)) { return true; } if (PCI.Exists(VendorID.Bochs, DeviceID.BGA)) { return true; } - if (Multiboot2.IsVBEAvailable) { return true; } - return false; + return Multiboot2.IsVBEAvailable; } colora = Color.Black; if (PCI.GetDevice(VendorID.VMWare, DeviceID.SVGAIIAdapter) != null && PCI.Exists(PCI.GetDevice(VendorID.VMWare, DeviceID.SVGAIIAdapter))) @@ -154,8 +149,8 @@ bool canvber() sus.MouseManager.ScreenHeight = 200; FVGAIU = true; } - sus.MouseManager.X = sus.MouseManager.ScreenWidth/2; - sus.MouseManager.Y = sus.MouseManager.ScreenHeight/2; + sus.MouseManager.X = sus.MouseManager.ScreenWidth / 2; + sus.MouseManager.Y = sus.MouseManager.ScreenHeight / 2; FpsShower.ShouldRender = true; //Console.Beep(3000, 1000); } @@ -362,7 +357,7 @@ protected override void Run() } } //FileManager - if (ClickRight(10, 60, 270 + Notepad.path.Length * 2, 250)) + if (ClickRight(10, 60, 270 + (Notepad.path.Length * 2), 250)) { if (isfilemanager == true && isformatsure == false) { @@ -518,6 +513,7 @@ protected override void Run() isdiskman = false; //disk manager isfilerename = false; //Are you want to rename file? isguessit = true; + klavaypr.On = false; randomnum = new Random().Next(0, 101); status = "New number has made"; enterrednum = ""; @@ -854,15 +850,18 @@ protected override void Run() try { int num = Convert.ToInt32(enterrednum); - if (num > randomnum) { + if (num > randomnum) + { status = "Guessed number less than " + num.ToString(); } else if (num < randomnum) { status = "Guessed number greater than " + num.ToString(); } - else if (num == randomnum) { + else if (num == randomnum) + { status = "You guess it! Congratulations!"; + randomnum = new System.Random().Next(0, 101); } } catch (Exception) { } @@ -880,7 +879,7 @@ protected override void Run() status = "New number has made"; enterrednum = ""; } - } + } //======SureDelete if (isformatsure == true) { diff --git a/Hattory/calc.cs b/Hattory/calc.cs index 1c54910..c2c0cca 100644 --- a/Hattory/calc.cs +++ b/Hattory/calc.cs @@ -1,8 +1,6 @@ using Cosmos.System.Graphics; using System; using System.Drawing; -using sus = Cosmos.System; -using System.Windows.Input; using kern = Hattory.Kernel; namespace Hattory @@ -120,7 +118,7 @@ public static void Calculator() //4 if (kern.Click(30, 220, 40, 40)) { - if(iscalcready == false) + if (iscalcready == false) { if (first.Length < 22) { @@ -275,7 +273,7 @@ public static void Calculator() { second = second.Remove(second.Length - 1, 1); } - + } } //. @@ -329,7 +327,8 @@ public static void Calculator() Otrisovka.Write("Minus", 70, 100, Color.Black); // 40 + 5 Otrisovka.Write("Devide", 120, 100, Color.Black); // 48 + 5 Otrisovka.Write("Multiply", 175, 100, Color.Black); //64 + 5 - try { + try + { firstI = Convert.ToSingle(first); secondI = Convert.ToSingle(second); } @@ -353,12 +352,12 @@ public static void Calculator() //SQRT() if (kern.Click(180, 220, 40, 40)) { - c = (float)Math.Sqrt(firstI); + c = !iscalcready ? (float)Math.Sqrt(firstI) : (float)Math.Sqrt(secondI); } //SQR() if (kern.Click(180, 270, 40, 40)) { - c = firstI * firstI; + c = !iscalcready ? (float)Math.Pow(firstI,2) : (float)Math.Pow(secondI,2); } //pow() if (kern.Click(180, 320, 40, 40)) @@ -367,7 +366,8 @@ public static void Calculator() } Cosmos.Core.Memory.Heap.Collect(); } - catch (Exception) { + catch (Exception) + { Otrisovka.Write("ERROR 1000-7", 30, 145, Color.Black); } } diff --git a/Hattory/klavaypr.cs b/Hattory/klavaypr.cs index 9932da4..0f4fd12 100644 --- a/Hattory/klavaypr.cs +++ b/Hattory/klavaypr.cs @@ -1,13 +1,5 @@ -using System; -using Cosmos.System.Graphics; -using System.Drawing; -using ConsoleKeyy = Cosmos.System.ConsoleKeyEx; +using ConsoleKeyy = Cosmos.System.ConsoleKeyEx; using sus = Cosmos.System; -using Cosmos.HAL.BlockDevice; -using System.Linq; -using System.Text.RegularExpressions; -using aik = Hattory.Kernel; -using System.IO; #pragma warning disable CA1416 // Проверка совместимости платформы namespace Hattory diff --git a/Hattory/ntepad.cs b/Hattory/ntepad.cs index bfbfd4a..4aaa3b9 100644 --- a/Hattory/ntepad.cs +++ b/Hattory/ntepad.cs @@ -1,15 +1,9 @@ -using System; -using System.IO; -using Cosmos.System.Graphics; +using Cosmos.System.Graphics; +using System; using System.Drawing; +using System.IO; using ConsoleKeyy = Cosmos.System.ConsoleKeyEx; using sus = Cosmos.System; -using Cosmos.HAL.BlockDevice; -using System.Linq; -using System.Text.RegularExpressions; -using Cosmos.System.Graphics.Fonts; -using static System.Net.Mime.MediaTypeNames; -using System.Runtime.CompilerServices; #pragma warning disable CA1416 // Проверка совместимости платформы namespace Hattory @@ -32,8 +26,8 @@ internal class Notepad public static void enternote() { - canvas.DrawFilledRectangle(Color.Wheat, 10, 60, 270 + path.Length*2, 250); - Otrisovka.Write("File Manager: " + path,30,70,Color.Black); + canvas.DrawFilledRectangle(Color.Wheat, 10, 60, 270 + (path.Length * 2), 250); + Otrisovka.Write("File Manager: " + path, 30, 70, Color.Black); try { var files_list = Directory.GetFiles(path); @@ -105,7 +99,7 @@ public static void enternote() iznai += 16; } //RENAME - if (Hattory.Kernel.ClickMiddle(150, 90, 270 + path.Length * 2, 220) && islock == false) + if (Hattory.Kernel.ClickMiddle(150, 90, 270 + (path.Length * 2), 220) && islock == false) { islock = true; klavaypr.On = false;