Skip to content

Commit

Permalink
1.1.1 更新
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceTimee committed Mar 27, 2022
1 parent 04d2d4e commit 99f653c
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 37 deletions.
1 change: 1 addition & 0 deletions Commons/Define.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ internal static class Define
internal delegate void SET_WINDOW_HANDLER();
internal delegate void SET_WINDOW_HANDLER_P(dynamic value);

internal static MainWindow MAIN_WINDOW = new();
internal static readonly SettingWindow SETTING_WINDOW = new();
internal static readonly HttpClient MAIN_CLIENT = new();
internal static readonly string CURRENT_VERSION = Assembly.GetExecutingAssembly().GetName().Version!.ToString()[0..^2];
Expand Down
10 changes: 9 additions & 1 deletion Pages/AppearancePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@
xmlns:controls="clr-namespace:Ona_Pix.Controls"
mc:Ignorable="d">
<StackPanel>
<Grid>
<Grid Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Label Content="暗色模式" />
<controls:ToggleSwitch x:Name="DarkModeToggle" Style="{StaticResource SettingToggle}" MouseDown="DarkModeToggle_MouseDown" />
</Grid>
<Grid Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Label Content="锁定动画" />
<controls:ToggleSwitch x:Name="LockAnimationToggle" Style="{StaticResource SettingToggle}" MouseDown="LockAnimationToggle_MouseDown" />
</Grid>
</StackPanel>
</UserControl>
7 changes: 7 additions & 0 deletions Pages/AppearancePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,12 @@ private void DarkModeToggle_MouseDown(object sender, System.Windows.Input.MouseB
((BundledTheme)Application.Current.Resources.MergedDictionaries[0]).BaseTheme =
DarkModeToggle.IS_TOGGLED ? BaseTheme.Dark : BaseTheme.Light;
}
private void LockAnimationToggle_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
if (LockAnimationToggle.IS_TOGGLED)
Define.MAIN_WINDOW.ActiveSpace_MouseIn(this, null!);
else
Define.MAIN_WINDOW.ActiveSpace_MouseOut(this, null!);
}
}
}
2 changes: 1 addition & 1 deletion Pages/BehaviorPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:controls="clr-namespace:Ona_Pix.Controls"
mc:Ignorable="d">
<StackPanel>
<Grid>
<Grid Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="1*" />
Expand Down
39 changes: 14 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,40 @@

</br>

## 自我介绍:

**Ona Pix**: 一只基于 **WPF(.Net5)** 的 Pixiv 搜图工具
## 自我介绍
**Ona Pix**: 一只基于 **WPF(.Net5)** 的 Pixiv 直连搜图工具

* 适用平台: Windows 10+
* 推荐平台: Windows 11

## 注意事项:

## 注意事项
1. **18+ 警告**,Ona Pix 包含少量裸露、性暗示等内容,食用前请确保你已年满 18 周岁
2. 为避免不必要的麻烦,食用前请先阅读**注意事项****用户协议**
3. Ona Pix 仍处于开发阶段,但每个正式版发布前会尽量确保其**稳定可用**
4. Github Release 中会保留目前能够使用的所有版本,但强烈推荐使用**最新版**

## 用户协议:
3. Ona Pix 仍处于**开发阶段**,但每个正式版发布前会尽量确保其**稳定可用**
4. Github Release 中会保留目前能够使用的**所有版本**,但强烈推荐使用**最新版**

