示例#1
0
 static void Main()
 {
     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;
         }
     }
     MainForm form = new MainForm();
     form.SetSettings(settings);
     form.Show();
     form.Canvas = new Canvas(form.GetPictureBoxHandle(), form);
     form.Canvas.Run();
 }