Exemple #1
0
        static int Main()
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            try
            {
                ItemRegistry.Initialize("Items/items.json");
            }
            catch (Exception e)
            {
                MessageBox.Show(
                    $"Error during start-up: {e.Message}\nPlease install DayGame again and open a GutHub issue if the problem persists.",
                    "System error",
                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(1);
            }

            var sf = StartUpMenu.ChooseSaveFile();

            if (sf != null)
            {
                Application.Run(new NavigationMenu(sf));
            }
            // Application.Run(new BossBattleFrame(sf.Character, sf.Inventory, new Boss("bosss", null, 45, 3, 6)));
            return(0);
        }
        static void Main()
        {
#if NETCOREAPP3_1
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
#endif
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            var sf = StartUpMenu.ChooseSaveFile();
            if (sf != null)
            {
                Application.Run(new NavigationMenu(sf));
            }
            // Application.Run(new BossBattleFrame(new Character("CharNamee", "Male"), new Boss.Boss("bosss", 7, 45, 3, 6)));
        }