Add Activity Config Editor (CHS Only)

This commit is contained in:
2023-05-08 22:53:40 +08:00
parent f4ec2ee5fa
commit 226742776f
18 changed files with 1736 additions and 517 deletions

View File

@ -67,6 +67,9 @@
<setting name="NavContainerSplitterDistance" serializeAs="String"> <setting name="NavContainerSplitterDistance" serializeAs="String">
<value>0</value> <value>0</value>
</setting> </setting>
<setting name="ActivityConfigJsonPath" serializeAs="String">
<value />
</setting>
</GrasscutterTools.Properties.Settings> </GrasscutterTools.Properties.Settings>
</userSettings> </userSettings>
</configuration> </configuration>

View File

@ -0,0 +1,448 @@
namespace GrasscutterTools.Forms
{
partial class FormActivityEditor
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.BtnSave = new System.Windows.Forms.Button();
this.BtnLoad = new System.Windows.Forms.Button();
this.ActivityConfigJsonPath = new System.Windows.Forms.TextBox();
this.LblActivityConfigJsonPath = new System.Windows.Forms.Label();
this.GrpAllActivity = new System.Windows.Forms.GroupBox();
this.ListAllActivity = new System.Windows.Forms.ListView();
this.GrpFileActivity = new System.Windows.Forms.GroupBox();
this.GrpActivityInfo = new System.Windows.Forms.GroupBox();
this.LblActivityTitle = new System.Windows.Forms.Label();
this.LblActivityParmEditTip = new System.Windows.Forms.Label();
this.BtnDelete = new System.Windows.Forms.Button();
this.BtnAddOrUpdate = new System.Windows.Forms.Button();
this.DTPEndTime = new System.Windows.Forms.DateTimePicker();
this.DTPBeginTime = new System.Windows.Forms.DateTimePicker();
this.TxtMeetCondList = new System.Windows.Forms.TextBox();
this.NUDScheduleId = new System.Windows.Forms.NumericUpDown();
this.NUDActivityType = new System.Windows.Forms.NumericUpDown();
this.NUDActivityId = new System.Windows.Forms.NumericUpDown();
this.LblEndTime = new System.Windows.Forms.Label();
this.LblBeginTime = new System.Windows.Forms.Label();
this.LblMeetCondList = new System.Windows.Forms.Label();
this.LblScheduleId = new System.Windows.Forms.Label();
this.LblActivityType = new System.Windows.Forms.Label();
this.LblActivityId = new System.Windows.Forms.Label();
this.ColumnActivityName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ColumnActivityId = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ListActivityConfigItems = new System.Windows.Forms.ListView();
this.ColActivityId = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ColActivityTitle = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ColActivityBeginTime = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ColActivityEndTime = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.GrpAllActivity.SuspendLayout();
this.GrpFileActivity.SuspendLayout();
this.GrpActivityInfo.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NUDScheduleId)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUDActivityType)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUDActivityId)).BeginInit();
this.SuspendLayout();
//
// BtnSave
//
this.BtnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnSave.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.BtnSave.Location = new System.Drawing.Point(776, 12);
this.BtnSave.Name = "BtnSave";
this.BtnSave.Size = new System.Drawing.Size(100, 23);
this.BtnSave.TabIndex = 3;
this.BtnSave.Text = "保存";
this.BtnSave.UseVisualStyleBackColor = true;
this.BtnSave.Click += new System.EventHandler(this.BtnSave_Click);
//
// BtnLoad
//
this.BtnLoad.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnLoad.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.BtnLoad.Location = new System.Drawing.Point(671, 12);
this.BtnLoad.Name = "BtnLoad";
this.BtnLoad.Size = new System.Drawing.Size(100, 23);
this.BtnLoad.TabIndex = 2;
this.BtnLoad.Text = "加载";
this.BtnLoad.UseVisualStyleBackColor = true;
this.BtnLoad.Click += new System.EventHandler(this.BtnLoad_Click);
//
// ActivityConfigJsonPath
//
this.ActivityConfigJsonPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ActivityConfigJsonPath.Location = new System.Drawing.Point(176, 12);
this.ActivityConfigJsonPath.Name = "ActivityConfigJsonPath";
this.ActivityConfigJsonPath.Size = new System.Drawing.Size(489, 23);
this.ActivityConfigJsonPath.TabIndex = 1;
//
// LblActivityConfigJsonPath
//
this.LblActivityConfigJsonPath.AutoSize = true;
this.LblActivityConfigJsonPath.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.LblActivityConfigJsonPath.Location = new System.Drawing.Point(17, 15);
this.LblActivityConfigJsonPath.Name = "LblActivityConfigJsonPath";
this.LblActivityConfigJsonPath.Size = new System.Drawing.Size(153, 17);
this.LblActivityConfigJsonPath.TabIndex = 0;
this.LblActivityConfigJsonPath.Text = "ActivityConfig.json 路径:";
//
// GrpAllActivity
//
this.GrpAllActivity.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.GrpAllActivity.Controls.Add(this.ListAllActivity);
this.GrpAllActivity.Location = new System.Drawing.Point(612, 41);
this.GrpAllActivity.Name = "GrpAllActivity";
this.GrpAllActivity.Size = new System.Drawing.Size(260, 328);
this.GrpAllActivity.TabIndex = 6;
this.GrpAllActivity.TabStop = false;
this.GrpAllActivity.Text = "已知活动 by dplek";
//
// ListAllActivity
//
this.ListAllActivity.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.ColumnActivityId,
this.ColumnActivityName});
this.ListAllActivity.Dock = System.Windows.Forms.DockStyle.Fill;
this.ListAllActivity.FullRowSelect = true;
this.ListAllActivity.HideSelection = false;
this.ListAllActivity.Location = new System.Drawing.Point(3, 19);
this.ListAllActivity.MultiSelect = false;
this.ListAllActivity.Name = "ListAllActivity";
this.ListAllActivity.Size = new System.Drawing.Size(254, 306);
this.ListAllActivity.TabIndex = 0;
this.ListAllActivity.UseCompatibleStateImageBehavior = false;
this.ListAllActivity.View = System.Windows.Forms.View.Details;
this.ListAllActivity.SelectedIndexChanged += new System.EventHandler(this.ListAllActivity_SelectedIndexChanged);
//
// GrpFileActivity
//
this.GrpFileActivity.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.GrpFileActivity.Controls.Add(this.ListActivityConfigItems);
this.GrpFileActivity.Location = new System.Drawing.Point(12, 41);
this.GrpFileActivity.Name = "GrpFileActivity";
this.GrpFileActivity.Size = new System.Drawing.Size(260, 328);
this.GrpFileActivity.TabIndex = 4;
this.GrpFileActivity.TabStop = false;
this.GrpFileActivity.Text = "当前文件";
//
// GrpActivityInfo
//
this.GrpActivityInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.GrpActivityInfo.Controls.Add(this.LblActivityTitle);
this.GrpActivityInfo.Controls.Add(this.LblActivityParmEditTip);
this.GrpActivityInfo.Controls.Add(this.BtnDelete);
this.GrpActivityInfo.Controls.Add(this.BtnAddOrUpdate);
this.GrpActivityInfo.Controls.Add(this.DTPEndTime);
this.GrpActivityInfo.Controls.Add(this.DTPBeginTime);
this.GrpActivityInfo.Controls.Add(this.TxtMeetCondList);
this.GrpActivityInfo.Controls.Add(this.NUDScheduleId);
this.GrpActivityInfo.Controls.Add(this.NUDActivityType);
this.GrpActivityInfo.Controls.Add(this.NUDActivityId);
this.GrpActivityInfo.Controls.Add(this.LblEndTime);
this.GrpActivityInfo.Controls.Add(this.LblBeginTime);
this.GrpActivityInfo.Controls.Add(this.LblMeetCondList);
this.GrpActivityInfo.Controls.Add(this.LblScheduleId);
this.GrpActivityInfo.Controls.Add(this.LblActivityType);
this.GrpActivityInfo.Controls.Add(this.LblActivityId);
this.GrpActivityInfo.Location = new System.Drawing.Point(278, 41);
this.GrpActivityInfo.Name = "GrpActivityInfo";
this.GrpActivityInfo.Size = new System.Drawing.Size(328, 328);
this.GrpActivityInfo.TabIndex = 5;
this.GrpActivityInfo.TabStop = false;
this.GrpActivityInfo.Text = "活动信息";
//
// LblActivityTitle
//
this.LblActivityTitle.AutoEllipsis = true;
this.LblActivityTitle.ForeColor = System.Drawing.SystemColors.GrayText;
this.LblActivityTitle.Location = new System.Drawing.Point(173, 45);
this.LblActivityTitle.Name = "LblActivityTitle";
this.LblActivityTitle.Size = new System.Drawing.Size(134, 17);
this.LblActivityTitle.TabIndex = 2;
this.LblActivityTitle.Text = "活动名称";
//
// LblActivityParmEditTip
//
this.LblActivityParmEditTip.AutoSize = true;
this.LblActivityParmEditTip.ForeColor = System.Drawing.SystemColors.GrayText;
this.LblActivityParmEditTip.Location = new System.Drawing.Point(40, 251);
this.LblActivityParmEditTip.Name = "LblActivityParmEditTip";
this.LblActivityParmEditTip.Size = new System.Drawing.Size(248, 17);
this.LblActivityParmEditTip.TabIndex = 13;
this.LblActivityParmEditTip.Text = "提示:通常情况下你只需要修改活动进行时间";
//
// BtnDelete
//
this.BtnDelete.Enabled = false;
this.BtnDelete.Location = new System.Drawing.Point(199, 271);
this.BtnDelete.Name = "BtnDelete";
this.BtnDelete.Size = new System.Drawing.Size(89, 30);
this.BtnDelete.TabIndex = 15;
this.BtnDelete.Text = "- 删除";
this.BtnDelete.UseVisualStyleBackColor = true;
this.BtnDelete.Click += new System.EventHandler(this.BtnDelete_Click);
//
// BtnAddOrUpdate
//
this.BtnAddOrUpdate.Location = new System.Drawing.Point(43, 271);
this.BtnAddOrUpdate.Name = "BtnAddOrUpdate";
this.BtnAddOrUpdate.Size = new System.Drawing.Size(150, 30);
this.BtnAddOrUpdate.TabIndex = 14;
this.BtnAddOrUpdate.Text = "√ 添加或更新";
this.BtnAddOrUpdate.UseVisualStyleBackColor = true;
this.BtnAddOrUpdate.Click += new System.EventHandler(this.BtnAddOrUpdate_Click);
//
// DTPEndTime
//
this.DTPEndTime.Location = new System.Drawing.Point(107, 188);
this.DTPEndTime.Name = "DTPEndTime";
this.DTPEndTime.Size = new System.Drawing.Size(200, 23);
this.DTPEndTime.TabIndex = 12;
//
// DTPBeginTime
//
this.DTPBeginTime.Location = new System.Drawing.Point(107, 159);
this.DTPBeginTime.Name = "DTPBeginTime";
this.DTPBeginTime.Size = new System.Drawing.Size(200, 23);
this.DTPBeginTime.TabIndex = 10;
//
// TxtMeetCondList
//
this.TxtMeetCondList.Location = new System.Drawing.Point(107, 130);
this.TxtMeetCondList.Name = "TxtMeetCondList";
this.TxtMeetCondList.Size = new System.Drawing.Size(200, 23);
this.TxtMeetCondList.TabIndex = 8;
//
// NUDScheduleId
//
this.NUDScheduleId.Location = new System.Drawing.Point(107, 101);
this.NUDScheduleId.Maximum = new decimal(new int[] {
2147483647,
0,
0,
0});
this.NUDScheduleId.Name = "NUDScheduleId";
this.NUDScheduleId.Size = new System.Drawing.Size(80, 23);
this.NUDScheduleId.TabIndex = 6;
//
// NUDActivityType
//
this.NUDActivityType.Location = new System.Drawing.Point(107, 72);
this.NUDActivityType.Maximum = new decimal(new int[] {
2147483647,
0,
0,
0});
this.NUDActivityType.Name = "NUDActivityType";
this.NUDActivityType.Size = new System.Drawing.Size(60, 23);
this.NUDActivityType.TabIndex = 4;
//
// NUDActivityId
//
this.NUDActivityId.Location = new System.Drawing.Point(107, 43);
this.NUDActivityId.Maximum = new decimal(new int[] {
2147483647,
0,
0,
0});
this.NUDActivityId.Name = "NUDActivityId";
this.NUDActivityId.Size = new System.Drawing.Size(60, 23);
this.NUDActivityId.TabIndex = 1;
this.NUDActivityId.ValueChanged += new System.EventHandler(this.NUDActivityId_ValueChanged);
//
// LblEndTime
//
this.LblEndTime.AutoSize = true;
this.LblEndTime.Location = new System.Drawing.Point(21, 193);
this.LblEndTime.Name = "LblEndTime";
this.LblEndTime.Size = new System.Drawing.Size(80, 17);
this.LblEndTime.TabIndex = 11;
this.LblEndTime.Text = "活动结束时间";
//
// LblBeginTime
//
this.LblBeginTime.AutoSize = true;
this.LblBeginTime.Location = new System.Drawing.Point(21, 164);
this.LblBeginTime.Name = "LblBeginTime";
this.LblBeginTime.Size = new System.Drawing.Size(80, 17);
this.LblBeginTime.TabIndex = 9;
this.LblBeginTime.Text = "活动开始时间";
//
// LblMeetCondList
//
this.LblMeetCondList.AutoSize = true;
this.LblMeetCondList.Location = new System.Drawing.Point(21, 133);
this.LblMeetCondList.Name = "LblMeetCondList";
this.LblMeetCondList.Size = new System.Drawing.Size(80, 17);
this.LblMeetCondList.TabIndex = 7;
this.LblMeetCondList.Text = "满足条件列表";
//
// LblScheduleId
//
this.LblScheduleId.AutoSize = true;
this.LblScheduleId.Location = new System.Drawing.Point(21, 103);
this.LblScheduleId.Name = "LblScheduleId";
this.LblScheduleId.Size = new System.Drawing.Size(45, 17);
this.LblScheduleId.TabIndex = 5;
this.LblScheduleId.Text = "计划ID";
//
// LblActivityType
//
this.LblActivityType.AutoSize = true;
this.LblActivityType.Location = new System.Drawing.Point(21, 74);
this.LblActivityType.Name = "LblActivityType";
this.LblActivityType.Size = new System.Drawing.Size(56, 17);
this.LblActivityType.TabIndex = 3;
this.LblActivityType.Text = "活动类型";
//
// LblActivityId
//
this.LblActivityId.AutoSize = true;
this.LblActivityId.Location = new System.Drawing.Point(21, 45);
this.LblActivityId.Name = "LblActivityId";
this.LblActivityId.Size = new System.Drawing.Size(45, 17);
this.LblActivityId.TabIndex = 0;
this.LblActivityId.Text = "活动ID";
//
// ColumnActivityName
//
this.ColumnActivityName.Text = "活动名称";
this.ColumnActivityName.Width = 300;
//
// ColumnActivityId
//
this.ColumnActivityId.Text = "ID";
this.ColumnActivityId.Width = 50;
//
// ListActivityConfigItems
//
this.ListActivityConfigItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.ColActivityId,
this.ColActivityTitle,
this.ColActivityBeginTime,
this.ColActivityEndTime});
this.ListActivityConfigItems.Dock = System.Windows.Forms.DockStyle.Fill;
this.ListActivityConfigItems.FullRowSelect = true;
this.ListActivityConfigItems.HideSelection = false;
this.ListActivityConfigItems.Location = new System.Drawing.Point(3, 19);
this.ListActivityConfigItems.MultiSelect = false;
this.ListActivityConfigItems.Name = "ListActivityConfigItems";
this.ListActivityConfigItems.Size = new System.Drawing.Size(254, 306);
this.ListActivityConfigItems.TabIndex = 0;
this.ListActivityConfigItems.UseCompatibleStateImageBehavior = false;
this.ListActivityConfigItems.View = System.Windows.Forms.View.Details;
this.ListActivityConfigItems.SelectedIndexChanged += new System.EventHandler(this.ListActivityConfigItems_SelectedIndexChanged);
//
// ColActivityId
//
this.ColActivityId.Text = "ID";
this.ColActivityId.Width = 50;
//
// ColActivityTitle
//
this.ColActivityTitle.Text = "活动名称";
this.ColActivityTitle.Width = 150;
//
// ColActivityBeginTime
//
this.ColActivityBeginTime.Text = "开始时间";
this.ColActivityBeginTime.Width = 120;
//
// ColActivityEndTime
//
this.ColActivityEndTime.Text = "结束时间";
this.ColActivityEndTime.Width = 120;
//
// FormActivityEditor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(884, 381);
this.Controls.Add(this.GrpAllActivity);
this.Controls.Add(this.GrpActivityInfo);
this.Controls.Add(this.GrpFileActivity);
this.Controls.Add(this.BtnSave);
this.Controls.Add(this.BtnLoad);
this.Controls.Add(this.ActivityConfigJsonPath);
this.Controls.Add(this.LblActivityConfigJsonPath);
this.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.Margin = new System.Windows.Forms.Padding(4);
this.MinimumSize = new System.Drawing.Size(900, 420);
this.Name = "FormActivityEditor";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "ActivityConfig.json Editor";
this.GrpAllActivity.ResumeLayout(false);
this.GrpFileActivity.ResumeLayout(false);
this.GrpActivityInfo.ResumeLayout(false);
this.GrpActivityInfo.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.NUDScheduleId)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUDActivityType)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUDActivityId)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button BtnSave;
private System.Windows.Forms.Button BtnLoad;
private System.Windows.Forms.TextBox ActivityConfigJsonPath;
private System.Windows.Forms.Label LblActivityConfigJsonPath;
private System.Windows.Forms.GroupBox GrpAllActivity;
private System.Windows.Forms.GroupBox GrpFileActivity;
private System.Windows.Forms.GroupBox GrpActivityInfo;
private System.Windows.Forms.ListView ListAllActivity;
private System.Windows.Forms.Label LblEndTime;
private System.Windows.Forms.Label LblBeginTime;
private System.Windows.Forms.Label LblMeetCondList;
private System.Windows.Forms.Label LblScheduleId;
private System.Windows.Forms.Label LblActivityType;
private System.Windows.Forms.Label LblActivityId;
private System.Windows.Forms.Button BtnDelete;
private System.Windows.Forms.Button BtnAddOrUpdate;
private System.Windows.Forms.DateTimePicker DTPEndTime;
private System.Windows.Forms.DateTimePicker DTPBeginTime;
private System.Windows.Forms.TextBox TxtMeetCondList;
private System.Windows.Forms.NumericUpDown NUDScheduleId;
private System.Windows.Forms.NumericUpDown NUDActivityType;
private System.Windows.Forms.NumericUpDown NUDActivityId;
private System.Windows.Forms.Label LblActivityParmEditTip;
private System.Windows.Forms.Label LblActivityTitle;
private System.Windows.Forms.ColumnHeader ColumnActivityId;
private System.Windows.Forms.ColumnHeader ColumnActivityName;
private System.Windows.Forms.ListView ListActivityConfigItems;
private System.Windows.Forms.ColumnHeader ColActivityId;
private System.Windows.Forms.ColumnHeader ColActivityTitle;
private System.Windows.Forms.ColumnHeader ColActivityBeginTime;
private System.Windows.Forms.ColumnHeader ColActivityEndTime;
}
}

