Exemple #1
0
        private void ListAllBeatmaps(object sender, object data = null)
        {
            var fileLocation = _userDialogs.SaveFile("Where list of all maps should be saved?", "Txt(.txt)|*.txt|Html(.html)|*.html");

            if (fileLocation == string.Empty)
            {
                return;
            }
            var listGenerator          = new ListGenerator();
            var CollectionListSaveType = Path.GetExtension(fileLocation).ToLower() == ".txt"
                ? CollectionManagerExtensionsDll.Enums.CollectionListSaveType.Txt
                : CollectionManagerExtensionsDll.Enums.CollectionListSaveType.Html;
            var contents = listGenerator.GetAllMapsList(Initalizer.LoadedCollections, CollectionListSaveType);

            File.WriteAllText(fileLocation, contents);
        }
        private void SaveCollections()
        {
            var fileLocation = _userDialogs.SaveFile("Where collection file should be saved?", "osu! Collection database (.db)|*.db|CM database (.osdb)|*.osdb");

            if (fileLocation == string.Empty)
            {
                return;
            }
            _osuFileIo.CollectionLoader.SaveCollection(Initalizer.LoadedCollections, fileLocation);
        }