Clean up all

Remvoe TextBoxXP
This commit is contained in:
2022-11-27 16:51:47 +08:00
parent d169de9a9e
commit c7898401ce
52 changed files with 925 additions and 1102 deletions

View File

@@ -14,8 +14,9 @@
*
* 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;
@@ -485,7 +486,6 @@ namespace GrasscutterTools.Forms
dropList[i] = data;
}
#endregion - -
#region - -

View File

@@ -14,8 +14,9 @@
*
* 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.Linq;
@@ -99,25 +100,25 @@ namespace GrasscutterTools.Forms
{
try
{
NUDGachaType.Value = banner.GachaType;
NUDScheduleId.Value = banner.ScheduleId;
NUDGachaType.Value = banner.GachaType;
NUDScheduleId.Value = banner.ScheduleId;
CmbBannerType.SelectedIndex = (int)banner.BannerType;
if (string.IsNullOrEmpty(banner.TitlePath) || !int.TryParse(banner.TitlePath.Substring("UI_GACHA_SHOW_PANEL_A".Length, 3), out int prefabId))
CmbPrefab.SelectedIndex = -1;
else
CmbPrefab.SelectedIndex = Array.IndexOf(GameData.GachaBannerPrefabs.Ids, prefabId);
RbCostItem224.Checked = banner.CostItem == 224;
RbCostItem223.Checked = banner.CostItem == 223;
NUDBeginTime.Value = banner.BeginTime;
NUDEndTime.Value = banner.EndTime;
NUDSortId.Value = banner.SortId;
TxtRateUpItems1.Text = string.Join(", ", banner.RateUpItems1);
TxtRateUpItems2.Text = string.Join(", ", banner.RateUpItems2);
NUDBaseYellowWeight.Value = banner.BaseYellowWeight * 0.01M;
NUDBasePurpleWeight.Value = banner.BasePurpleWeight * 0.01M;
NUDEventChance.Value = banner.EventChance;
NUDSoftPity.Value = banner.SoftPity;
NUDHardPity.Value = banner.HardPity;
RbCostItem224.Checked = banner.CostItem == 224;
RbCostItem223.Checked = banner.CostItem == 223;
NUDBeginTime.Value = banner.BeginTime;
NUDEndTime.Value = banner.EndTime;
NUDSortId.Value = banner.SortId;
TxtRateUpItems1.Text = string.Join(", ", banner.RateUpItems1);
TxtRateUpItems2.Text = string.Join(", ", banner.RateUpItems2);
NUDBaseYellowWeight.Value = banner.BaseYellowWeight * 0.01M;
NUDBasePurpleWeight.Value = banner.BasePurpleWeight * 0.01M;
NUDEventChance.Value = banner.EventChance;
NUDSoftPity.Value = banner.SoftPity;
NUDHardPity.Value = banner.HardPity;
InitRateUpItems(banner);
}
catch (Exception ex)
@@ -155,23 +156,23 @@ namespace GrasscutterTools.Forms
var prefabId = GameData.GachaBannerPrefabs.Ids[CmbPrefab.SelectedIndex];
GachaBanner banner = new GachaBanner
{
GachaType = (int)NUDGachaType.Value,
ScheduleId = (int)NUDScheduleId.Value,
BannerType = (BannerType)CmbBannerType.SelectedIndex,
PrefabPath = $"GachaShowPanel_A{prefabId:000}",
GachaType = (int)NUDGachaType.Value,
ScheduleId = (int)NUDScheduleId.Value,
BannerType = (BannerType)CmbBannerType.SelectedIndex,
PrefabPath = $"GachaShowPanel_A{prefabId:000}",
PreviewPrefabPath = $"UI_Tab_GachaShowPanel_A{prefabId:000}",
TitlePath = $"UI_GACHA_SHOW_PANEL_A{prefabId:000}_TITLE",
CostItem = RbCostItem224.Checked ? 224 : 223,
BeginTime = (int)NUDBeginTime.Value,
EndTime = (int)NUDEndTime.Value,
SortId = (int)NUDSortId.Value,
RateUpItems1 = yellowIds,
RateUpItems2 = purpleIds,
BaseYellowWeight = (int)(NUDBaseYellowWeight.Value * 100),
BasePurpleWeight = (int)(NUDBasePurpleWeight.Value * 100),
EventChance = (int)NUDEventChance.Value,
SoftPity = (int)NUDSoftPity.Value,
HardPity = (int)NUDHardPity.Value
TitlePath = $"UI_GACHA_SHOW_PANEL_A{prefabId:000}_TITLE",
CostItem = RbCostItem224.Checked ? 224 : 223,
BeginTime = (int)NUDBeginTime.Value,
EndTime = (int)NUDEndTime.Value,
SortId = (int)NUDSortId.Value,
RateUpItems1 = yellowIds,
RateUpItems2 = purpleIds,
BaseYellowWeight = (int)(NUDBaseYellowWeight.Value * 100),
BasePurpleWeight = (int)(NUDBasePurpleWeight.Value * 100),
EventChance = (int)NUDEventChance.Value,
SoftPity = (int)NUDSoftPity.Value,
HardPity = (int)NUDHardPity.Value
};
return banner;
}

View File

@@ -22,7 +22,6 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
using GrasscutterTools.Game;
using GrasscutterTools.Game.Gacha;
@@ -301,7 +300,7 @@ namespace GrasscutterTools.Forms
{
var json = JsonConvert.SerializeObject(banner);
json = json.Replace(",\"", ",\r\n \"").Insert(1, "\r\n ");
TxtJson.Text = json.Insert(json.Length-1, "\r\n");
TxtJson.Text = json.Insert(json.Length - 1, "\r\n");
ShowBanner(banner);
}
}

View File

@@ -24,10 +24,8 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
using GrasscutterTools.Game;
using GrasscutterTools.Game.Drop;
using GrasscutterTools.Game.Gacha;
using GrasscutterTools.Properties;
@@ -44,7 +42,7 @@ namespace GrasscutterTools.Forms
private List<GachaBanner3> Banners;
#endregion
#endregion - -
#region - -
@@ -105,11 +103,10 @@ namespace GrasscutterTools.Forms
new FormGachaBannerEditor().ShowDialog();
}
#endregion
#endregion - -
#region - Banners.json -
/// <summary>
/// 加载按钮点击时触发
/// </summary>
@@ -174,7 +171,7 @@ namespace GrasscutterTools.Forms
}
}
#endregion
#endregion - Banners.json -
#region - -
@@ -254,7 +251,7 @@ namespace GrasscutterTools.Forms
}
}
#endregion
#endregion - -
#region - -
@@ -497,8 +494,6 @@ namespace GrasscutterTools.Forms
return banner;
}
#endregion - -
}
}

View File

@@ -163,7 +163,6 @@ namespace GrasscutterTools.Forms
}
throw firstEx;
//{
// try
// {

View File

@@ -14,8 +14,9 @@
*
* 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.Linq;