View File

@ -0,0 +1,301 @@
/**
* Grasscutter Tools
* Copyright (C) 2023 jie65535
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
**/
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using GrasscutterTools.Game;
using GrasscutterTools.Game.Activity;
using GrasscutterTools.Properties;
using GrasscutterTools.Utils;
using Newtonsoft.Json;
namespace GrasscutterTools.Forms
{
public partial class FormActivityEditor : Form
{
#region - -
private List<ActivityConfigItem> ActivityConfigItems;
#endregion - -
#region - -
public FormActivityEditor()
{
InitializeComponent();
Icon = Resources.IconGrasscutter;
DTPBeginTime.Value = DateTime.Today;
DTPEndTime.Value = DateTime.Today.AddMonths(1);
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
LoadAllActivity();
try
{
// 加载文件路径
var path = Settings.Default.ActivityConfigJsonPath;
ActivityConfigJsonPath.Text = path;
if (!string.IsNullOrEmpty(path) && File.Exists(path))
LoadActivityConfig(path);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
protected override void OnFormClosed(FormClosedEventArgs e)
{
Settings.Default.ActivityConfigJsonPath = ActivityConfigJsonPath.Text;
base.OnFormClosed(e);
}
#endregion - -
#region - ActivityConfig.json -
/// <summary>
/// 加载按钮点击时触发
/// </summary>
private void BtnLoad_Click(object sender, EventArgs e)
{
try
{
var path = ActivityConfigJsonPath.Text.Trim();
if (path == string.Empty)
{
var dialog = new OpenFileDialog
{
FileName = "ActivityConfig.json",
Filter = "ActivityConfig.Json (*.json)|*.json|All files (*.*)|*.*",
};
var result = dialog.ShowDialog();
if (result == DialogResult.OK)
path = ActivityConfigJsonPath.Text = dialog.FileName;
else
return;
}
// 反序列化
LoadActivityConfig(path);
MessageBox.Show("OK", Resources.Tips, MessageBoxButtons.OK);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
/// <summary>
/// 加载活动配置
/// </summary>
/// <param name="path">ActivityConfig.json 文件路径</param>
private void LoadActivityConfig(string path)
{
ActivityConfigItems = JsonConvert.DeserializeObject<List<ActivityConfigItem>>(File.ReadAllText(path)) ?? new List<ActivityConfigItem>();
ListActivityConfigItems.BeginUpdate();
ListActivityConfigItems.Items.Clear();
ListActivityConfigItems.Items.AddRange(ActivityConfigItems.Select(Convert).ToArray());
ListActivityConfigItems.EndUpdate();
}
private ListViewItem Convert(ActivityConfigItem item)
{
return new ListViewItem(new[]
{
item.ActivityId.ToString(),
GameData.Activity[item.ActivityId],
item.BeginTime.ToShortDateString(),
item.EndTime.ToShortDateString(),
});
}
/// <summary>
/// 保存按钮点击时触发
/// </summary>
private void BtnSave_Click(object sender, EventArgs e)
{
try
{
var path = ActivityConfigJsonPath.Text.Trim();
if (path == string.Empty)
{
var dialog = new SaveFileDialog
{
FileName = "ActivityConfig.json",
Filter = "ActivityConfig.json (*.json)|*.json|All files (*.*)|*.*",
};
var result = dialog.ShowDialog();
if (result == DialogResult.OK)
path = ActivityConfigJsonPath.Text = dialog.FileName;
else
return;
}
// 序列化
File.WriteAllText(path, JsonConvert.SerializeObject(ActivityConfigItems, Formatting.Indented));
MessageBox.Show("OK", Resources.Tips, MessageBoxButtons.OK);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
#endregion - ActivityConfig.json -
#region - -
/// <summary>
/// 加载所有活动
/// </summary>
private void LoadAllActivity()
{
ListAllActivity.BeginUpdate();
foreach (var grp in GameData.Activity)
{
var grpControl = ListAllActivity.Groups.Add(grp.Key, grp.Key);
for (var i = 0; i < grp.Value.Count; i++)
{
ListAllActivity.Items.Add(new ListViewItem(new[]
{
grp.Value.Ids[i].ToString(), grp.Value.Names[i]
}, grpControl));
}
}
ListAllActivity.EndUpdate();
}
/// <summary>
/// 所有活动列表选中项改变时触发
/// </summary>
private void ListAllActivity_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
if (ListAllActivity.SelectedItems.Count == 0)
return;
NUDActivityId.Text = ListAllActivity.SelectedItems[0].Text;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
/// <summary>
/// 活动ID改变时触发
/// </summary>
private void NUDActivityId_ValueChanged(object sender, EventArgs e)
{
// 更新活动名称到提示文本
var activityId = (int)NUDActivityId.Value;
LblActivityTitle.Text = GameData.Activity[activityId];
// 检查是否在列表中,允许删除
var item = ActivityConfigItems.Find(it => it.ActivityId == activityId);
BtnDelete.Enabled = item != null;
}
/// <summary>
/// 点击添加或更新按钮时触发
/// </summary>
private async void BtnAddOrUpdate_Click(object sender, EventArgs e)
{
var activityId = (int)NUDActivityId.Value;
var item = ActivityConfigItems.Find(it => it.ActivityId == activityId);
if (item == null)
{
item = new ActivityConfigItem();
ActivityConfigItems.Add(item);
ListActivityConfigItems.Items.Add(Convert(item));
}
item.ActivityType = (int)NUDActivityType.Value;
item.ScheduleId = (int)NUDScheduleId.Value;
try
{
item.MeetCondList = TxtMeetCondList.Text.Split(',').Select(it => int.Parse(it.Trim())).ToList();
}
catch (Exception ex)
{
item.MeetCondList = new List<int>();
}
if (DTPBeginTime.Value > DTPEndTime.Value)
{
// ?
}
item.BeginTime = DTPBeginTime.Value.Date;
item.EndTime = DTPEndTime.Value.Date.AddDays(1).AddSeconds(-1);
BtnDelete.Enabled = true;
await UIUtil.ButtonComplete(BtnAddOrUpdate);
}
/// <summary>
/// 点击删除按钮时触发
/// </summary>
private void BtnDelete_Click(object sender, EventArgs e)
{
var activityId = (int)NUDActivityId.Value;
var index = ActivityConfigItems.FindIndex(it => it.ActivityId == activityId);
if (index != -1)
{
ListActivityConfigItems.Items.RemoveAt(index);
ActivityConfigItems.RemoveAt(index);
}
BtnDelete.Enabled = false;
}
/// <summary>
/// 当前文件活动配置列表选中项改变时触发
/// </summary>
private void ListActivityConfigItems_SelectedIndexChanged(object sender, EventArgs e)
{
if (ListActivityConfigItems.SelectedItems.Count == 0)
return;
var index = ListActivityConfigItems.SelectedIndices[0];
var configItem = ActivityConfigItems[index];
NUDActivityId.Value = configItem.ActivityId;
NUDActivityType.Value = configItem.ActivityType;
NUDScheduleId.Value = configItem.ScheduleId;
TxtMeetCondList.Text = configItem.MeetCondList?.Count > 0
? string.Join(",", configItem.MeetCondList)
: string.Empty;
DTPBeginTime.Value = configItem.BeginTime;
DTPEndTime.Value = configItem.EndTime;
}
#endregion - -
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,65 @@
/**
* Grasscutter Tools
* Copyright (C) 2023 jie65535
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
**/
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace GrasscutterTools.Game.Activity
{
public class ActivityConfigItem
{
/// <summary>
/// 活动ID
/// </summary>
[JsonProperty("activityId")]
public int ActivityId { get; set; }
/// <summary>
/// 活动类型
/// </summary>
[JsonProperty("activityType")]
public int ActivityType { get; set; }
/// <summary>
/// 调度ID
/// </summary>
[JsonProperty("scheduleId")]
public int ScheduleId { get; set; }
/// <summary>
/// 满足条件列表
/// </summary>
[JsonProperty("meetCondList")]
public List<int> MeetCondList { get; set; }
/// <summary>
/// 活动开始时间
/// </summary>
[JsonProperty("beginTime")]
public DateTime BeginTime { get; set; }
/// <summary>
/// 活动结束时间
/// </summary>
[JsonProperty("endTime")]
public DateTime EndTime { get; set; }
}
}

View File

@ -26,6 +26,7 @@ namespace GrasscutterTools.Game
public static void LoadResources() public static void LoadResources()
{ {
Achievements = new ItemMap(Resources.Achievement); Achievements = new ItemMap(Resources.Achievement);
Activity = new ItemMapGroup(Resources.Activity);
Artifacts = new ItemMap(Resources.Artifact); Artifacts = new ItemMap(Resources.Artifact);
ArtifactCats = new ItemMap(Resources.ArtifactCat); ArtifactCats = new ItemMap(Resources.ArtifactCat);
ArtifactMainAttribution = new ItemMap(Resources.ArtifactMainAttribution); ArtifactMainAttribution = new ItemMap(Resources.ArtifactMainAttribution);
@ -46,6 +47,9 @@ namespace GrasscutterTools.Game
} }
public static ItemMap Achievements { get; private set; } public static ItemMap Achievements { get; private set; }
public static ItemMapGroup Activity { get; private set; }
public static ItemMap Artifacts { get; private set; } public static ItemMap Artifacts { get; private set; }
public static ItemMap ArtifactCats { get; private set; } public static ItemMap ArtifactCats { get; private set; }

View File

@ -87,6 +87,12 @@
<ItemGroup> <ItemGroup>
<Compile Include="DispatchServer\DispatchServerAPI.cs" /> <Compile Include="DispatchServer\DispatchServerAPI.cs" />
<Compile Include="DispatchServer\Model\ServerStatus.cs" /> <Compile Include="DispatchServer\Model\ServerStatus.cs" />
<Compile Include="Forms\FormActivityEditor.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\FormActivityEditor.Designer.cs">
<DependentUpon>FormActivityEditor.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FormDropEditor.cs"> <Compile Include="Forms\FormDropEditor.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -129,6 +135,7 @@
<Compile Include="Forms\FormTextMapBrowser.Designer.cs"> <Compile Include="Forms\FormTextMapBrowser.Designer.cs">
<DependentUpon>FormTextMapBrowser.cs</DependentUpon> <DependentUpon>FormTextMapBrowser.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Game\Activity\ActivityConfigItem.cs" />
<Compile Include="Game\CommandVersion.cs" /> <Compile Include="Game\CommandVersion.cs" />
<Compile Include="Game\Drop\DropData.cs" /> <Compile Include="Game\Drop\DropData.cs" />
<Compile Include="Game\Drop\DropInfo.cs" /> <Compile Include="Game\Drop\DropInfo.cs" />
@ -269,6 +276,9 @@
<Compile Include="Utils\Logger.cs" /> <Compile Include="Utils\Logger.cs" />
<Compile Include="Utils\GithubHelper.cs" /> <Compile Include="Utils\GithubHelper.cs" />
<Compile Include="Utils\UIUtil.cs" /> <Compile Include="Utils\UIUtil.cs" />
<EmbeddedResource Include="Forms\FormActivityEditor.resx">
<DependentUpon>FormActivityEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FormDropEditor.en-US.resx"> <EmbeddedResource Include="Forms\FormDropEditor.en-US.resx">
<DependentUpon>FormDropEditor.cs</DependentUpon> <DependentUpon>FormDropEditor.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -370,9 +380,18 @@
<EmbeddedResource Include="Pages\PageAbout.zh-TW.resx"> <EmbeddedResource Include="Pages\PageAbout.zh-TW.resx">
<DependentUpon>PageAbout.cs</DependentUpon> <DependentUpon>PageAbout.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Pages\PageAchievement.en-US.resx">
<DependentUpon>PageAchievement.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Pages\PageAchievement.resx"> <EmbeddedResource Include="Pages\PageAchievement.resx">
<DependentUpon>PageAchievement.cs</DependentUpon> <DependentUpon>PageAchievement.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Pages\PageAchievement.ru-RU.resx">
<DependentUpon>PageAchievement.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Pages\PageAchievement.zh-TW.resx">
<DependentUpon>PageAchievement.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Pages\PageAvatar.en-US.resx"> <EmbeddedResource Include="Pages\PageAvatar.en-US.resx">
<DependentUpon>PageAvatar.cs</DependentUpon> <DependentUpon>PageAvatar.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -628,6 +647,7 @@
<Content Include="Resources\Permissions.txt" /> <Content Include="Resources\Permissions.txt" />
<Content Include="Resources\WeaponColor.txt" /> <Content Include="Resources\WeaponColor.txt" />
<Content Include="Resources\zh-cn\Achievement.txt" /> <Content Include="Resources\zh-cn\Achievement.txt" />
<Content Include="Resources\zh-cn\Activity.txt" />
<Content Include="Resources\zh-cn\ArtifactCat.txt" /> <Content Include="Resources\zh-cn\ArtifactCat.txt" />
<Content Include="Resources\zh-cn\ArtifactMainAttribution.txt" /> <Content Include="Resources\zh-cn\ArtifactMainAttribution.txt" />
<Content Include="Resources\zh-cn\Artifact.txt" /> <Content Include="Resources\zh-cn\Artifact.txt" />
@ -682,5 +702,6 @@
<Version>4.3.0</Version> <Version>4.3.0</Version>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View File

@ -45,6 +45,7 @@
this.NUDUid = new System.Windows.Forms.NumericUpDown(); this.NUDUid = new System.Windows.Forms.NumericUpDown();
this.ChkIncludeUID = new System.Windows.Forms.CheckBox(); this.ChkIncludeUID = new System.Windows.Forms.CheckBox();
this.LblDefaultUid = new System.Windows.Forms.Label(); this.LblDefaultUid = new System.Windows.Forms.Label();
this.BtnActivityEditor = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.GrasscutterToolsIcon)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.GrasscutterToolsIcon)).BeginInit();
this.GrpSettings.SuspendLayout(); this.GrpSettings.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NUDUid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDUid)).BeginInit();
@ -118,9 +119,9 @@
// //
// CmbGcVersions // CmbGcVersions
// //
resources.ApplyResources(this.CmbGcVersions, "CmbGcVersions");
this.CmbGcVersions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CmbGcVersions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CmbGcVersions.FormattingEnabled = true; this.CmbGcVersions.FormattingEnabled = true;
resources.ApplyResources(this.CmbGcVersions, "CmbGcVersions");
this.CmbGcVersions.Name = "CmbGcVersions"; this.CmbGcVersions.Name = "CmbGcVersions";
// //
// ChkTopMost // ChkTopMost
@ -131,9 +132,9 @@
// //
// CmbLanguage // CmbLanguage
// //
resources.ApplyResources(this.CmbLanguage, "CmbLanguage");
this.CmbLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CmbLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CmbLanguage.FormattingEnabled = true; this.CmbLanguage.FormattingEnabled = true;
resources.ApplyResources(this.CmbLanguage, "CmbLanguage");
this.CmbLanguage.Name = "CmbLanguage"; this.CmbLanguage.Name = "CmbLanguage";
// //
// LblLanguage // LblLanguage
@ -167,10 +168,18 @@
resources.ApplyResources(this.LblDefaultUid, "LblDefaultUid"); resources.ApplyResources(this.LblDefaultUid, "LblDefaultUid");
this.LblDefaultUid.Name = "LblDefaultUid"; this.LblDefaultUid.Name = "LblDefaultUid";
// //
// BtnActivityEditor
//
resources.ApplyResources(this.BtnActivityEditor, "BtnActivityEditor");
this.BtnActivityEditor.Name = "BtnActivityEditor";
this.BtnActivityEditor.UseVisualStyleBackColor = true;
this.BtnActivityEditor.Click += new System.EventHandler(this.BtnActivityEditor_Click);
//
// PageHome // PageHome
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.BtnActivityEditor);
this.Controls.Add(this.LblAbout); this.Controls.Add(this.LblAbout);
this.Controls.Add(this.BtnOpenTextMap); this.Controls.Add(this.BtnOpenTextMap);
this.Controls.Add(this.BtnOpenGachaBannerEditor); this.Controls.Add(this.BtnOpenGachaBannerEditor);
@ -207,5 +216,6 @@
private System.Windows.Forms.NumericUpDown NUDUid; private System.Windows.Forms.NumericUpDown NUDUid;
private System.Windows.Forms.CheckBox ChkIncludeUID; private System.Windows.Forms.CheckBox ChkIncludeUID;
private System.Windows.Forms.Label LblDefaultUid; private System.Windows.Forms.Label LblDefaultUid;
private System.Windows.Forms.Button BtnActivityEditor;
} }
} }

