コード例 #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);
        }
コード例 #2
0
 public static SaveFile ChooseSaveFile()
 {
     using var sm = new StartUpMenu();
     if (sm.ShowDialog(null) == DialogResult.OK)
     {
         return(sm.chosenSaveFile);
     }
     return(null);
 }
コード例 #3
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)));
        }