Update Banner json output format

This commit is contained in:
2022-05-21 16:29:31 +08:00
parent ed9b393478
commit b37ead7acf
4 changed files with 1424 additions and 1285 deletions

View File

@ -173,9 +173,9 @@ namespace GrasscutterTools.Forms
// //
// CmbPrefab // CmbPrefab
// //
resources.ApplyResources(this.CmbPrefab, "CmbPrefab");
this.CmbPrefab.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CmbPrefab.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CmbPrefab.FormattingEnabled = true; this.CmbPrefab.FormattingEnabled = true;
resources.ApplyResources(this.CmbPrefab, "CmbPrefab");
this.CmbPrefab.Name = "CmbPrefab"; this.CmbPrefab.Name = "CmbPrefab";
// //
// LblEventChance4Tip // LblEventChance4Tip
@ -305,13 +305,13 @@ namespace GrasscutterTools.Forms
// //
// CmbBannerType // CmbBannerType
// //
resources.ApplyResources(this.CmbBannerType, "CmbBannerType");
this.CmbBannerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CmbBannerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CmbBannerType.FormattingEnabled = true; this.CmbBannerType.FormattingEnabled = true;
this.CmbBannerType.Items.AddRange(new object[] { this.CmbBannerType.Items.AddRange(new object[] {
resources.GetString("CmbBannerType.Items"), resources.GetString("CmbBannerType.Items"),
resources.GetString("CmbBannerType.Items1"), resources.GetString("CmbBannerType.Items1"),
resources.GetString("CmbBannerType.Items2")}); resources.GetString("CmbBannerType.Items2")});
resources.ApplyResources(this.CmbBannerType, "CmbBannerType");
this.CmbBannerType.Name = "CmbBannerType"; this.CmbBannerType.Name = "CmbBannerType";
// //
// LblSortIdTip // LblSortIdTip
@ -358,11 +358,11 @@ namespace GrasscutterTools.Forms
// //
// ListFallbackItems // ListFallbackItems
// //
resources.ApplyResources(this.ListFallbackItems, "ListFallbackItems");
this.ListFallbackItems.CheckBoxes = true; this.ListFallbackItems.CheckBoxes = true;
this.ListFallbackItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.ListFallbackItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.ColFallbackId, this.ColFallbackId,
this.ColFallbackName}); this.ColFallbackName});
resources.ApplyResources(this.ListFallbackItems, "ListFallbackItems");
this.ListFallbackItems.FullRowSelect = true; this.ListFallbackItems.FullRowSelect = true;
this.ListFallbackItems.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { this.ListFallbackItems.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] {
((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListFallbackItems.Groups"))), ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListFallbackItems.Groups"))),
@ -393,11 +393,11 @@ namespace GrasscutterTools.Forms
// //
// ListUpItems // ListUpItems
// //
resources.ApplyResources(this.ListUpItems, "ListUpItems");
this.ListUpItems.CheckBoxes = true; this.ListUpItems.CheckBoxes = true;
this.ListUpItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.ListUpItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.ColUpId, this.ColUpId,
this.ColUpName}); this.ColUpName});
resources.ApplyResources(this.ListUpItems, "ListUpItems");
this.ListUpItems.FullRowSelect = true; this.ListUpItems.FullRowSelect = true;
this.ListUpItems.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { this.ListUpItems.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] {
((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListUpItems.Groups"))), ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListUpItems.Groups"))),

View File

@ -292,7 +292,11 @@ namespace GrasscutterTools.Forms
{ {
var banner = ParseBanner(); var banner = ParseBanner();
if (banner != null) if (banner != null)
TxtJson.Text = JsonConvert.SerializeObject(banner, Formatting.Indented); {
var json = JsonConvert.SerializeObject(banner);
json = json.Replace(",\"", ",\r\n \"").Insert(1, "\r\n ");
TxtJson.Text = json.Insert(json.Length-1, "\r\n");
}
} }
catch (Exception ex) catch (Exception ex)
{ {

File diff suppressed because it is too large Load Diff

View File

@ -124,6 +124,7 @@ namespace GrasscutterTools.Forms
private void LoadUpdate() private void LoadUpdate()
{ {
#if !DEBUG
Task.Run(() => Task.Run(() =>
{ {
try try
@ -151,11 +152,10 @@ namespace GrasscutterTools.Forms
} }
catch (Exception) catch (Exception)
{ {
#if DEBUG
throw; throw;
#endif
} }
}); });
#endif
} }
#endregion - - #endregion - -