View File

@ -152,6 +152,12 @@ namespace GrasscutterTools.Pages
private void BtnOpenShopEditor_Click(object sender, EventArgs e) private void BtnOpenShopEditor_Click(object sender, EventArgs e)
=> ShowForm<FormShopEditor>("ShopEditor"); => ShowForm<FormShopEditor>("ShopEditor");
/// <summary>
/// 点击打开活动编辑器时触发
/// </summary>
private void BtnActivityEditor_Click(object sender, EventArgs e)
=> ShowForm<FormActivityEditor>("ActivityEditor");
/// <summary> /// <summary>
/// 当选中语言改变时触发 /// 当选中语言改变时触发
/// </summary> /// </summary>
@ -194,5 +200,6 @@ namespace GrasscutterTools.Pages
LnkNewVersion.Visible = false; LnkNewVersion.Visible = false;
} }
} }
} }
} }

View File

@ -136,9 +136,6 @@
<data name="BtnOpenGachaBannerEditor.Text" xml:space="preserve"> <data name="BtnOpenGachaBannerEditor.Text" xml:space="preserve">
<value>Gacha Editor</value> <value>Gacha Editor</value>
</data> </data>
<data name="GrpSettings.Text" xml:space="preserve">
<value>Settings</value>
</data>
<data name="ChkTopMost.Size" type="System.Drawing.Size, System.Drawing"> <data name="ChkTopMost.Size" type="System.Drawing.Size, System.Drawing">
<value>109, 21</value> <value>109, 21</value>
</data> </data>
@ -151,4 +148,13 @@
<data name="ChkIncludeUID.Text" xml:space="preserve"> <data name="ChkIncludeUID.Text" xml:space="preserve">
<value>Include UID</value> <value>Include UID</value>
</data> </data>
<data name="GrpSettings.Text" xml:space="preserve">
<value>Settings</value>
</data>
<data name="BtnActivityEditor.Location" type="System.Drawing.Point, System.Drawing">
<value>542, 213</value>
</data>
<data name="BtnActivityEditor.Text" xml:space="preserve">
<value>Activity Editor</value>
</data>
</root> </root>

