Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Commit bed7d30

Browse files
committed
v2.8.7.2
1 parent 1446af5 commit bed7d30

File tree

6 files changed

+30
-7
lines changed

6 files changed

+30
-7
lines changed

WpfMinecraftCommandHelper2/FixColorCode.xaml.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,17 @@ private string fixColorCode(string str)
9797
{
9898
str = str.Replace("§", @"\\u00A7");
9999
str = str.Replace("\\\"","\\\\\\\\\"").Replace("\"", "\\\\\\\"");
100-
if (fixColorSelSign.IsChecked.Value) str = "/setblock ~ ~1 ~ standing_sign 0 replace {Text1:\"{\\\"text\\\":\\\"请点击我\\\",\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"" + str + "\\\"}}\",Text2:\"{\\\"text\\\":\\\"Ctrl+鼠标中键可抓取\\\"}\",Text3:\"\",Text4:\"\"}";
101-
else str = "/setblock ~ ~1 ~ standing_sign 0 replace {Text1:\"{\\\"text\\\":\\\"请点击我\\\",\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"/blockdata ~ ~-1 ~ {Command:" + str + "}\\\"}}\",Text2:\"{\\\"text\\\":\\\"Ctrl+鼠标中键可抓取\\\"}\",Text3:\"\",Text4:\"\"}";
100+
if (fixColorSelSign.IsChecked.Value)
101+
str =
102+
"/setblock ~ ~1 ~ standing_sign 0 replace {Text1:\"{\\\"text\\\":\\\"请点击我\\\",\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"" +
103+
str + "\\\"}}\",Text2:\"{\\\"text\\\":\\\"Ctrl+鼠标中键可抓取\\\"}\",Text3:\"\",Text4:\"\"}";
104+
else
105+
{
106+
str = str.Replace("\\\\\\\"", "\\\\\\\\\\\"");
107+
str =
108+
"/setblock ~ ~1 ~ standing_sign 0 replace {Text1:\"{\\\"text\\\":\\\"请点击我\\\",\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"/blockdata ~ ~-1 ~ {Command:\\\\\\\"" +
109+
str + "\\\\\\\"}\\\"}}\",Text2:\"{\\\"text\\\":\\\"Ctrl+鼠标中键可抓取\\\"}\",Text3:\"\",Text4:\"\"}";
110+
}
102111
}
103112
return str;
104113
}

WpfMinecraftCommandHelper2/Item.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ private void createBtn_Click(object sender, RoutedEventArgs e)
374374
finalStr = give + finalString + "}";
375375
}
376376
//判断是否含有颜色代码
377-
if (finalStr.IndexOf("§") != -1)
377+
if (finalStr.IndexOf("§", StringComparison.Ordinal) != -1)
378378
{
379379
FixColorCode fcc = new FixColorCode();
380380
fcc.setStr(finalStr);

WpfMinecraftCommandHelper2/MainWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public MainWindow()
3030
private bool isUpdate = false;
3131
private bool isNeedUpdate = false;
3232
private bool preview = false;
33-
private string version = "2.8.7.1";
33+
private string version = "2.8.7.2";
3434
private string getversion = "0.0.0.0";
3535
private string passversion = "0.0.0.0";
3636
private bool error1 = false;

WpfMinecraftCommandHelper2/OtherMap.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
<Button x:Name="tabOther1WordHelp" Content="?" HorizontalAlignment="Left" Width="31" Margin="0,0,0,1" Click="tabOther1WordHelp_Click" Style="{DynamicResource SquareButtonStyle}"/>
2020
<Label x:Name="OtherFlyWord" Content="浮空字" HorizontalAlignment="Left" Margin="36,0,0,0" VerticalAlignment="Top"/>
2121
<Button x:Name="tabOther1WordCreate" Content="生成" HorizontalAlignment="Left" VerticalAlignment="Top" Width="38" Margin="543,0,0,0" Click="tabOther1WordCreate_Click" Style="{DynamicResource SquareButtonStyle}"/>
22-
<TextBox x:Name="tabOther1Word" HorizontalAlignment="Left" Height="23" Margin="100,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="395"/>
22+
<TextBox x:Name="tabOther1Word" HorizontalAlignment="Left" Height="23" Margin="100,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="369"/>
2323
<Button x:Name="tabOther1WordRemove" Content="移除" HorizontalAlignment="Left" VerticalAlignment="Top" Width="38" Margin="500,0,0,0" Click="tabOther1WordRemove_Click" Style="{DynamicResource SquareButtonStyle}"/>
24+
<Button x:Name="tabOther1WordColor" Content="§" HorizontalAlignment="Left" VerticalAlignment="Top" Width="21" Margin="474,0,0,0" Style="{DynamicResource SquareButtonStyle}" Click="tabOther1WordColor_Click"/>
2425
</Grid>
2526
<Grid HorizontalAlignment="Left" Height="26" Margin="10,72,0,0" VerticalAlignment="Top" Width="591">
2627
<Button x:Name="tabOther1ItemFlyHelp" Content="?" HorizontalAlignment="Left" VerticalAlignment="Top" Width="31" Click="tabOther1ItemFlyHelp_Click" Style="{DynamicResource SquareButtonStyle}"/>

WpfMinecraftCommandHelper2/OtherMap.xaml.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,11 @@ private void tabOther1WordRemove_Click(object sender, RoutedEventArgs e)
284284
checkbox.Show();
285285
}
286286

287+
private void tabOther1WordColor_Click(object sender, RoutedEventArgs e)
288+
{
289+
tabOther1Word.Text = tabOther1Word.Text += "§";
290+
}
291+
287292
private void tabOther1WordCreate_Click(object sender, RoutedEventArgs e)
288293
{
289294
if (mcVersion == "1.8" || mcVersion == "1.9/1.10")
@@ -294,6 +299,14 @@ private void tabOther1WordCreate_Click(object sender, RoutedEventArgs e)
294299
{
295300
finalStr = "/summon armor_stand ~ ~1 ~ {Tags:[\"HoloText\"],PersistenceRequired:1b,DisabledSlots:2039583,Invulnerable:1b,NoGravity:1b,Invisible:1b,CustomName:\"" + tabOther1Word.Text + "\",CustomNameVisible:true}";
296301
}
302+
//判断是否含有颜色代码
303+
if (finalStr.IndexOf("§", StringComparison.Ordinal) != -1)
304+
{
305+
FixColorCode fcc = new FixColorCode();
306+
fcc.setStr(finalStr);
307+
fcc.ShowDialog();
308+
finalStr = fcc.getStr();
309+
}
297310
Check checkbox = new Check();
298311
checkbox.showText(finalStr);
299312
checkbox.Show();

WpfMinecraftCommandHelper2/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@
4949
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
5050
// 方法是按如下所示使用“*”:
5151
// [assembly: AssemblyVersion("1.0.*")]
52-
[assembly: AssemblyVersion("2.8.7.1")]
53-
[assembly: AssemblyFileVersion("2.8.7.1")]
52+
[assembly: AssemblyVersion("2.8.7.2")]
53+
[assembly: AssemblyFileVersion("2.8.7.2")]

0 commit comments

Comments
 (0)