From b6dc9131b7dc4c9bd0d332620236f6ca88277139 Mon Sep 17 00:00:00 2001 From: NotImplementedLife Date: Sat, 29 Jul 2023 09:20:48 +0300 Subject: [PATCH] updated datatable export --- Controls/MusicOrderViewer.cs | 2 +- MainForm.Exports.cs | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Controls/MusicOrderViewer.cs b/Controls/MusicOrderViewer.cs index 04be74e..05cd241 100644 --- a/Controls/MusicOrderViewer.cs +++ b/Controls/MusicOrderViewer.cs @@ -18,7 +18,7 @@ namespace TaikoSoundEditor.Controls internal WordList WordList { get; set; } - private List SongCards = new(); + public List SongCards { get; } = new(); public void AddSong(MusicOrder mo) { diff --git a/MainForm.Exports.cs b/MainForm.Exports.cs index 689d372..1712906 100644 --- a/MainForm.Exports.cs +++ b/MainForm.Exports.cs @@ -15,11 +15,12 @@ namespace TaikoSoundEditor var ma = new MusicAttributes(); ma.Items.AddRange(MusicAttributes.Items); - ma.Items.AddRange(AddedMusic.Select(_ => _.MusicAttribute)); + //ma.Items.AddRange(AddedMusic.Select(_ => _.MusicAttribute)); var mo = new MusicOrders(); + mo.Items.AddRange(MusicOrderViewer.SongCards.Select(_ => _.MusicOrder)); - var mbyg = MusicOrders.Items.GroupBy(_ => _.GenreNo).Select(_ => (_.Key, List: _.ToList())).ToDictionary(_ => _.Key, _ => _.List); + /*var mbyg = MusicOrders.Items.GroupBy(_ => _.GenreNo).Select(_ => (_.Key, List: _.ToList())).ToDictionary(_ => _.Key, _ => _.List); foreach (var m in AddedMusic.Select(_ => _.MusicOrder)) { @@ -31,11 +32,11 @@ namespace TaikoSoundEditor foreach (var key in mbyg.Keys.OrderBy(_ => _)) { mo.Items.AddRange(mbyg[key]); - } + }*/ var wl = new WordList(); wl.Items.AddRange(WordList.Items); - wl.Items.AddRange(AddedMusic.Select(_ => new List() { _.Word, _.WordSub, _.WordDetail }).SelectMany(_ => _)); + //wl.Items.AddRange(AddedMusic.Select(_ => new List() { _.Word, _.WordSub, _.WordDetail }).SelectMany(_ => _)); var jmi = JsonFix(Json.Serialize(mi, !DatatableSpaces.Checked)); var jma = JsonFix(Json.Serialize(ma));