File diff suppressed because it is too large Load Diff

View File

@ -121,6 +121,10 @@
<data name="BtnOpenShopEditor.Size" type="System.Drawing.Size, System.Drawing"> <data name="BtnOpenShopEditor.Size" type="System.Drawing.Size, System.Drawing">
<value>140, 23</value> <value>140, 23</value>
</data> </data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="BtnOpenShopEditor.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="BtnOpenShopEditor.Text" xml:space="preserve"> <data name="BtnOpenShopEditor.Text" xml:space="preserve">
<value>Редактор магазина</value> <value>Редактор магазина</value>
</data> </data>
@ -130,6 +134,9 @@
<data name="BtnOpenDropEditor.Size" type="System.Drawing.Size, System.Drawing"> <data name="BtnOpenDropEditor.Size" type="System.Drawing.Size, System.Drawing">
<value>140, 23</value> <value>140, 23</value>
</data> </data>
<data name="BtnOpenDropEditor.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="BtnOpenDropEditor.Text" xml:space="preserve"> <data name="BtnOpenDropEditor.Text" xml:space="preserve">
<value>Редактор дропа</value> <value>Редактор дропа</value>
</data> </data>
@ -142,15 +149,31 @@
<data name="BtnOpenTextMap.Size" type="System.Drawing.Size, System.Drawing"> <data name="BtnOpenTextMap.Size" type="System.Drawing.Size, System.Drawing">
<value>140, 23</value> <value>140, 23</value>
</data> </data>
<data name="BtnOpenTextMap.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="BtnOpenTextMap.Text" xml:space="preserve"> <data name="BtnOpenTextMap.Text" xml:space="preserve">
<value>Браузер карт</value> <value>Браузер карт</value>
</data> </data>
<data name="BtnOpenGachaBannerEditor.Size" type="System.Drawing.Size, System.Drawing"> <data name="BtnOpenGachaBannerEditor.Size" type="System.Drawing.Size, System.Drawing">
<value>140, 23</value> <value>140, 23</value>
</data> </data>
<data name="BtnOpenGachaBannerEditor.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="BtnOpenGachaBannerEditor.Text" xml:space="preserve"> <data name="BtnOpenGachaBannerEditor.Text" xml:space="preserve">
<value>Редактор баннеров</value> <value>Редактор баннеров</value>
</data> </data>
<data name="GrasscutterToolsIcon.Size" type="System.Drawing.Size, System.Drawing">
<value>333, 146</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="GrasscutterToolsIcon.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="GrpSettings.Text" xml:space="preserve">
<value>Настройки</value>
</data>
<data name="ChkTopMost.Size" type="System.Drawing.Size, System.Drawing"> <data name="ChkTopMost.Size" type="System.Drawing.Size, System.Drawing">
<value>140, 21</value> <value>140, 21</value>
</data> </data>
@ -163,7 +186,16 @@
<data name="ChkIncludeUID.Text" xml:space="preserve"> <data name="ChkIncludeUID.Text" xml:space="preserve">
<value>Включить UID</value> <value>Включить UID</value>
</data> </data>
<data name="GrpSettings.Text" xml:space="preserve"> <data name="BtnActivityEditor.Location" type="System.Drawing.Point, System.Drawing">
<value>Настройки</value> <value>310, 155</value>
</data>
<data name="BtnActivityEditor.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 23</value>
</data>
<data name="BtnActivityEditor.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="BtnActivityEditor.Text" xml:space="preserve">
<value>Редактор активности</value>
</data> </data>
</root> </root>