## 用户协议
1. [隐私政策](https://thoughts.teambition.com/share/621ddd42c6a7bc00410f6e20#title=Ona_Pix_隐私政策)
2. [使用协议](https://thoughts.teambition.com/share/621ddd105cb4ab00411c9200#title=Ona_Pix_使用协议)

## 下载地址:

## 下载地址
1. Github (首选): [https://github.com/SpaceTimee/Ona-Pix/releases](https://github.com/SpaceTimee/Ona-Pix/releases)
2. 蓝奏云 (密码ddvs) (大陆推荐): [https://spacetime.lanzouy.com/b0179uiab](https://spacetime.lanzouy.com/b0179uiab)

## 安装方式:

## 安装方式
1. Setup 安装器 (推荐): 下载 Ona Pix Setup.exe 并运行 -> 按照提示设置即可安装
2. Standalone 独立封包: 下载 Ona Pix Standalone.exe 即可直接运行

## 食用文档:
## 食用文档
**[Ona Pix Instruction](https://github.com/SpaceTimee/Ona-Pix/wiki/Ona-Pix-Instruction)**

**[Ona Pix Docs](https://github.com/SpaceTimee/Ona-Pix/wiki/Ona-Pix-Docs)**

## 项目构建:

1. 构建 Ona-Pix-Smms.exe (也可参考步骤2获取): 克隆本项目 -> 使用 PyInstaller 将 Ona-Pix-Smms 项目下的 MainPy.py 打包为 Ona-Pix-Smms.exe -> 将该文件放置在 Ona-Pix.exe 的生成目录下
2. 获取 Ona-Core.dll & Ona-Pix-Secret.dll & Sheas-Core.dll: 下载克隆文件对应版本的 Ona Pix Setup.exe 并运行 -> 在安装目录下找到所需文件 -> 在 Ona-Pix 项目的依赖项中引用这些文件
3. 构建 Ona-Pix.exe: 还原 Ona-Pix 项目所需的 Nuget 包 -> 编译 Ona-Pix 项目并生成即可

## 开发者:
## 项目构建
[Ona Pix Build](https://github.com/SpaceTimee/Ona-Pix/wiki/Ona-Pix-Build)

## 开发者
**Space Time**

## 联系邮箱:

## 联系邮箱
**Zeus6_6@163.com**

•ᴗ•
4 changes: 2 additions & 2 deletions Windows/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<Grid x:Name="ActiveTopGrid" Margin="0,-65,0,0" MouseDown="ActiveSpace_MouseIn" MouseEnter="ActiveSpace_MouseIn" VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="60" />
<RowDefinition Height="55" />
</Grid.RowDefinitions>

<Rectangle Grid.RowSpan="2" Opacity="0" Fill="#0000" />
Expand All @@ -63,7 +63,7 @@

<Grid x:Name="ActiveRightGrid" Grid.Row="1" Margin="0,60,-65,0" HorizontalAlignment="Right" MouseDown="ActiveSpace_MouseIn" MouseEnter="ActiveSpace_MouseIn" VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60" />
<ColumnDefinition Width="55" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

Expand Down
19 changes: 11 additions & 8 deletions Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public MainWindow()
IN_TIMER.Tick += IN_TIMER_Tick;
OUT_TIMER.Interval = new TimeSpan(1);
OUT_TIMER.Tick += OUT_TIMER_Tick;

Define.MAIN_WINDOW = this;
}
private void MainWin_Loaded(object sender, RoutedEventArgs e)
{
Expand Down Expand Up @@ -190,7 +192,7 @@ private void SearchBox_TextChanged(object sender, System.Windows.Controls.TextCh
}
}

private void ActiveSpace_MouseIn(object sender, System.Windows.Input.MouseEventArgs e)
internal void ActiveSpace_MouseIn(object sender, System.Windows.Input.MouseEventArgs e)
{
OUT_TIMER.Stop();
IN_TIMER.Start();
Expand All @@ -206,22 +208,23 @@ private void ActiveSearchBox_PreviewMouseDown(object sender, System.Windows.Inpu

IS_FIXED = true;
}
private void ActiveSpace_MouseOut(object sender, System.Windows.Input.MouseEventArgs e)
internal void ActiveSpace_MouseOut(object sender, System.Windows.Input.MouseEventArgs e)
{
if (!IS_FIXED)
if (!((AppearancePage)Define.SETTING_WINDOW.Resources["appearancePage"]).LockAnimationToggle.IS_TOGGLED && !IS_FIXED)
{
IN_TIMER.Stop();
OUT_TIMER.Start();
}
}
private void InactiveSpace_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
IN_TIMER.Stop();
OUT_TIMER.Start();

ActiveSearchBox.Focus();
if (!((AppearancePage)Define.SETTING_WINDOW.Resources["appearancePage"]).LockAnimationToggle.IS_TOGGLED)
{
IN_TIMER.Stop();
OUT_TIMER.Start();

IS_FIXED = false;
IS_FIXED = false;
}
}

private void ACTIVATE_TIMER_Tick(object? sender, EventArgs e)
Expand Down

0 comments on commit 99f653c

Please sign in to comment.