Merge branch 'main' of https://github.com/babalae/better-genshin-impact
BIN
BetterGenshinImpact/Assets/Images/Anniversary/logo_1st.ico
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
BetterGenshinImpact/Assets/Images/Anniversary/logo_1st.png
Normal file
|
After Width: | Height: | Size: 199 KiB |
BIN
BetterGenshinImpact/Assets/Images/Anniversary/logo_2nd.ico
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
BetterGenshinImpact/Assets/Images/Anniversary/logo_2nd.png
Normal file
|
After Width: | Height: | Size: 197 KiB |
BIN
BetterGenshinImpact/Assets/Images/Anniversary/logo_3rd.ico
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
BetterGenshinImpact/Assets/Images/Anniversary/logo_3rd.png
Normal file
|
After Width: | Height: | Size: 198 KiB |
BIN
BetterGenshinImpact/Assets/Images/Anniversary/logo_4th.ico
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
BetterGenshinImpact/Assets/Images/Anniversary/logo_4th.png
Normal file
|
After Width: | Height: | Size: 197 KiB |
BIN
BetterGenshinImpact/Assets/Images/Anniversary/logo_5th.ico
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
BetterGenshinImpact/Assets/Images/Anniversary/logo_5th.png
Normal file
|
After Width: | Height: | Size: 199 KiB |
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 229 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
BIN
BetterGenshinImpact/Assets/Images/logo.ico
Normal file
|
After Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 76 KiB |
@@ -8,16 +8,17 @@
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<LangVersion>12.0</LangVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ApplicationIcon>Assets\logo.ico</ApplicationIcon>
|
||||
<ApplicationIcon>Assets\Images\logo.ico</ApplicationIcon>
|
||||
<AssemblyName>BetterGI</AssemblyName>
|
||||
<AssemblyVersion>0.34.4</AssemblyVersion>
|
||||
<Platforms>x64</Platforms>
|
||||
<DebugType>embedded</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Assets\*.jpg" />
|
||||
<None Remove="Assets\*.png" />
|
||||
<None Remove="Assets\*.ico" />
|
||||
<None Remove="Assets\Images\*.jpg" />
|
||||
<None Remove="Assets\Images\*.png" />
|
||||
<None Remove="Assets\Images\*.ico" />
|
||||
<None Remove="Assets\Fonts\*.ttf" />
|
||||
<None Remove="Assets\Highlighting\*.xshd" />
|
||||
<None Remove="Assets\Strings\*.html" />
|
||||
@@ -25,9 +26,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="Assets\*.jpg" />
|
||||
<Resource Include="Assets\*.png" />
|
||||
<Resource Include="Assets\*.ico" />
|
||||
<Resource Include="Assets\Images\*.jpg" />
|
||||
<Resource Include="Assets\Images\*.png" />
|
||||
<Resource Include="Assets\Images\*.ico" />
|
||||
<Resource Include="Assets\Fonts\*.ttf" />
|
||||
<Resource Include="Assets\Highlighting\*.xshd" />
|
||||
<Resource Include="Assets\Strings\*.html" />
|
||||
@@ -64,7 +65,7 @@
|
||||
<PackageReference Include="Vanara.PInvoke.User32" Version="4.0.2" />
|
||||
<PackageReference Include="WPF-UI" Version="3.0.5" />
|
||||
<PackageReference Include="WPF-UI.Tray" Version="3.0.5" />
|
||||
<PackageReference Include="WPF-UI.Violeta" Version="3.0.5.12" />
|
||||
<PackageReference Include="WPF-UI.Violeta" Version="3.0.5.15" />
|
||||
<PackageReference Include="YoloV8" Version="4.1.7" />
|
||||
<PackageReference Include="gong-wpf-dragdrop" Version="3.2.1" />
|
||||
</ItemGroup>
|
||||
@@ -135,14 +136,4 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Script\JustTp\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="View\Pages\MapPathingPage.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -23,7 +23,7 @@ public class PaddleOcrService : IOcrService
|
||||
|
||||
public PaddleOcrService()
|
||||
{
|
||||
var path = Global.Absolute("Assets\\Model\\PaddleOcr");
|
||||
var path = Global.Absolute(@"Assets\Model\PaddleOcr");
|
||||
var localDetModel = DetectionModel.FromDirectory(Path.Combine(path, "ch_PP-OCRv4_det"), ModelVersion.V4);
|
||||
var localClsModel = ClassificationModel.FromDirectory(Path.Combine(path, "ch_ppocr_mobile_v2.0_cls"));
|
||||
var localRecModel = RecognizationModel.FromDirectory(Path.Combine(path, "ch_PP-OCRv4_rec"), Path.Combine(path, "ppocr_keys_v1.txt"), ModelVersion.V4);
|
||||
|
||||
@@ -23,12 +23,12 @@ public class PickTextInference : ITextInference
|
||||
|
||||
public PickTextInference()
|
||||
{
|
||||
var modelPath = Global.Absolute("Assets\\Model\\Yap\\model_training.onnx");
|
||||
var modelPath = Global.Absolute(@"Assets\Model\Yap\model_training.onnx");
|
||||
if (!File.Exists(modelPath)) throw new FileNotFoundException("Yap模型文件不存在", modelPath);
|
||||
|
||||
_session = new InferenceSession(modelPath, BgiSessionOption.Instance.Options);
|
||||
|
||||
var wordJsonPath = Global.Absolute("Assets\\Model\\Yap\\index_2_word.json");
|
||||
var wordJsonPath = Global.Absolute(@"Assets\Model\Yap\index_2_word.json");
|
||||
if (!File.Exists(wordJsonPath)) throw new FileNotFoundException("Yap字典文件不存在", wordJsonPath);
|
||||
|
||||
var json = File.ReadAllText(wordJsonPath);
|
||||
|
||||
@@ -15,12 +15,12 @@ public class Predictor
|
||||
public Predictor()
|
||||
{
|
||||
var options = new SessionOptions();
|
||||
var modelPath = Global.Absolute("Assets\\Model\\Fish\\bgi_fish.onnx");
|
||||
var modelPath = Global.Absolute(@"Assets\Model\Fish\bgi_fish.onnx");
|
||||
if (!File.Exists(modelPath)) throw new FileNotFoundException("自动钓鱼模型文件不存在", modelPath);
|
||||
|
||||
_session = new InferenceSession(modelPath, options);
|
||||
|
||||
var wordJsonPath = Global.Absolute("Assets\\Model\\Fish\\label.json");
|
||||
var wordJsonPath = Global.Absolute(@"Assets\Model\Fish\label.json");
|
||||
if (!File.Exists(wordJsonPath)) throw new FileNotFoundException("自动钓鱼模型分类文件不存在", wordJsonPath);
|
||||
|
||||
var json = File.ReadAllText(wordJsonPath);
|
||||
|
||||
@@ -51,7 +51,7 @@ public class AutoDomainTask : ISoloTask
|
||||
_simulator = AutoFightContext.Instance.Simulator;
|
||||
|
||||
_predictor = YoloV8Builder.CreateDefaultBuilder()
|
||||
.UseOnnxModel(Global.Absolute("Assets\\Model\\Domain\\bgi_tree.onnx"))
|
||||
.UseOnnxModel(Global.Absolute(@"Assets\Model\Domain\bgi_tree.onnx"))
|
||||
.WithSessionOptions(BgiSessionOption.Instance.Options)
|
||||
.Build();
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class CombatScenes : IDisposable
|
||||
|
||||
private readonly YoloV8Predictor _predictor =
|
||||
YoloV8Builder.CreateDefaultBuilder()
|
||||
.UseOnnxModel(Global.Absolute("Assets\\Model\\Common\\avatar_side_classify_sim.onnx"))
|
||||
.UseOnnxModel(Global.Absolute(@"Assets\Model\Common\avatar_side_classify_sim.onnx"))
|
||||
.WithSessionOptions(BgiSessionOption.Instance.Options)
|
||||
.Build();
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace BetterGenshinImpact.GameTask.AutoFishing
|
||||
{
|
||||
private readonly ILogger<AutoFishingTrigger> _logger = App.GetLogger<AutoFishingTrigger>();
|
||||
private readonly IOcrService _ocrService = OcrFactory.Paddle;
|
||||
private readonly YoloV8Predictor _predictor = YoloV8Builder.CreateDefaultBuilder().UseOnnxModel(Global.Absolute("Assets\\Model\\Fish\\bgi_fish.onnx")).WithSessionOptions(BgiSessionOption.Instance.Options).Build();
|
||||
private readonly YoloV8Predictor _predictor = YoloV8Builder.CreateDefaultBuilder().UseOnnxModel(Global.Absolute(@"Assets\Model\Fish\bgi_fish.onnx")).WithSessionOptions(BgiSessionOption.Instance.Options).Build();
|
||||
|
||||
public string Name => "自动钓鱼";
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
xmlns:controls="clr-namespace:BetterGenshinImpact.View.Controls">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<!-- SizeChrome 显示宽高的 -->
|
||||
<!-- SizeChrome 显示宽高的 -->
|
||||
<!-- <ResourceDictionary Source="SizeChrome.xaml"/> -->
|
||||
<ResourceDictionary Source="ResizeRotateChrome.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!-- 可以拖拽调整大小的 -->
|
||||
<!-- 可以拖拽调整大小的 -->
|
||||
<ControlTemplate x:Key="MoveThumbTemplate" TargetType="{x:Type controls:MoveThumb}">
|
||||
<Rectangle Fill="Transparent" />
|
||||
</ControlTemplate>
|
||||
@@ -23,8 +23,7 @@
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<controls:MoveThumb Cursor="SizeAll" Template="{StaticResource MoveThumbTemplate}" />
|
||||
<ContentPresenter Content="{TemplateBinding ContentControl.Content}"
|
||||
Margin="{TemplateBinding Padding}" />
|
||||
<ContentPresenter Margin="{TemplateBinding Padding}" Content="{TemplateBinding ContentControl.Content}" />
|
||||
<controls:DesignerItemDecorator x:Name="ItemDecorator" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
@@ -37,12 +36,12 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- 可以拖拽调整大小的 拖拽按钮在外面 -->
|
||||
<!-- 可以拖拽调整大小的 拖拽按钮在外面 -->
|
||||
<ControlTemplate x:Key="OuterMoveThumbTemplate" TargetType="{x:Type controls:MoveThumb}">
|
||||
<!--<Rectangle x:Name="DragHandle" Fill="Blue" >
|
||||
|
||||
|
||||
</Rectangle>-->
|
||||
<Image x:Name="DragHandle" Source="pack://application:,,,/BetterGenshinImpact;component/Assets/drag.png" />
|
||||
<Image x:Name="DragHandle" Source="pack://application:,,,/BetterGenshinImpact;component/Assets/Images/drag.png" />
|
||||
|
||||
<!--<ControlTemplate.Triggers>
|
||||
<Trigger Property="Selector.IsSelected" Value="False">
|
||||
@@ -60,11 +59,14 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<controls:MoveThumb Width="20" Height="20" Margin="0,-23,0,0"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Cursor="SizeAll" Template="{StaticResource OuterMoveThumbTemplate}" />
|
||||
<ContentPresenter Content="{TemplateBinding ContentControl.Content}"
|
||||
Margin="{TemplateBinding Padding}" />
|
||||
<controls:MoveThumb Width="20"
|
||||
Height="20"
|
||||
Margin="0,-23,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Cursor="SizeAll"
|
||||
Template="{StaticResource OuterMoveThumbTemplate}" />
|
||||
<ContentPresenter Margin="{TemplateBinding Padding}" Content="{TemplateBinding ContentControl.Content}" />
|
||||
<controls:DesignerItemDecorator x:Name="ItemDecorator" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
|
||||
<ui:TitleBar Title="{Binding Title, Mode=OneWay}" Grid.Row="0">
|
||||
<ui:TitleBar.Icon>
|
||||
<ui:ImageIcon Source="pack://application:,,,/Assets/Kirara.png" />
|
||||
<ui:ImageIcon Source="pack://application:,,,/Assets/Images/logo.png" />
|
||||
</ui:TitleBar.Icon>
|
||||
<ui:TitleBar.Header>
|
||||
<StackPanel>
|
||||
@@ -172,7 +172,7 @@
|
||||
|
||||
<tray:NotifyIcon Grid.Row="0"
|
||||
FocusOnLeftClick="False"
|
||||
Icon="pack://application:,,,/Assets/logo.ico"
|
||||
Icon="pack://application:,,,/Assets/Images/logo.ico"
|
||||
LeftDoubleClick="OnNotifyIconLeftDoubleClick"
|
||||
MenuOnRightClick="True"
|
||||
TooltipText="BetterGI">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<Grid>
|
||||
<Border ClipToBounds="True" CornerRadius="8">
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="pack://application:,,,/Assets/keqing.jpg"
|
||||
<ImageBrush ImageSource="pack://application:,,,/Assets/Images/banner_keqing.jpg"
|
||||
RenderOptions.BitmapScalingMode="HighQuality"
|
||||
Stretch="UniformToFill" />
|
||||
</Border.Background>
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
Width="600"
|
||||
Height="600"
|
||||
d:Background="#D2D2D2"
|
||||
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ExtendsContentIntoTitleBar="True"
|
||||
FontFamily="{DynamicResource TextThemeFontFamily}"
|
||||
Tag="JsonMonoDialog"
|
||||
@@ -52,7 +50,7 @@
|
||||
</Grid>
|
||||
<ui:TitleBar Title="JSON 编辑器">
|
||||
<ui:TitleBar.Icon>
|
||||
<ui:ImageIcon Source="pack://application:,,,/Assets/Kirara.png" />
|
||||
<ui:ImageIcon Source="pack://application:,,,/Assets/Images/logo.png" />
|
||||
</ui:TitleBar.Icon>
|
||||
</ui:TitleBar>
|
||||
</Grid>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<ui:TitleBar Title="地图" Grid.Row="0">
|
||||
<ui:TitleBar.Icon>
|
||||
<ui:ImageIcon Source="pack://application:,,,/Assets/Kirara.png" />
|
||||
<ui:ImageIcon Source="pack://application:,,,/Assets/Images/logo.png" />
|
||||
</ui:TitleBar.Icon>
|
||||
</ui:TitleBar>
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
ExtendsContentIntoTitleBar="True"
|
||||
FontFamily="{DynamicResource TextThemeFontFamily}"
|
||||
ResizeMode="CanMinimize"
|
||||
WindowBackdropType="Mica"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowStyle="SingleBorderWindow"
|
||||
mc:Ignorable="d">
|
||||
@@ -45,7 +46,7 @@
|
||||
|
||||
<ui:TitleBar Name="MyTitleBar" Grid.Row="0">
|
||||
<ui:TitleBar.Icon>
|
||||
<ui:ImageIcon Source="pack://application:,,,/Assets/Kirara.png" />
|
||||
<ui:ImageIcon Source="pack://application:,,,/Assets/Images/logo.png" />
|
||||
</ui:TitleBar.Icon>
|
||||
</ui:TitleBar>
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public partial class MainWindowViewModel : ObservableObject, IViewModel
|
||||
{
|
||||
try
|
||||
{
|
||||
var s = OcrFactory.Paddle.Ocr(new Mat(Global.Absolute("Assets\\Model\\PaddleOCR\\test_ocr.png"), ImreadModes.Grayscale));
|
||||
var s = OcrFactory.Paddle.Ocr(new Mat(Global.Absolute(@"Assets\Model\PaddleOCR\test_ocr.png"), ImreadModes.Grayscale));
|
||||
Debug.WriteLine("PaddleOcr预热结果:" + s);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||