View File

@ -135,4 +135,7 @@
<data name="ChkTopMost.Text" xml:space="preserve"> <data name="ChkTopMost.Text" xml:space="preserve">
<value>窗口置頂</value> <value>窗口置頂</value>
</data> </data>
<data name="BtnActivityEditor.Text" xml:space="preserve">
<value>活動編輯器</value>
</data>
</root> </root>

View File

@ -87,6 +87,53 @@ namespace GrasscutterTools.Properties {
} }
} }
/// <summary>
/// 查找类似 //Activity ids-3.6 by dplek
///// Activity
///2001:1.1未归的熄星
///2002:1.3海灯节
///2003:1.4风花节
///2004:1.5导能原盘-诸论
///2005:1.6盛夏!海岛?大冒险!
///2006:2.0谒索雷痕
///2007:2.1韶光抚月
///2008:2.2雾海悬谜境
///2009:2.3皑尘与白雪
///2010:2.4飞彩镌流年
///2011:2.5三界路飨祭
///2012:2.6堇庭华彩
///2013:2.7荒梦藏虞渊
///2014:2.8远海诗夏游纪
///2015:3.0雕琢童心
///2016:3.1杯中遥吟之歌
///2017:3.2智巧灵蕈大竞逐
///2018:3.3秋津森夜试胆会
///2019:3.4磬弦奏华夜
///2020:3.5风花的呼吸
///// 1.0
///1001:海灯节
///5001:元素烘炉test
///5002:且试身手
///5003:百货奇货
///// 1.1
///5004:映天之章
///5005:元素烘炉
///5006:佳肴尚温
///5007:飞行挑战
///// 1.2
///3001:白垩与黑龙
///5008:三清玲之章(废稿)
///5009:古闻之章(钟离传说-1
///5010:鲸天之章(公子传说-1
///5011:秘宝迷踪
///5012:百 [字符串的其余部分被截断]&quot;; 的本地化字符串。
/// </summary>
internal static string Activity {
get {
return ResourceManager.GetString("Activity", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 全部 的本地化字符串。 /// 查找类似 全部 的本地化字符串。
/// </summary> /// </summary>

View File

@ -360,4 +360,7 @@
<data name="PageAchievementTitle" xml:space="preserve"> <data name="PageAchievementTitle" xml:space="preserve">
<value>成就</value> <value>成就</value>
</data> </data>
<data name="Activity" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\zh-cn\Activity.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
</root> </root>

View File

@ -250,5 +250,17 @@ namespace GrasscutterTools.Properties {
this["NavContainerSplitterDistance"] = value; this["NavContainerSplitterDistance"] = value;
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string ActivityConfigJsonPath {
get {
return ((string)(this["ActivityConfigJsonPath"]));
}
set {
this["ActivityConfigJsonPath"] = value;
}
}
} }
} }

