Пример #1
0
 private static void Main2()
 {
     SetProcessDPIAware();
     string[] settings = new string[3];
     if (File.Exists(MainForm.Path_Settings))
     {
         settings = Program.LoadSettings();
     }
     else
     {
         settings = new string[]
         {
             @"# Lines starting with a # are ignored",
             @"# Do not change the order of the settings",
             @"",
             @"# Path to osu!.db",
             @"C:\osu!\osu!.db",
             @"",
             @"# Path to your osu! song folder",
             @"C:\osu!\songs\",
             @"",
             @"# Path to a replay folder",
             @"C:\osu!\replays\"
         };
         File.WriteAllLines(MainForm.Path_Settings, settings);
         DialogResult reply = MessageBox.Show("A settings file has been created for you to link to your songs folder. Would you like to edit it now?", "File Created", MessageBoxButtons.YesNo);
         if (reply == DialogResult.Yes)
         {
             Program.OpenSettings();
             return;
         }
     }
     if (shouldCheckUpdate)
     {
         new Thread(() =>
         {
             try
             {
                 using (var updater = new Maintenance.Updater())
                 {
                     updater.Run();
                 }
             }
             catch (Exception e)
             {
                 Console.WriteLine(e);
             }
         }).Start();
     }
     using (MainForm form = new MainForm())
     {
         form.SetSettings(settings);
         Application.Run(form);
     }
     //form.Canvas = new Canvas(form.GetPictureBoxHandle(), form);
     //form.Canvas.Run();
 }
Пример #2
0
        private static bool DoRepair()
        {
            DialogResult res = MessageBox.Show("You are missing one or more DLL files required to run. Would you like to run the updater now? (it will download files in the current directory so you may want to move the .exe to it's own folder.\n\nPress 'no' to quit.", "OsuReplayViewer", MessageBoxButtons.YesNo);

            if (res != DialogResult.Yes)
            {
                return(false);
            }
            shouldCheckUpdate = false;
            using (Maintenance.Updater updater = new Maintenance.Updater())
            {
                updater.Run();
            }
            return(true);
        }