|
|
@@ -0,0 +1,144 @@
|
|
|
+
|
|
|
+<!-- 作者:龙腾猫跃 -->
|
|
|
+
|
|
|
+<local:MyCard Title="概述" Margin="0,0,0,15">
|
|
|
+ <StackPanel Margin="25,40,23,15">
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,4" LineHeight="17"
|
|
|
+ Text="帮助条目分为两类,第一类在点击后会在 PCL2 中打开一个新的帮助子页面,第二类则会触发事件(通常用于打开网页或执行程序)。
下列两项分别为第一类和第二类帮助条目的示例。" />
|
|
|
+ <local:MyListItem Margin="0,0,0,0"
|
|
|
+ EventType="打开帮助" EventData="帮助/自定义帮助.json" />
|
|
|
+ <local:MyListItem Margin="0,0,0,10"
|
|
|
+ EventType="打开帮助" EventData="网站/Minecraft Wiki.json" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,4" LineHeight="17"
|
|
|
+ Text="每个帮助条目都由对应的 JSON 文件生成,且第一类与第二类的格式要求略有不同。" />
|
|
|
+ </StackPanel>
|
|
|
+</local:MyCard>
|
|
|
+
|
|
|
+<local:MyCard Title="JSON 格式详述" Margin="0,0,0,15">
|
|
|
+ <Grid Margin="25,40,23,13">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="135" />
|
|
|
+ <ColumnDefinition Width="100" />
|
|
|
+ <ColumnDefinition Width="90" />
|
|
|
+ <ColumnDefinition Width="1*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17" FontWeight="Bold"
|
|
|
+ Grid.Row="0" Grid.Column="0" Text="Title" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="0" Grid.Column="1" Text="必须" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="0" Grid.Column="2" Text="String" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="0" Grid.Column="3" Text="帮助条目的标题,以及第一类中点击进入后的子页面左上角的标题。" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17" FontWeight="Bold"
|
|
|
+ Grid.Row="1" Grid.Column="0" Text="Description" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="1" Grid.Column="1" Text="可选" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="1" Grid.Column="2" Text="String" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="1" Grid.Column="3" Text="帮助条目标题下方的描述。" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17" FontWeight="Bold"
|
|
|
+ Grid.Row="2" Grid.Column="0" Text="Logo" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="2" Grid.Column="1" Text="可选" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="2" Grid.Column="2" Text="String" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="2" Grid.Column="3" Text="帮助条目的图标。第一类默认为草方块,第二类默认为命令方块。
支持填写图片网址或本地文件地址。" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17" FontWeight="Bold"
|
|
|
+ Grid.Row="3" Grid.Column="0" Text="ShowInSearch" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="3" Grid.Column="1" Text="可选" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="3" Grid.Column="2" Text="Boolean" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="3" Grid.Column="3" Text="控制该条目能否被搜索到。默认为 true。" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17" FontWeight="Bold"
|
|
|
+ Grid.Row="4" Grid.Column="0" Text="Keywords" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="4" Grid.Column="1" Text="可选" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="4" Grid.Column="2" Text="String" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="4" Grid.Column="3" Text="额外的搜索关键字。在搜索帮助时,输入这些关键字也同样能够搜索到该条目。" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17" FontWeight="Bold"
|
|
|
+ Grid.Row="5" Grid.Column="0" Text="Types" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="5" Grid.Column="1" Text="可选" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="5" Grid.Column="2" Text="List[String]" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="5" Grid.Column="3" Text="一个字符串列表,控制该项会出现在帮助页面的首页的哪些卡片中。
若不写,该项则不会出现在帮助页面的首页。
将这项留空,同时将 ShowInSearch 设为 false,即可完全隐藏该条目。" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17" FontWeight="Bold"
|
|
|
+ Grid.Row="6" Grid.Column="0" Text="ShowInPublic" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="6" Grid.Column="1" Text="可选" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="6" Grid.Column="2" Text="Boolean" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="6" Grid.Column="3" Text="若为 true (默认),该条目会在 PCL2 内测版与公开版中均显示。
若为 false,该条目就仅在 PCL2 内测版中可见,在公开版中隐藏。
如果条目内容涉及内测(例如群服务器、隐藏主题等),则应该设置为 false。" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17" FontWeight="Bold"
|
|
|
+ Grid.Row="7" Grid.Column="0" Text="IsEvent" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="7" Grid.Column="1" Text="可选" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="7" Grid.Column="2" Text="Boolean" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="7" Grid.Column="3" Text="若为 true,在点击后会执行特定事件,而不打开页面,即第二类。
若为 false (默认),在点击后会打开同名的 XAML 页面,即第一类。" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17" FontWeight="Bold"
|
|
|
+ Grid.Row="8" Grid.Column="0" Text="EventType" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="8" Grid.Column="1" Text="第一类不填
第二类必须" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="8" Grid.Column="2" Text="String" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="8" Grid.Column="3" Text="点击该条目时执行的事件类别。
详见自定义主页。" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17" FontWeight="Bold"
|
|
|
+ Grid.Row="9" Grid.Column="0" Text="EventData" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="9" Grid.Column="1" Text="第一类不填
第二类可选" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="9" Grid.Column="2" Text="String" />
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,6" LineHeight="17"
|
|
|
+ Grid.Row="9" Grid.Column="3" Text="点击该条目时执行的事件的额外参数。
详见自定义主页。" />
|
|
|
+ </Grid>
|
|
|
+</local:MyCard>
|
|
|
+
|
|
|
+<local:MyCard Title="第一类 JSON 范例" Margin="0,0,0,15" CanSwap="True" IsSwaped="True">
|
|
|
+ <StackPanel Margin="25,40,23,15">
|
|
|
+ <local:MyListItem Margin="0,0,0,10"
|
|
|
+ EventType="打开帮助" EventData="帮助/自定义帮助.json" />
|
|
|
+ <Grid Margin="7,6,0,0">
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,4" LineHeight="17"
|
|
|
+ Text='{}{
 "Title": "自定义帮助页面",
 "Description": "添加自己的帮助页面,或是隐藏 PCL2 内置的帮助页面",
 "Keywords": "PCL2个性化修改自定义xaml",
 "Types": ["个性化"]
}' />
|
|
|
+ <local:MyButton Width="80" Height="35" HorizontalAlignment="Right" VerticalAlignment="Bottom" Padding="13,0,13,0" Margin="0,0,0,8"
|
|
|
+ Text="复制" EventType="复制文本" EventData='{}{
 "Title": "自定义帮助页面",
 "Description": "添加自己的帮助页面,或是隐藏 PCL2 内置的帮助页面",
 "Keywords": "PCL2个性化修改自定义xaml",
 "Types": ["个性化"]
}' />
|
|
|
+ </Grid>
|
|
|
+ </StackPanel>
|
|
|
+</local:MyCard>
|
|
|
+
|
|
|
+<local:MyCard Title="第二类 JSON 范例" Margin="0,0,0,15" CanSwap="True" IsSwaped="True">
|
|
|
+ <StackPanel Margin="25,40,23,15">
|
|
|
+ <local:MyListItem Margin="0,0,0,10"
|
|
|
+ EventType="打开帮助" EventData="网站/Minecraft Wiki.json" />
|
|
|
+ <Grid Margin="7,6,0,0">
|
|
|
+ <TextBlock TextWrapping="Wrap" Margin="0,0,0,4" LineHeight="17"
|
|
|
+ Text='{}{
 "Title": "Minecraft 百科",
 "Description": "包含游戏过程中所需大多数知识的中文百科站",
 "Keywords": "我的世界wikipedia",
 "Types": ["常用网站"],
 "IsEvent": true,
 "EventType": "打开网页",
 "EventData": "https://minecraft-zh.gamepedia.com/Minecraft_Wiki"
}' />
|
|
|
+ <local:MyButton Width="80" Height="35" HorizontalAlignment="Right" VerticalAlignment="Bottom" Padding="13,0,13,0" Margin="0,0,0,8"
|
|
|
+ Text="复制" EventType="复制文本" EventData='{}{
 "Title": "Minecraft 百科",
 "Description": "包含游戏过程中所需大多数知识的中文百科站",
 "Keywords": "我的世界wikipedia",
 "Types": ["常用网站"],
 "IsEvent": true,
 "EventType": "打开网页",
 "EventData": "https://minecraft-zh.gamepedia.com/Minecraft_Wiki"
}' />
|
|
|
+ </Grid>
|
|
|
+ </StackPanel>
|
|
|
+</local:MyCard>
|