View File

@ -59,5 +59,8 @@
<Setting Name="NavContainerSplitterDistance" Type="System.Int32" Scope="User"> <Setting Name="NavContainerSplitterDistance" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value> <Value Profile="(Default)">0</Value>
</Setting> </Setting>
<Setting Name="ActivityConfigJsonPath" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

View File

@ -0,0 +1,203 @@
//Activity ids-3.6 by dplek
// Activity
2001:1.1未归的熄星
2002:1.3海灯节
2003:1.4风花节
2004:1.5导能原盘-诸论
2005:1.6盛夏!海岛?大冒险!
2006:2.0谒索雷痕
2007:2.1韶光抚月
2008:2.2雾海悬谜境
2009:2.3皑尘与白雪
2010:2.4飞彩镌流年
2011:2.5三界路飨祭
2012:2.6堇庭华彩
2013:2.7荒梦藏虞渊
2014:2.8远海诗夏游纪
2015:3.0雕琢童心
2016:3.1杯中遥吟之歌
2017:3.2智巧灵蕈大竞逐
2018:3.3秋津森夜试胆会
2019:3.4磬弦奏华夜
2020:3.5风花的呼吸
// 1.0
1001:海灯节
5001:元素烘炉test
5002:且试身手
5003:百货奇货
// 1.1
5004:映天之章
5005:元素烘炉
5006:佳肴尚温
5007:飞行挑战
// 1.2
3001:白垩与黑龙
5008:三清玲之章(废稿)
5009:古闻之章(钟离传说-1
5010:鲸天之章(公子传说-1
5011:秘宝迷踪
5012:百货奇货-2
5014:无相交响诗
// 1.3
5015:仙麟之章(甘雨传说-1
5016:福至五彩
5017:龙蜥寻踪(显示漂浮秘灵)
6002:威撼山岳(古岩巨蜥)
6003:异乡食记
5018:引蝶之章(胡桃传说-1
5019:争斗激流
// 1.4
5020:纯水之愿
5021:邀约事件-第一辑
// 1.5
5022:迷城战线
5023:风行迷踪
5024:折箭觅踪
5025:古闻之章(钟离传说-2
5026:刺骨幽寒(无相之冰)
5027:翠石砌玉壶(尘歌壶)
5028:邀约事件-第二辑
5029:浪沫之章(优菈传说-1
// 1.6
5030:无尽骤战
5031:风来人剑斗奇谭
5032:砰砰魔球总动员
5033:回声轻叙(芭芭拉皮肤)
6005:振袖秋风问红叶(主线)
// 2.0
6003:筑机战阵(恒常机关阵列)
5034:幻影心流
5035:秘宝迷踪-2
5036:炽焰轰转(无相之火)
5037:机关奇谭-灵妙之局
5038:琉金之章(宵宫传说-1
5039:雪鹤之章-(神里绫华传说-1
// 2.1
5040:百人一揆-1
5041:月中王国(钓鱼)
5042:狂浪谲波(无相之水)
5043:深空霆雷(雷音权现)
5044:漂浮秘灵
5045:眠龙之章(珊瑚宫心海传说-1
5046:天下人之章(雷电将军传说-1
// 2.2
5047:梦里生花
5048:邀约事件-第三辑
5049:古时孤影
5050:镜花听世(音游)
// 2.3
5051:万端珊瑚事件簿·犬武者
5052:鱼群大爆发(钓鱼常驻)
5053:导能原盘-跋尾
5054:迷城战线·光界篇
5059:天牛之章(荒泷一斗传说-1
5056:邀约事件-第四辑
5060:兽境裂隙(兽境猎犬)
// 2.4
5055:山海八所巡礼
5057:邀约事件-第五辑
5061:冰雷与共(渊下宫龙蜥)
5063:风起鹤归(主线)
5064:渊下宫(新地图开启)
// 2.5
5062:曲生酌微梦
5065:神工天巧
5066:有香自西来-1
5069:仙狐之章(八重神子传说-1
5070:天下人之章(雷电将军传说-2
5076:百人一揆
// 2.6
5067:振晶的研究
5068:画外旅照-1
5071:巨虺蟠渊(层岩巨渊巨蛇)
5074:邀约事件-第七辑
5075:层岩巨渊(新地图)
5077:回响渊底的安魂曲(主线)
5078:神守柏之章(神里绫人传说-1
// 2.7
5080:炉心机造
5081:幽客之章(夜兰传说任务-1
5079:深泥奇谭
5072:荒泷极上盛世豪鼓大祭典(音游)
5073:邀约事件-第六辑
// 2.8
5082:恒动械画
5083:追想练行
5084:幻声留形(菲谢尔)
5085:残象暗战(迪卢克)
5088:枫红之章(枫原万叶传说-1
5097:邀约事件-第八辑
// 3.0
5086:幽林蕈雨(须弥草鸡)
5087:片剂深研
5089:雷極之花(雷树)
5090:溢神的论证-1
5091:秘宝迷踪-3
5092:郭狐之章(提纳里传说-1
5093:诸法丛林(新地图)
// 3.1
5094:百人一揆
5095:侚察五凤
5096:寻星之旅
5098:智巧灵蕈大竞逐test
5100:金狼之章(赛诺传说-1
5101:睡莲之章(妮露传说-1
5102:沙海热梦(新地图)
5103:永动龙兽(兆载永劫龙兽)
5104:统辖矩阵会隐形的机关boss
5105:迷梦与空幻与欺骗(主线)
// 3.2
5098:智巧灵蕈大竞逐test
5099:冒险家试炼
5107:无相交响诗-离调乐段
5108:画外旅照-青植之篇
5109:虚空鼓动,劫火高扬(主线)
5113:智慧主之章(纳西妲传说-1
5106:草覆地法(无相之草)
// 3.3
5110:骰子,猫与卡牌的战场(七圣召唤常驻)
5111:风行迷踪
5112:跨野寻踪
5114:迷城战线·沙域篇
5115:倾落伽蓝
// 3.4
5116:蔷薇再开时(丽莎)
5117:演武传心(神里绫华)
5118:荒泷极意堂堂斗虫大试合
5119:七圣召唤-热斗模式·全方位后援
5121:天隼之章(艾尔海森传说-1
5122:沙原之主(新怪物)
5126:千壑沙地(新地图)
5127:邀约事件-第九辑
// 3.5
5120:灵蕈棋阵
5123:振晶的复核实验
5124:卡利贝尔
5125:有香自西来-寻味地北
5130:迪希雅传说
// 3.6
5128:风沙轰鸣
5129:合剂演进
5131:苍漠囿图(新地图开启)
5132:忆昔诸途巡历(花神书前置)
5134:深罪施洗(新怪物展示)
5136:悬壶之章(白术传说任务)
5139:智慧主之章-2纳西妲传说任务
// 新手与特殊活动
101:前路既定
1014:送芭芭拉活动
1023:打深渊送香菱活动
8001:星之归还
10001:test1.0签到
10002:(test)高价值一次性签到
10003:把握每日
10004:把握每日
10005:虹旅藏金
10006:虹旅藏金
10007:虹旅藏金
10010:把握每日
10011:富贵登门
10012:异乡食记
10013:云流星奔
50001:万民同行
50002:浅唱祈礼