Skip to content

Commit

Permalink
Merge pull request #1 from LTCatt/master
Browse files Browse the repository at this point in the history
同步
  • Loading branch information
WTP016-CN authored Apr 29, 2021
2 parents fbfb43b + 9338072 commit 187b947
Show file tree
Hide file tree
Showing 29 changed files with 336 additions and 330 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vs/*
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div align="center"><img src="https://z3.ax1x.com/2021/04/05/cMgvw9.jpg" alt="PCL2 内置帮助库"/></div>
<div align="center"><img src="https://i.loli.net/2021/04/27/ia7zksgDwZfm5Pt.png" alt="PCL2 内置帮助库"/></div>
<div align="center"><img src="https://img.shields.io/github/stars/LTCatt/PCL2Help">&nbsp; <img src="https://img.shields.io/github/forks/LTCatt/PCL2Help?color=%23f8e71c">&nbsp;<img src="https://img.shields.io/github/issues/LTCatt/PCL2Help?color=%237ed321"></div>



## 💎 简介

这是一个 PCL2 启动器内置的帮助库,你可以通过它查阅到关于 PCL2 启动器及 Minecraft 的帮助。 由 PCL2 用户及 Minecraft 玩家共同编写维护。
Expand Down
2 changes: 1 addition & 1 deletion 个性化/XAML 格式.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"__Author__": "龙腾猫跃、XiaoFans",
"__Author__": "龙腾猫跃、XiaoFans、林小槐",
"Title": "自定义主页与帮助 XAML 格式",
"Description": "对自定义主页与帮助页面时使用的 XAML 文件的格式介绍",
"Types": ["个性化"]
Expand Down
76 changes: 49 additions & 27 deletions 个性化/XAML 格式.xaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@

<local:MyHint Margin="0,0,0,15" Text="该帮助页面还需要进一步完善。如果你感兴趣也可以来帮帮忙!" IsWarn="False" />
<!-- 需要补充 EventType “打开帮助”、通过 DynamicResources 绑定主题颜色、
<!-- 需要补充 EventType “打开帮助”、
MyListItem 的简介、使用 MyListItem 跳转帮助或触发事件 等内容。 -->

<!--
如果你成功看到本段文字,代表你已经打开本篇的代码了。
建议配合Ctrl + F 快速查找某项,例如:需要改变文本颜色,则搜索 “颜色” 准确定位查找。
Change by XiaoFans
-->
<local:MyCard Title="前言" Margin="0,0,0,15">
<local:MyCard Title="前言">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap" Margin="20,5,20,0" FontSize="15" HorizontalAlignment="Center" Foreground="#EC4141"
Text="此篇帮助建议对照代码查看,点击下方按钮下载代码" />
<TextBlock Margin="0,0,0,4" FontSize="13" HorizontalAlignment="Center" Foreground="{DynamicResource ColorBrush1}"
Text="本篇简单介绍了在 PCL2 中使用 XAML 进行自定义页面的相关语法,由于内容繁多,建议下载本篇代码参考学习。" />
<local:MyButton Margin="0,8,0,8" Width="200" Height="35"
Text="下载本篇的代码" EventType="下载文件" EventData="http://189.ly93.cc/viyYf2rIze63/71443213109235631.xaml" ToolTip="下载本篇的代码" />
</StackPanel>
</local:MyCard>
<local:MyCard Title="基础教学 1:纯文本" Margin="0,0,0,15">
<local:MyCard Title="基础教学 1:纯文本">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap" Margin="0,0,0,4"
<TextBlock Margin="0,0,0,4"
Text="每个 local:MyCard 代表一张卡片,你可以添加、删除格式类似的 MyCard 来添加多个卡片。每个 TextBlock 代表一段文本,你可以在 Text 中书写任何你想写的内容。你也可以自行添加更多的 TextBlock。" />
<TextBlock TextWrapping="Wrap" Margin="0,0,0,4" Foreground="#8C7721"
<TextBlock Margin="0,0,0,4" Foreground="#8C7721"
Text="你可以通过添加、删除属性修改样式,例如上面的 Foreground 会修改字体颜色。" />
<TextBlock TextWrapping="Wrap" Margin="20,5,20,0" FontSize="11"
<TextBlock Margin="20,5,20,0" FontSize="11"
Text="它还有许多可以调整的属性:Margin 调整边距,FontSize 调整字号,TextWrapping 则是启用自动换行。" />
</StackPanel>
</local:MyCard>
Expand All @@ -31,30 +31,30 @@
<local:MyHint Text="local:MyHint 代表提示条,它默认是警告样式。" />
<local:MyHint Margin="0,8,0,2" IsWarn="False"
Text="将提示条的 IsWarn 属性改为 False 即可改为提示样式。&#xA;使用左边的那堆字符可以在任意地方手动换行,如果需要使用等号、引号等特殊字符,可以自行百度 XAML 转义字符。" />
<TextBlock TextWrapping="Wrap" Margin="0,6,0,0"
<TextBlock Margin="0,6,0,0"
Text="卡片(local:MyCard)的 Title 属性决定了它的标题。&#xA;为卡片添加 CanSwap 属性让它可以被折叠,True 代表是,False 代表否。在此基础上,再使用 IsSwaped 属性调整它是否默认被折叠。" />
</StackPanel>
</local:MyCard>
<local:MyCard Title="基础教学 3:长宽属性、图片" Margin="0,0,0,15">
<local:MyCard Title="基础教学 3:长宽属性、图片">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap" Margin="0,0,0,4" Width="320" HorizontalAlignment="Right"
<TextBlock Margin="0,0,0,4" Width="320" HorizontalAlignment="Right"
Text="任意项目都可以添加 Width 与 Height 控制宽高,此外通过 HorizontalAlignment 来控制对齐:Center 代表居中,Right 代表居右。例如这段文本就被居右了。" />
<TextBlock TextWrapping="Wrap" Margin="0,0,0,6"
<TextBlock Margin="0,0,0,6"
Text="Image 代表图片,你需要在它的 Source 属性中填写一个网址或文件路径,它会从该处获取图片并显示。你通常也需要用 Height 限制它的高度。" />
<Image Height="50" HorizontalAlignment="Center" Source="https://www.mcbbs.net/template/mcbbs/image/logo_sc.png" />
</StackPanel>
</local:MyCard>
<local:MyCard Title="按钮教学 1:基础" Margin="0,0,0,15">
<local:MyCard Title="按钮教学 1:基础">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap" Margin="0,0,0,4"
<TextBlock Margin="0,0,0,4"
Text="你可以通过添加 local:MyButton 来新建一个按钮。你需要通过上一张卡片中提到的宽高属性来限定它的尺寸与位置,通过 Padding 属性控制它的内边距。" />
<TextBlock TextWrapping="Wrap" Margin="0,0,0,10"
<TextBlock Margin="0,0,0,10"
Text="按钮可以做到很多事,例如将 EventType 属性改为 打开网页,然后在 EventData 属性中写入网址,即可通过点击按钮打开网页。" />
<local:MyButton Width="140" Height="35" HorizontalAlignment="Left" Padding="13,0,13,0"
Text="打开 MCBBS" EventType="打开网页" EventData="https://www.mcbbs.net/" />
</StackPanel>
</local:MyCard>
<local:MyCard Title="按钮教学 2:属性" Margin="0,0,0,15">
<local:MyCard Title="按钮教学 2:属性">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap"
Text="你可以修改 ColorType 属性来调整按钮配色,Highlight 代表当前主题色,Red 代表红色。ToolTip 属性还可以让你在鼠标悬浮在上面的时候显示提示文本。" />
Expand All @@ -66,7 +66,7 @@
Text="点击打开知乎" EventType="打开网页" EventData="https://www.zhihu.com/" />
</StackPanel>
</local:MyCard>
<local:MyCard Title="按钮教学 3:启动游戏" Margin="0,0,0,15">
<local:MyCard Title="按钮教学 3:启动游戏">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap"
Text="EventType 改为启动游戏,EventData 改为游戏版本,即可点击启动特定版本的游戏。如果当前游戏文件夹没有该版本则无法启动。" />
Expand All @@ -78,43 +78,43 @@
Text="使用 1.12.2 进入 Hypixel" EventType="启动游戏" EventData="1.12.2|mc.hypixel.net" ToolTip="服务器 IP:mc.hypixel.net" />
</StackPanel>
</local:MyCard>
<local:MyCard Title="按钮教学 4:打开文件" Margin="0,0,0,15">
<local:MyCard Title="按钮教学 4:打开文件">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap"
Text="EventType 为打开文件,EventData 为文件路径,即可点击打开特定文件或启动程序。" />
<local:MyButton Margin="0,8,0,8" Width="200" Height="35"
Text="打开记事本" EventType="打开文件" EventData="notepad.exe" />
<TextBlock TextWrapping="Wrap" Margin="0,4,0,0"
<TextBlock Margin="0,4,0,0"
Text="如果能在 PCL 文件夹中找到该文件,则会优先打开 PCL 文件夹中的文件。当然,你可以使用例如 C:\ 开头的绝对路径。" />
<TextBlock TextWrapping="Wrap"
Text="此外,PCL2 会将文件中的花括号 path 替换为 PCL 可执行文件所在文件夹({path}),可以用于执行特定程序或加载图片。" />
<local:MyButton Margin="0,8,0,8" Width="200" Height="35"
Text="打开 PCL 日志" EventType="打开文件" EventData="Log1.txt" ToolTip="PCL2 的日志文件就在 PCL 文件夹内,且名为 Log1.txt" />
<TextBlock TextWrapping="Wrap" Margin="0,4,0,0"
<TextBlock Margin="0,4,0,0"
Text="就像为游戏指定服务器 IP 一样,你也可以在 EventData 的竖线后为程序添加启动参数。" />
<local:MyButton Margin="0,8,0,0" Width="200" Height="35"
Text="定位游戏启动脚本" EventType="打开文件" EventData="explorer.exe|/select,LatestLaunch.bat" ToolTip="PCL2 会将上一次启动 MC 的脚本保存在 PCL 文件夹内,且名为 LatestLaunch.bat。&#xA;点击按钮会打开文件管理器,并且借助参数要求它选中这个文件。" />
</StackPanel>
</local:MyCard>
<local:MyCard Title="按钮教学 5:其他命令" Margin="0,0,0,15">
<local:MyCard Title="按钮教学 5:其他命令">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap" Margin="0,0,0,4"
<TextBlock Margin="0,0,0,4"
Text="EventType 为复制文本,会将 EventData 中的内容复制到剪贴板。" />
<TextBlock TextWrapping="Wrap" Margin="0,0,0,4"
<TextBlock Margin="0,0,0,4"
Text="EventType 为刷新主页,即可点击重新加载主页。如果你使用联网方式下载主页文件,你可以通过这一方式更新主页内容。它无需指定 EventData。" />
<TextBlock TextWrapping="Wrap"
Text="EventType 为下载文件,会在点击时要求选择文件保存位置,并且下载 EventData 的链接中的文件。" />
<local:MyButton Margin="0,8,0,0" Width="250" Height="35"
Text="下载 MCBBS 的 Logo" EventType="下载文件" EventData="https://www.mcbbs.net/template/mcbbs/image/logo_sc.png" />
</StackPanel>
</local:MyCard>
<local:MyCard Title="复杂布局" Margin="0,0,0,15">
<local:MyCard Title="复杂布局">
<StackPanel Margin="25,40,23,15">
<local:MyHint Margin="0,0,0,7" IsWarn="False"
Text="下面的按钮列举了全部 6 种 EventType 作为示例。" />
<TextBlock TextWrapping="Wrap" Margin="0,0,0,4"
<TextBlock Margin="0,0,0,4"
Text="你需要用到 StackPanel 在一横行里塞下多个按钮,你可以仅在这个教学卡片的基础上稍作调整,来实现自己的按钮布局。" />
<TextBlock TextWrapping="Wrap" Margin="0,0,0,10"
<TextBlock Margin="0,0,0,10"
Text="如果你要实现更复杂的布局,你必须使用 Grid 等控件。多百度吧……谷歌也行。" />

<!-- 这是第一行 -->
Expand All @@ -139,6 +139,28 @@

</StackPanel>
</local:MyCard>
<local:MyCard Title="全局动态资源绑定">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap" LineHeight="17" Margin="0,0,0,15"
Text="你可以使用全局动态资源绑定的方式来给你的控件赋予全局主题色。" />
<TextBlock TextWrapping="Wrap"
Text="你好世界!" Foreground="{DynamicResource ColorBrush1}"/>
<TextBlock TextWrapping="Wrap"
Text="你好世界!" Foreground="{DynamicResource ColorBrush3}"/>
<TextBlock TextWrapping="Wrap"
Text="你好世界!" Foreground="{DynamicResource ColorBrush5}"/>
<TextBlock TextWrapping="Wrap" LineHeight="17" Margin="0,15,0,15"
Text="除了字体颜色的前景色,你也可以用于背景色、边框等绝大部分的颜色参数,参考如下复杂例子。" />
<Border Background="{DynamicResource ColorBrush5}" BorderBrush="{DynamicResource ColorBrush2}"
CornerRadius="3" HorizontalAlignment="Stretch" BorderThickness="1" Height="27px" Opacity="0.7">
<Grid>
<Path Fill="{DynamicResource ColorBrush1}" Stretch="Fill" Width="15" Height="15" HorizontalAlignment="Left" Margin="10,0,0,0"
Data="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"></Path>
<TextBlock Foreground="{DynamicResource ColorBrush1}" Margin="35,5,0,0" Text="仿造的同步主题色的信息条。" />
</Grid>
</Border>
</StackPanel>
</local:MyCard>

<!--
Expand Down Expand Up @@ -179,4 +201,4 @@ local:MyCard(卡片):
-->

<local:MyHint Margin="0,0,0,15" Text="作者:龙腾猫跃、XiaoFans" IsWarn="False" />
<local:MyHint Margin="0,0,0,15" Text="作者:龙腾猫跃、XiaoFans、林小槐" IsWarn="False" />
7 changes: 7 additions & 0 deletions 个性化/指定登录方式.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"__Author__": "XiaoFans、一闪",
"Title": "指定登录方式",
"Description": "单独为某一版本指定登录方式,包括第三方登录(如统一通行证、Authlib-Injector 等)",
"Keywords": "登录",
"Types": ["个性化"]
}
32 changes: 32 additions & 0 deletions 个性化/指定登录方式.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

<local:MyHint Margin="0,0,0,15" Text="该帮助页面还需要进一步完善。如果你感兴趣也可以来帮帮忙!" IsWarn="False" />
<!-- 需要根据规范重新整理格式、标点、空格等。部分语句不太通顺,需要再改改。 -->
<!-- 图片备份https://yshs.lanzous.com/iIquToi85kf -->

<local:MyCard Title="简介">
<StackPanel Margin="25,40,23,15">
<TextBlock Margin="0,0,0,4" LineHeight="17"
Text="PCL2 支持多种登录方式,可以单独为某一版本指定登录方式。支持 离线登录、正版登录、统一通行证 和 Authlib-Injector 登录,此界面将提供简单的教程。" />
</StackPanel>
</local:MyCard>

<local:MyCard Title="教程">
<StackPanel Margin="25,40,23,15">
<local:MyHint Margin="0,0,0,5" IsWarn="False"
Text="图片加载会有点慢" />
<TextBlock FontSize="15" Margin="0,0,0,0"
Text="1.点击下方“版本选择”" />
<Image HorizontalAlignment="Center" Source="https://z3.ax1x.com/2021/04/26/czvzrT.png" />
<TextBlock FontSize="15" Margin="0,10,0,0"
Text="2.右键点击需要修改的游戏版本" />
<Image HorizontalAlignment="Center" Source="https://z3.ax1x.com/2021/04/26/czvjx0.png" />
<TextBlock FontSize="15" Margin="0,10,0,0"
Text="3.点击左侧“设置”按钮" />
<Image HorizontalAlignment="Center" Source="https://z3.ax1x.com/2021/04/26/czvxMV.png" />
<TextBlock FontSize="15" Margin="0,10,0,0"
Text="4.滑动至下方“服务器选项”,选择登录方式即可切换" />
<Image HorizontalAlignment="Center" Source="https://z3.ax1x.com/2021/04/26/czvX2q.png" />
</StackPanel>
</local:MyCard>

<local:MyHint Margin="0,0,0,15" Text="作者:XiaoFans、一闪" IsWarn="False" />
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"Description": "介绍对整合包制作可能有用的 PCL2 相关功能,以及一些注意事项",
"Types": ["个性化"],
"Keywords": "服务器客户端",
"ShowInAlpha": false
"ShowInSnapshot": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

<local:MyCard Title="修改启动时 “你知道吗?” 的内容" Margin="0,0,0,15" CanSwap="True" IsSwaped="True">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap" Margin="0,0,0,4" LineHeight="17"
<TextBlock Margin="0,0,0,4" LineHeight="17"
Text="在 PCL 文件夹下新建一个名为 hints.txt 的文件,然后每一行写入一条信息,即可修改启动时 “你知道吗?” 的内容。&#xa;PCL2 读取该文件时会忽略空行。" />
</StackPanel>
</local:MyCard>

<local:MyCard Title="修改主页右侧的内容(主页自定义)" Margin="0,0,0,15" CanSwap="True" IsSwaped="True">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap" Margin="0,0,0,4" LineHeight="17"
<TextBlock Margin="0,0,0,4" LineHeight="17"
Text="尚未完成。" />
</StackPanel>
</local:MyCard>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<local:MyHint Margin="0,0,0,15" Text="该帮助页面还需要进一步完善。" IsWarn="False" />
<!-- 龙腾猫跃:我会接着写这一页的,不用管 =。= -->

<local:MyCard Title="内测提示" Margin="0,0,0,15">
<local:MyCard Title="内测提示">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap" Margin="0,0,0,4" LineHeight="17"
<TextBlock Margin="0,0,0,4" LineHeight="17"
Text="你目前所使用的 PCL2 内测版仅限你本人使用,禁止用于制作整合包或服务器客户端。&#xa;不过,你可以使用 PCL2 公开版任意制作整合包,点击下方按钮即可下载。" />
<local:MyButton MinWidth="160" Height="35" Padding="13,0" Margin="0,4,20,4" HorizontalAlignment="Left" ColorType="Highlight"
Text="下载 PCL2 公开版" EventType="打开网页" EventData="https://afdian.net/p/0164034c016c11ebafcb52540025c377" />
Expand All @@ -13,14 +13,14 @@

<local:MyCard Title="修改启动时 “你知道吗?” 的内容" Margin="0,0,0,15" CanSwap="True" IsSwaped="True">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap" Margin="0,0,0,4" LineHeight="17"
<TextBlock Margin="0,0,0,4" LineHeight="17"
Text="在 PCL 文件夹下新建一个名为 hints.txt 的文件,然后每一行写入一条信息,即可修改启动时 “你知道吗?” 的内容。&#xa;PCL2 读取该文件时会忽略空行。" />
</StackPanel>
</local:MyCard>

<local:MyCard Title="修改主页右侧的内容(主页自定义)" Margin="0,0,0,15" CanSwap="True" IsSwaped="True">
<StackPanel Margin="25,40,23,15">
<TextBlock TextWrapping="Wrap" Margin="0,0,0,4" LineHeight="17"
<TextBlock Margin="0,0,0,4" LineHeight="17"
Text="尚未完成。" />
</StackPanel>
</local:MyCard>
Expand Down
2 changes: 1 addition & 1 deletion 启动器/备份设置.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"__Author__": "tang_ge、龙腾猫跃",
"__Author__": "tang_ge、龙腾猫跃、林小槐",
"Title": "备份启动器设置",
"Description": "备份或迁移 PCL2 所存储的账号、隐藏主题、个性化信息等",
"Types": ["启动器"]
Expand Down
Loading

0 comments on commit 187b947

Please sign in to comment.