自定义另存为/下载作者作品时下载到特定文件夹/动画优化

This commit is contained in:
Rinacm 2020-06-10 15:57:19 +08:00
parent 4dff227648
commit 8c45070767
41 changed files with 4798 additions and 1342 deletions

2
Pixeval.sln.DotSettings Normal file
View File

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/NamespacesWithAnnotations/=Pixeval_002EAnnotations/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@ -60,7 +60,6 @@ namespace Pixeval.Interchange
}
}
}
private static bool PixevalInstanceRunning()
{
return Process.GetProcessesByName("Pixeval").Length > 0;

View File

@ -15,7 +15,8 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<Application x:Class="Pixeval.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<Application x:Class="Pixeval.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
@ -24,19 +25,18 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
<ResourceDictionary
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary
Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
<ResourceDictionary
Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
</ResourceDictionary.MergedDictionaries>
<system:Double x:Key="Two">
2
</system:Double>
<CubicEase x:Key="CubicEase" EasingMode="EaseOut" />
<PowerEase x:Key="QuinticEase"
EasingMode="EaseInOut"
Power="1" />
<valueConverters:EnumToStringConverter x:Key="EnumToStringConverter" />
<valueConverters:VisibleIfTrueConverter x:Key="VisibleIfTrueConverter" />
<valueConverters:VisibleIfFalseConverter x:Key="VisibleIfFalseConverter" />
@ -49,6 +49,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<valueConverters:InverseBooleanConverter x:Key="InverseBooleanConverter" />
<valueConverters:TrendsStatConverter x:Key="TrendsStatConverter" />
<valueConverters:DateTimeConverter x:Key="DateTimeConverter" />
<valueConverters:MultiCultureConverter x:Key="MultiCultureConverter" />
<valueConverters:TagMatchEnumToModelConverter x:Key="TagMatchEnumToModelConverter" />
<Style x:Key="RoundedCornerProgressBar" TargetType="{x:Type ProgressBar}">
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueDarkBrush}" />
@ -61,25 +62,23 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<ControlTemplate TargetType="{x:Type ProgressBar}">
<ControlTemplate.Resources>
<Storyboard x:Key="OnLoaded">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="TemplateRoot"
Storyboard.TargetProperty="(UIElement.Opacity)">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="TemplateRoot" Storyboard.TargetProperty="(UIElement.Opacity)">
<EasingDoubleKeyFrame KeyTime="0" Value="0" />
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="TemplateRoot"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="TemplateRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
<EasingDoubleKeyFrame KeyTime="0" Value="0" />
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="TemplateRoot"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="TemplateRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
<EasingDoubleKeyFrame KeyTime="0" Value="0" />
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="OnLoadedNoAnimation">
<DoubleAnimation Storyboard.TargetName="TemplateRoot"
Storyboard.TargetProperty="(UIElement.Opacity)" To="1"
Storyboard.TargetProperty="(UIElement.Opacity)"
To="1"
Duration="0" />
<DoubleAnimation Storyboard.TargetName="TemplateRoot"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
@ -91,7 +90,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
Duration="0" />
</Storyboard>
</ControlTemplate.Resources>
<Grid x:Name="TemplateRoot" Opacity="0" RenderTransformOrigin="0,0.5">
<Grid x:Name="TemplateRoot"
Opacity="0"
RenderTransformOrigin="0,0.5">
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="0" ScaleY="0" />
@ -105,13 +106,18 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="3" />
<Rectangle x:Name="PART_Track" />
<Grid x:Name="PART_Indicator" HorizontalAlignment="Left" ClipToBounds="true">
<Grid x:Name="PART_Indicator"
HorizontalAlignment="Left"
ClipToBounds="true">
<Rectangle x:Name="Indicator"
Fill="{TemplateBinding Foreground}"
RadiusX="3" RadiusY="3" />
RadiusX="3"
RadiusY="3" />
<Rectangle x:Name="Animation"
Fill="{TemplateBinding Foreground}"
RadiusX="3" RadiusY="3" RenderTransformOrigin="0.5,0.5">
RadiusX="3"
RadiusY="3"
RenderTransformOrigin="0.5,0.5">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform />
@ -127,14 +133,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<VisualState x:Name="Determinate" />
<VisualState x:Name="Indeterminate">
<Storyboard RepeatBehavior="Forever">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Animation"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
<EasingDoubleKeyFrame KeyTime="0" Value="0.25" />
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25" />
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25" />
</DoubleAnimationUsingKeyFrames>
<PointAnimationUsingKeyFrames Storyboard.TargetName="Animation"
Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
<PointAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
<EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5" />
<EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5" />
<EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5" />
@ -147,8 +151,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<ControlTemplate.Triggers>
<Trigger Property="materialDesign:TransitionAssist.DisableTransitions" Value="True">
<Trigger.EnterActions>
<BeginStoryboard Name="BeginStoryboardOnLoadedNoAnimation"
Storyboard="{StaticResource OnLoadedNoAnimation}" />
<BeginStoryboard Name="BeginStoryboardOnLoadedNoAnimation" Storyboard="{StaticResource OnLoadedNoAnimation}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<RemoveStoryboard BeginStoryboardName="BeginStoryboardOnLoadedNoAnimation" />
@ -157,12 +160,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsVisible" Value="True" />
<Condition Property="materialDesign:TransitionAssist.DisableTransitions"
Value="False" />
<Condition Property="materialDesign:TransitionAssist.DisableTransitions" Value="False" />
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard Name="BeginStoryboardOnLoaded"
Storyboard="{StaticResource OnLoaded}" />
<BeginStoryboard Name="BeginStoryboardOnLoaded" Storyboard="{StaticResource OnLoaded}" />
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<RemoveStoryboard BeginStoryboardName="BeginStoryboardOnLoaded" />
@ -188,10 +189,16 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Grid x:Name="Grid">
<Rectangle Width="Auto" Height="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Fill="Transparent" />
<Border x:Name="Rectangle1" Width="Auto" Height="Auto"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
<Rectangle Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Fill="Transparent" />
<Border x:Name="Rectangle1"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{TemplateBinding Background}"
CornerRadius="5" />
</Grid>
@ -213,12 +220,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollBar}">
<Grid x:Name="GridRoot" Width="8"
<Grid x:Name="GridRoot"
Width="8"
Background="{TemplateBinding Background}">
<Grid.RowDefinitions>
<RowDefinition Height="0.00001*" />
</Grid.RowDefinitions>
<Track x:Name="PART_Track" Grid.Row="0" Focusable="false"
<Track x:Name="PART_Track"
Grid.Row="0"
Focusable="false"
IsDirectionReversed="true">
<Track.Thumb>
<Thumb x:Name="Thumb"
@ -226,12 +236,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
Style="{DynamicResource ScrollThumbs}" />
</Track.Thumb>
<Track.IncreaseRepeatButton>
<RepeatButton x:Name="PageUp" Command="ScrollBar.PageDownCommand"
<RepeatButton x:Name="PageUp"
Command="ScrollBar.PageDownCommand"
Focusable="false"
Opacity="0" />
</Track.IncreaseRepeatButton>
<Track.DecreaseRepeatButton>
<RepeatButton x:Name="PageDown" Command="ScrollBar.PageUpCommand"
<RepeatButton x:Name="PageDown"
Command="ScrollBar.PageUpCommand"
Focusable="false"
Opacity="0" />
</Track.DecreaseRepeatButton>
@ -239,12 +251,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
</Grid>
<ControlTemplate.Triggers>
<Trigger SourceName="Thumb" Property="IsMouseOver" Value="true">
<Setter TargetName="Thumb" Property="Background"
Value="{DynamicResource ButtonSelectBrush}" />
<Setter TargetName="Thumb" Property="Background" Value="{DynamicResource ButtonSelectBrush}" />
</Trigger>
<Trigger SourceName="Thumb" Property="IsDragging" Value="true">
<Setter TargetName="Thumb" Property="Background"
Value="{DynamicResource DarkBrush}" />
<Setter TargetName="Thumb" Property="Background" Value="{DynamicResource DarkBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="Thumb" Property="Visibility" Value="Collapsed" />

View File

@ -33,13 +33,10 @@ using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Imaging;
using CefSharp;
using CefSharp.Wpf;
using Microsoft.Win32;
using Pixeval.Core;
using Pixeval.Data.ViewModel;
using Pixeval.Objects.Caching;
using Pixeval.Objects.I18n;
using Pixeval.Objects.Primitive;
using Pixeval.Persisting;
@ -51,9 +48,6 @@ namespace Pixeval
{
public App()
{
#if DEBUG
CultureInfo.CurrentCulture = new CultureInfo("zh-CN");
#endif
if (Dispatcher != null) Dispatcher.UnhandledException += (sender, args) => DispatcherOnUnhandledException(args.Exception);
AppDomain.CurrentDomain.UnhandledException += (sender, args) =>
DispatcherOnUnhandledException((Exception) args.ExceptionObject);
@ -213,14 +207,11 @@ namespace Pixeval
private static async Task CheckUpdate()
{
if (await AppContext.UpdateAvailable())
if (MessageBox.Show(AkaI18N.PixevalUpdateAvailable, AkaI18N.PixevalUpdateAvailableTitle,
MessageBoxButton.YesNo, MessageBoxImage.Information) ==
MessageBoxResult.Yes)
{
Process.Start(@"updater\Pixeval.Updater.exe");
Environment.Exit(0);
}
if (await AppContext.UpdateAvailable() && MessageBox.Show(AkaI18N.PixevalUpdateAvailable, AkaI18N.PixevalUpdateAvailableTitle, MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes)
{
Process.Start(@"updater\Pixeval.Updater.exe");
Environment.Exit(0);
}
}
/// <summary>
@ -271,11 +262,6 @@ namespace Pixeval
private static async Task RestoreSettings()
{
await Settings.Restore();
AppContext.DefaultCacheProvider = Settings.Global.CachingPolicy == CachingPolicy.Memory
? (IWeakCacheProvider<BitmapImage, Illustration>) MemoryCache<BitmapImage, Illustration>.Shared
: new FileCache<BitmapImage, Illustration>(AppContext.CacheFolder, image => image.ToStream(),
InternalIO.CreateBitmapImageFromStream);
AppContext.DefaultCacheProvider.Clear();
BrowsingHistoryAccessor.GlobalLifeTimeScope =
new BrowsingHistoryAccessor(200, AppContext.BrowseHistoryDatabase);
}
@ -316,8 +302,6 @@ namespace Pixeval
{
BrowsingHistoryAccessor.GlobalLifeTimeScope.EmergencyRewrite();
}
AppContext.DefaultCacheProvider.Clear();
base.OnExit(e);
}
}

View File

@ -23,10 +23,8 @@ using System.Collections.ObjectModel;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;
using Pixeval.Core;
using Pixeval.Data.ViewModel;
using Pixeval.Objects.Caching;
namespace Pixeval
{
@ -34,7 +32,7 @@ namespace Pixeval
{
public const string AppIdentifier = "Pixeval";
public const string CurrentVersion = "2.2.1";
public const string CurrentVersion = "2.2.2";
public const string ConfigurationFileName = "pixeval_conf.json";
@ -56,12 +54,12 @@ namespace Pixeval
public static readonly string BrowseHistoryDatabase = Path.Combine(ProjectFolder, "history.db");
public static IWeakCacheProvider<BitmapImage, Illustration> DefaultCacheProvider;
public static readonly ObservableCollection<TrendingTag> TrendingTags = new ObservableCollection<TrendingTag>();
public static readonly IQualifier<Illustration, IllustrationQualification> DefaultQualifier = new IllustrationQualifier();
public static readonly I18nOption[] AvailableCultures = {I18nOption.USEnglish, I18nOption.MainlandChinese};
public static int ProxyPort { get; set; }
public static int PacPort { get; set; }

View File

@ -0,0 +1,49 @@
#region Copyright (C) 2019-2020 Dylech30th. All rights reserved.
// Pixeval - A Strong, Fast and Flexible Pixiv Client
// Copyright (C) 2019-2020 Dylech30th
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#endregion
using System.IO;
using Pixeval.Objects.Primitive;
using Pixeval.Persisting;
namespace Pixeval.Core
{
public class CreateNewFolderForUserDownloadPathProvider : IDownloadPathProvider
{
public string UserName { get; set; }
public CreateNewFolderForUserDownloadPathProvider(string userName)
{
UserName = userName;
}
public string GetSpotlightPath(string title, DownloadOption option = null)
{
return option?.RootDirectory ?? Path.Combine(Settings.Global.DownloadLocation, "Spotlight", Strings.FormatPath(title));
}
public string GetIllustrationPath(DownloadOption option = null)
{
return option?.RootDirectory ?? Path.Combine(Settings.Global.DownloadLocation, UserName);
}
public string GetMangaPath(string id, DownloadOption option = null)
{
return option?.RootDirectory ?? Path.Combine(Settings.Global.DownloadLocation, UserName, id);
}
}
}

View File

@ -26,19 +26,19 @@ namespace Pixeval.Core
{
public class DefaultDownloadPathProvider : IDownloadPathProvider
{
public string GetSpotlightPath(string title)
public string GetSpotlightPath(string title, DownloadOption option = null)
{
return Path.Combine(Settings.Global.DownloadLocation, "Spotlight", Strings.FormatPath(title));
return option?.RootDirectory ?? Path.Combine(Settings.Global.DownloadLocation, "Spotlight", Strings.FormatPath(title));
}
public string GetIllustrationPath()
public string GetIllustrationPath(DownloadOption option = null)
{
return Settings.Global.DownloadLocation;
return option?.RootDirectory ?? Settings.Global.DownloadLocation;
}
public string GetMangaPath(string id)
public string GetMangaPath(string id, DownloadOption option = null)
{
return Path.Combine(Settings.Global.DownloadLocation, id);
return option?.RootDirectory ?? Path.Combine(Settings.Global.DownloadLocation, id);
}
}
}

View File

@ -42,7 +42,6 @@ namespace Pixeval.Core
var iterator = _currentItr as ICancellable;
iterator?.Cancel();
GC.Collect();
AppContext.DefaultCacheProvider.Clear();
}
}
}

View File

@ -33,10 +33,17 @@ namespace Pixeval.Core
public interface IDownloadPathProvider
{
string GetSpotlightPath(string title);
string GetSpotlightPath(string title, DownloadOption option = null);
string GetIllustrationPath();
string GetIllustrationPath(DownloadOption option = null);
string GetMangaPath(string id);
string GetMangaPath(string id, DownloadOption option = null);
}
public class DownloadOption
{
public string RootDirectory { get; set; }
public bool CreateNewWhenFromUser { get; set; }
}
}

View File

@ -30,22 +30,23 @@ namespace Pixeval.Core
{
public class DownloadManager
{
public static readonly IDownloadPathProvider DownloadPathProvider = new DefaultDownloadPathProvider();
public static readonly IIllustrationFileNameFormatter FileNameFormatter = new DefaultIllustrationFileNameFormatter();
public static readonly ObservableCollection<DownloadableIllustration> Downloading = new ObservableCollection<DownloadableIllustration>();
public static readonly ObservableCollection<DownloadableIllustration> Downloaded = new ObservableCollection<DownloadableIllustration>();
public static void EnqueueDownloadItem(Illustration illustration, string rootDir = null)
public static void EnqueueDownloadItem(Illustration illustration, DownloadOption option = null)
{
if (Downloading.Any(i => illustration.Id == i.DownloadContent.Id)) return;
option ??= new DownloadOption();
static DownloadableIllustration CreateDownloadableIllustration(Illustration downloadContent,
bool isFromMange, int index = -1, string rootDirCpy = null)
static DownloadableIllustration CreateDownloadableIllustration(Illustration downloadContent, bool isFromMange, DownloadOption option, int index = -1)
{
var model = new DownloadableIllustration(downloadContent, FileNameFormatter, DownloadPathProvider, isFromMange, index) {RootDirectory = rootDirCpy};
var filePathProvider = option.CreateNewWhenFromUser
? new CreateNewFolderForUserDownloadPathProvider(downloadContent.UserName)
: (IDownloadPathProvider) new DefaultDownloadPathProvider();
var fileNameFormatter = new DefaultIllustrationFileNameFormatter();
var model = new DownloadableIllustration(downloadContent, fileNameFormatter, filePathProvider, isFromMange, index) {Option = option};
model.DownloadState.ValueChanged += (sender, args) => Application.Current.Dispatcher.Invoke(() =>
{
switch (args.NewValue)
@ -73,10 +74,10 @@ namespace Pixeval.Core
for (var j = 0; j < illustration.MangaMetadata.Length; j++)
{
var cpy = j;
Task.Run(() => CreateDownloadableIllustration(illustration.MangaMetadata[cpy], true, cpy, rootDir).Download());
Task.Run(() => CreateDownloadableIllustration(illustration.MangaMetadata[cpy], true, option, cpy).Download());
}
else
Task.Run(() => CreateDownloadableIllustration(illustration, false, rootDirCpy: rootDir).Download());
Task.Run(() => CreateDownloadableIllustration(illustration, false, option).Download());
}
}

View File

@ -79,8 +79,7 @@ namespace Pixeval.Core
private IEnumerator<Illustration> illustrationsEnumerator;
public QueryAsyncEnumerator(IPixivAsyncEnumerable<Illustration> enumerable, string keyword,
SearchTagMatchOption matchOption, int current, bool isPremium) : base(
enumerable)
SearchTagMatchOption matchOption, int current, bool isPremium) : base(enumerable)
{
this.keyword = keyword;
this.matchOption = matchOption;

View File

@ -69,20 +69,19 @@ namespace Pixeval.Data.ViewModel
public Observable<DownloadStateEnum> DownloadState { get; set; } = new Observable<DownloadStateEnum>(DownloadStateEnum.Queue);
public string RootDirectory { get; set; }
public DownloadOption Option { get; set; }
public string GetPath()
{
if (DownloadContent.IsUgoira)
return Path.Combine(Directory.CreateDirectory(RootDirectory ?? DownloadPathProvider.GetIllustrationPath()).FullName, FileNameFormatter.FormatGif(DownloadContent));
return Path.Combine(Directory.CreateDirectory(DownloadPathProvider.GetIllustrationPath(Option)).FullName, FileNameFormatter.FormatGif(DownloadContent));
if (DownloadContent.FromSpotlight)
return IsFromManga
? Path.Combine(Directory.CreateDirectory(RootDirectory ?? DownloadPathProvider.GetSpotlightPath(DownloadContent.SpotlightTitle)).FullName, DownloadContent.Id, FileNameFormatter.FormatManga(DownloadContent, MangaIndex))
: Path.Combine(Directory.CreateDirectory(RootDirectory ?? DownloadPathProvider.GetSpotlightPath(DownloadContent.SpotlightTitle)).FullName, FileNameFormatter.Format(DownloadContent));
if (IsFromManga)
return Path.Combine(
Directory.CreateDirectory(RootDirectory ?? DownloadPathProvider.GetMangaPath(DownloadContent.Id)).FullName, FileNameFormatter.FormatManga(DownloadContent, MangaIndex));
return Path.Combine(Directory.CreateDirectory(RootDirectory ?? DownloadPathProvider.GetIllustrationPath()).FullName, FileNameFormatter.Format(DownloadContent));
? Path.Combine(Directory.CreateDirectory(DownloadPathProvider.GetSpotlightPath(DownloadContent.SpotlightTitle, Option)).FullName, DownloadContent.Id, FileNameFormatter.FormatManga(DownloadContent, MangaIndex))
: Path.Combine(Directory.CreateDirectory(DownloadPathProvider.GetSpotlightPath(DownloadContent.SpotlightTitle, Option)).FullName, FileNameFormatter.Format(DownloadContent));
return IsFromManga
? Path.Combine(Directory.CreateDirectory(DownloadPathProvider.GetMangaPath(DownloadContent.Id, Option)).FullName, FileNameFormatter.FormatManga(DownloadContent, MangaIndex))
: Path.Combine(Directory.CreateDirectory(DownloadPathProvider.GetIllustrationPath(Option)).FullName, FileNameFormatter.Format(DownloadContent));
}

View File

@ -0,0 +1,42 @@
#region Copyright (C) 2019-2020 Dylech30th. All rights reserved.
// Pixeval - A Strong, Fast and Flexible Pixiv Client
// Copyright (C) 2019-2020 Dylech30th
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#endregion
using PropertyChanged;
namespace Pixeval.Data.ViewModel
{
[AddINotifyPropertyChangedInterface]
public class I18nOption
{
public string LocalizedName { get; set; }
public string Name { get; set; }
public I18nOption(string localizedName, string name)
{
LocalizedName = localizedName;
Name = name;
}
public I18nOption() { }
public static readonly I18nOption USEnglish = new I18nOption("English(US)", "en-us");
public static readonly I18nOption MainlandChinese = new I18nOption("简体中文(中国)", "zh-cn");
}
}

View File

@ -20,6 +20,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Pixeval.Objects.Primitive;
using PropertyChanged;
@ -32,6 +34,8 @@ namespace Pixeval.Data.ViewModel
public bool IsUgoira { get; set; }
public bool IsR18 => Tags?.Any(x => Regex.IsMatch(x?.Name ?? string.Empty, "[Rr][-]?18[Gg]?") || Regex.IsMatch(x?.TranslatedName ?? string.Empty, "[Rr][-]?18[Gg]?")) ?? false;
public string Origin { get; set; }
public string Large { get; set; }

View File

@ -52,9 +52,10 @@ namespace Pixeval.Objects.Exceptions.Logger
private string GetFirstMatchRecord()
{
var query = new EventLogQuery("Application", PathType.LogName,
$"*[System/Level=2] and *[System/Provider/@Name=\"{provider}\"]")
{ReverseDirection = true};
var query = new EventLogQuery("Application", PathType.LogName, $"*[System/Level=2] and *[System/Provider/@Name=\"{provider}\"]")
{
ReverseDirection = true
};
var reader = new EventLogReader(query);
EventRecord record;
while ((record = reader.ReadEvent()) != null)

View File

@ -25,6 +25,7 @@ using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Win32;
using Pixeval.Objects.Primitive;
@ -34,8 +35,11 @@ namespace Pixeval.Objects.Exceptions.Logger
{
public class ExceptionDumper
{
public static async void WriteException(Exception e)
{
using var semaphore = new SemaphoreSlim(1);
await semaphore.WaitAsync(TimeSpan.FromSeconds(5));
ApplicationLog stack;
try
{
@ -53,10 +57,8 @@ namespace Pixeval.Objects.Exceptions.Logger
sb.AppendLine(@"Pixeval - A Strong, Fast and Flexible Pixiv Client");
sb.AppendLine(@"Copyright (C) 2019-2020 Dylech30th");
sb.AppendLine();
sb.AppendLine(
@"We have encountered an unrecoverable problem. A dump file with error snapshot has been created.");
sb.AppendLine(
@"In order to help with diagnosis and debug, Pixeval will collect some information contains: ");
sb.AppendLine(@"We have encountered an unrecoverable problem. A dump file with error snapshot has been created.");
sb.AppendLine(@"In order to help with diagnosis and debug, Pixeval will collect some information contains: ");
sb.AppendLine(@" ¡¤ Computer Architecture");
sb.AppendLine(@" ¡¤ Operating System");
sb.AppendLine(@" ¡¤ Event Log");
@ -79,8 +81,7 @@ namespace Pixeval.Objects.Exceptions.Logger
sb.AppendLine(@" Begin Operating System");
sb.AppendLine($" OS Version String: {Environment.OSVersion.VersionString}");
sb.AppendLine($" OS Version {Environment.OSVersion.Version}");
sb.AppendLine(
$" Service Pack Version: {(Environment.OSVersion.ServicePack.IsNullOrEmpty() ? "Not Installed" : "Environment.OSVersion.ServicePack")}");
sb.AppendLine($" Service Pack Version: {(Environment.OSVersion.ServicePack.IsNullOrEmpty() ? "Not Installed" : "Environment.OSVersion.ServicePack")}");
sb.AppendLine($" Visual C++ Redistributable Version: {GetCppRedistributableVersion()}");
sb.AppendLine(@" End Operating System");
sb.AppendLine();
@ -96,11 +97,14 @@ namespace Pixeval.Objects.Exceptions.Logger
sb.AppendLine(FormatMultilineData(exceptionMessage, 3));
sb.AppendLine(" End Exception Log");
sb.AppendLine(@"End Debugging Information Collection");
await File.WriteAllTextAsync(
Path.Combine(AppContext.ExceptionReportFolder,
$"{DateTime.Now.ToString(CultureInfo.InvariantCulture)}.txt".Replace("/", "-")
.Replace(":", "-")),
sb.ToString());
try
{
await File.WriteAllTextAsync(Path.Combine(AppContext.ExceptionReportFolder, $"{DateTime.Now.ToString(CultureInfo.InvariantCulture)}.txt".Replace("/", "-").Replace(":", "-")), sb.ToString());
}
catch
{
// ignore
}
}
private static string FormatMultilineData(string data, int indent)

View File

@ -40,9 +40,8 @@ namespace Pixeval.Objects.Generic
{
if (!this.value.Equals(value))
{
var old = this.value;
ValueChanged?.Invoke(Value, new ObservableValueChangedEventArgs<T>(this.value, value));
this.value = value;
ValueChanged?.Invoke(Value, new ObservableValueChangedEventArgs<T>(old, this.value));
}
}
}

View File

@ -1,76 +0,0 @@
#region Copyright (C) 2019-2020 Dylech30th. All rights reserved.
// Pixeval - A Strong, Fast and Flexible Pixiv Client
// Copyright (C) 2019-2020 Dylech30th
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#endregion
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Resources;
using System.Xml;
using PropertyChanged;
namespace Pixeval.Objects.I18n
{
public static partial class AkaI18N
{
[DoNotNotify]
private static IEnumerable<XmlNode> _i18NXmlNodes;
public static string GetResource(string key)
{
var cultureInfo = CultureInfo.CurrentCulture;
var fileName =
new Uri(
$"pack://application:,,,/Pixeval;component/Objects/I18n/Xml/resx_{cultureInfo.Name.ToLower()}.xml");
if (_i18NXmlNodes == null)
{
StreamResourceInfo streamResourceInfo;
try
{
streamResourceInfo = Application.GetResourceStream(fileName);
}
catch (IOException)
{
streamResourceInfo =
Application.GetResourceStream(
new Uri("pack://application:,,,/Pixeval;component/Objects/I18n/Xml/resx_zh-cn.xml"));
}
var xml = new XmlDocument();
xml.Load(streamResourceInfo?.Stream);
_i18NXmlNodes = xml.SelectSingleNode("/localization").ChildNodes.Cast<XmlNode>();
}
return GetValueByKey(key);
}
public static string GetCultureAcceptLanguage()
{
return CultureInfo.CurrentCulture.Name.ToLower();
}
private static string GetValueByKey(string key)
{
return _i18NXmlNodes.First(p => p.Attributes["key"].Value == key).Attributes["value"].Value;
}
}
}

View File

@ -0,0 +1,97 @@
#region Copyright (C) 2019-2020 Dylech30th. All rights reserved.
// Pixeval - A Strong, Fast and Flexible Pixiv Client
// Copyright (C) 2019-2020 Dylech30th
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#endregion
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Windows;
using System.Windows.Resources;
using System.Xml;
using Pixeval.Data.ViewModel;
using Pixeval.Objects.Primitive;
using Pixeval.Persisting;
namespace Pixeval.Objects.I18n
{
public static partial class AkaI18N
{
private static IEnumerable<XmlNode> i18NXmlNodes;
public static string GetResource(string key)
{
if (i18NXmlNodes == null)
{
// we load settings here because we need to get the culture field
if (File.Exists(Path.Combine(AppContext.SettingsFolder, "settings.json")))
{
var s = File.ReadAllText(Path.Combine(AppContext.SettingsFolder, "settings.json")).FromJson<Settings>();
InitializeXmlNodes(s.Culture);
}
else InitializeXmlNodes(CultureInfo.CurrentCulture.Name);
}
return GetValueByKey(key);
}
public static void Reload(I18nOption option)
{
InitializeXmlNodes(option.Name);
foreach (var prop in typeof(AkaI18N).GetProperties(BindingFlags.Public | BindingFlags.Static))
{
prop.SetValue(null, GetValueByKey(prop.Name));
}
}
private static void InitializeXmlNodes(string culture)
{
var fileName =
new Uri(
$"pack://application:,,,/Pixeval;component/Objects/I18n/Xml/resx_{culture.ToLower()}.xml");
StreamResourceInfo streamResourceInfo;
try
{
streamResourceInfo = Application.GetResourceStream(fileName);
}
catch (IOException)
{
streamResourceInfo =
Application.GetResourceStream(
new Uri("pack://application:,,,/Pixeval;component/Objects/I18n/Xml/resx_zh-cn.xml"));
}
var xml = new XmlDocument();
xml.Load(streamResourceInfo?.Stream);
i18NXmlNodes = xml.SelectSingleNode("/localization").ChildNodes.Cast<XmlNode>();
}
public static string GetCultureAcceptLanguage()
{
return CultureInfo.CurrentCulture.Name.ToLower();
}
private static string GetValueByKey(string key)
{
return i18NXmlNodes.First(p => p.Attributes["key"].Value == key).Attributes["value"].Value;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -170,4 +170,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<resx key="DownloadTo" value="Download To..." />
<resx key="UserPreviewPopupFollow" value="Follow" />
<resx key="UserPreviewPopupUnFollow" value="UnFollow" />
<resx key="SelectCultureInfo" value="Language" />
<resx key="CreateNewFolderWhenDownloadFromUser" value="Create folder when download from user" />
</localization>

View File

@ -168,4 +168,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<resx key="DownloadTo" value="下载到..." />
<resx key="UserPreviewPopupFollow" value="关 注" />
<resx key="UserPreviewPopupUnFollow" value="已 关 注" />
<resx key="SelectCultureInfo" value="语言" />
<resx key="CreateNewFolderWhenDownloadFromUser" value="下载作者作品时使用单独文件夹" />
</localization>

View File

@ -24,7 +24,6 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
@ -33,9 +32,6 @@ using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Animation;
using Microsoft.CSharp.RuntimeBinder;
using Pixeval.Core;
using Pixeval.Data.ViewModel;
using Pixeval.Persisting;
namespace Pixeval.Objects.Primitive
{
@ -197,16 +193,6 @@ namespace Pixeval.Objects.Primitive
sender.LineDown();
}
}
public static async Task LoadAndCacheThumbnailImageToControl(this Illustration illustration, object control)
{
if (Settings.Global.UseCache &&
await AppContext.DefaultCacheProvider.TryGet(illustration) is (true, var image))
SetImageSource(control, image);
else if (illustration.Thumbnail != null &&
Uri.IsWellFormedUriString(illustration.Thumbnail, UriKind.Absolute))
SetImageSource(control, await PixivIO.FromUrl(illustration.Thumbnail));
}
}
public class PopupHelper

View File

@ -0,0 +1,31 @@
using System;
using System.Globalization;
using System.Linq;
using System.Windows.Data;
using Pixeval.Data.ViewModel;
namespace Pixeval.Objects.ValueConverters
{
public class MultiCultureConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is string s)
{
return AppContext.AvailableCultures.FirstOrDefault(cul => cul.Name == s) ?? I18nOption.MainlandChinese;
}
return I18nOption.MainlandChinese;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is I18nOption option)
{
return option.Name;
}
return I18nOption.MainlandChinese.Name;
}
}
}

View File

@ -30,13 +30,13 @@ namespace Pixeval.Objects.ValueConverters
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value == null ? string.Empty : string.Join(' ', value as IEnumerable<string>);
return value == null ? string.Empty : string.Join(' ', value as IEnumerable<string> ?? Array.Empty<string>());
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null || value.ToString().IsNullOrEmpty()) return new List<string>();
return value.ToString().Split(" ");
return value.ToString()?.Split(" ") ?? Array.Empty<string>();
}
}
}

View File

@ -30,7 +30,7 @@ namespace Pixeval.Objects.ValueConverters
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null) value = false;
value ??= false;
var val = (bool) value;
return val ? Visibility.Visible : Visibility.Hidden;
}
@ -45,7 +45,7 @@ namespace Pixeval.Objects.ValueConverters
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null) value = false;
value ??= false;
var val = (bool) value;
return val ? Visibility.Hidden : Visibility.Visible;

View File

@ -25,7 +25,6 @@ using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Pixeval.Core;
using Pixeval.Objects.Caching;
using Pixeval.Objects.Primitive;
using PropertyChanged;
@ -67,23 +66,17 @@ namespace Pixeval.Persisting
set => downloadLocation = value;
}
/// <summary>
/// Determines whether Pixeval should use cache
/// </summary>
public bool UseCache { get; set; }
/// <summary>
/// Set the caching policy of Pixeval, accept values are Memory and File
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public CachingPolicy CachingPolicy { get; set; } = CachingPolicy.Memory;
/// <summary>
/// Indicate the way to match tags
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public SearchTagMatchOption TagMatchOption { get; set; } = SearchTagMatchOption.PartialMatchForTags;
/// <summary>
/// Specify the localization culture
/// </summary>
public string Culture { get; set; } = "zh-cn";
/// <summary>
/// How many pages need to be queried once, minimum is 1, maximum is 10
/// </summary>
@ -114,6 +107,8 @@ namespace Pixeval.Persisting
/// </summary>
public ISet<string> IncludeTag { get; set; } = new HashSet<string>();
public bool CreateNewFolderWhenDownloadFromUser { get; set; }
public override string ToString()
{
return this.ToJson();
@ -159,9 +154,9 @@ namespace Pixeval.Persisting
Global.QueryStart = 1;
Global.SpotlightQueryStart = 1;
Global.RecommendIllustrator = false;
Global.UseCache = false;
Global.CachingPolicy = CachingPolicy.Memory;
Global.CreateNewFolderWhenDownloadFromUser = false;
Global.TagMatchOption = SearchTagMatchOption.PartialMatchForTags;
Global.Culture = "zh-cn";
}
}
}

View File

@ -74,8 +74,4 @@
<Resource Include="Resources\saucenao.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
</Project>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -19,10 +19,8 @@
#endregion
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
@ -73,9 +71,6 @@ namespace Pixeval.UI
IgnoreDuplicate = true
};
private readonly ConcurrentDictionary<object, Illustration> dataContextHolder =
new ConcurrentDictionary<object, Illustration>();
public MainWindow()
{
Instance = this;
@ -85,9 +80,6 @@ namespace Pixeval.UI
if (Dispatcher != null) Dispatcher.UnhandledException += Dispatcher_UnhandledException;
var property = DependencyPropertyDescriptor.FromProperty(ItemsControl.ItemsSourceProperty, typeof(ListBox));
property?.AddValueChanged(ImageListView, (sender, args) => dataContextHolder.Clear());
#pragma warning disable 4014
AcquireRecommendUser();
#pragma warning restore 4014
@ -266,7 +258,6 @@ namespace Pixeval.UI
private void RecommendIllustratorContainer_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
SetUserBrowserContext(sender.GetDataContext<User>());
OpenUserBrowser();
}
private async void MainWindow_OnKeyDown(object sender, KeyEventArgs e)
@ -557,8 +548,8 @@ namespace Pixeval.UI
if (dataContext != null && Uri.IsWellFormedUriString(dataContext.Thumbnail, UriKind.Absolute))
{
dataContextHolder.TryAdd(sender, dataContext);
await dataContext.LoadAndCacheThumbnailImageToControl(sender);
if(dataContext.Thumbnail != null && Uri.IsWellFormedUriString(dataContext.Thumbnail, UriKind.Absolute))
SetImageSource(sender, await PixivIO.FromUrl(dataContext.Thumbnail));
}
StartDoubleAnimationUseCubicEase(sender, "(Image.Opacity)", 0, 1, 800);
@ -568,13 +559,6 @@ namespace Pixeval.UI
private void Thumbnail_OnUnloaded(object sender, RoutedEventArgs e)
{
if (Settings.Global.UseCache)
if (dataContextHolder.TryGetValue(sender, out var illust))
{
var bitmapImage = (BitmapImage) ((Image) sender).Source;
AppContext.DefaultCacheProvider.Attach(ref bitmapImage, illust);
}
ReleaseImage(sender);
}
@ -641,7 +625,15 @@ namespace Pixeval.UI
private void DownloadNowMenuItem_OnClick(object sender, RoutedEventArgs e)
{
DownloadManager.EnqueueDownloadItem(sender.GetDataContext<Illustration>());
DownloadOption option = null;
if (BrowsingUser() && IsAtUploadCheckerPosition())
{
option = new DownloadOption
{
CreateNewWhenFromUser = Settings.Global.CreateNewFolderWhenDownloadFromUser
};
}
DownloadManager.EnqueueDownloadItem(sender.GetDataContext<Illustration>(), option);
MessageQueue.Enqueue(AkaI18N.QueuedDownload);
}
@ -656,16 +648,28 @@ namespace Pixeval.UI
if (fileDialog.ShowDialog() == CommonFileDialogResult.Ok)
{
DownloadManager.EnqueueDownloadItem(sender.GetDataContext<Illustration>(), fileDialog.FileName);
DownloadManager.EnqueueDownloadItem(sender.GetDataContext<Illustration>(), new DownloadOption {RootDirectory = fileDialog.FileName});
MessageQueue.Enqueue(AkaI18N.QueuedDownload);
}
}
private void DownloadAllNowMenuItem_OnClick(object sender, RoutedEventArgs e)
private async void DownloadAllNowMenuItem_OnClick(object sender, RoutedEventArgs e)
{
foreach (var illustration in GetImageSourceCopy())
if (illustration != null)
DownloadManager.EnqueueDownloadItem(illustration);
DownloadOption option = null;
if (BrowsingUser() && IsAtUploadCheckerPosition())
{
option = new DownloadOption
{
CreateNewWhenFromUser = Settings.Global.CreateNewFolderWhenDownloadFromUser
};
}
await Task.Run(() =>
{
foreach (var illustration in GetImageSourceCopy())
if (illustration != null)
DownloadManager.EnqueueDownloadItem(illustration, option);
});
MessageQueue.Enqueue(AkaI18N.QueuedAllToDownload);
}
@ -673,6 +677,14 @@ namespace Pixeval.UI
#region
private void Timeline_OnCompleted(object sender, EventArgs e)
{
UserBrowserPageScrollViewer.DataContext = null;
ReleaseImage(UserBanner);
ReleaseImage(UserBrowserUserAvatar);
ReleaseItemsSource(UserIllustsImageListView);
}
private async void PrivateFollow_OnClick(object sender, RoutedEventArgs e)
{
var usr = sender.GetDataContext<User>();
@ -829,14 +841,6 @@ namespace Pixeval.UI
return CheckerSnackBar.HorizontalAlignment == HorizontalAlignment.Left && CheckerSnackBar.Width.Equals(120);
}
private void BackToMainPageButton_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
UserBrowserPageScrollViewer.DataContext = null;
ReleaseImage(UserBanner);
ReleaseImage(UserBrowserUserAvatar);
ReleaseItemsSource(UserIllustsImageListView);
}
private async void FollowButton_OnClick(object sender, RoutedEventArgs e)
{
var usr = sender.GetDataContext<User>();
@ -1170,12 +1174,7 @@ namespace Pixeval.UI
public void OpenUserBrowser()
{
this.GetResources<Storyboard>("UserBrowserOpacityIncreaseAnimation").Begin();
this.GetResources<Storyboard>("UserBrowserScaleXIncreaseAnimation").Begin();
this.GetResources<Storyboard>("UserBrowserScaleYIncreaseAnimation").Begin();
this.GetResources<Storyboard>("ContentContainerOpacityIncreaseAnimation").Begin();
this.GetResources<Storyboard>("ContentContainerScaleXIncreaseAnimation").Begin();
this.GetResources<Storyboard>("ContentContainerScaleYIncreaseAnimation").Begin();
this.GetResources<Storyboard>("OpenUserBrowserAnimation").Begin();
}
public async void OpenIllustBrowser(Illustration illustration, bool record = true)

View File

@ -15,15 +15,11 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<Window x:Class="Pixeval.UI.SignIn" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:i18N="clr-namespace:Pixeval.Objects.I18n"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:webApi="clr-namespace:Pixeval.Persisting.WebApi"
xmlns:wpf="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
<Window x:Class="Pixeval.UI.SignIn" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:i18N="clr-namespace:Pixeval.Objects.I18n" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:webApi="clr-namespace:Pixeval.Persisting.WebApi" xmlns:wpf="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Title="{x:Static i18N:AkaI18N.SignIn}"
Title="{Binding Path=(i18N:AkaI18N.SignIn)}"
Width="450" Height="550" Icon="/Resources/pxlogo.ico"
Initialized="SignIn_OnInitialized" mc:Ignorable="d">
<Grid>
@ -35,8 +31,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<Viewbox Grid.Row="0" Width="450" Height="100"
HorizontalAlignment="Center" VerticalAlignment="Center">
<Canvas Width="450" Height="100">
<Path Canvas.Left="135" Canvas.Top="10"
Data="M51.742 23.355c-4.64-4.026-11.134-6.35-18.683-6.35C13.382 17.006 0 32.09 0 32.09l3.77 5.945s2.088.174.983-3.328c.954-1.79 2.82-4.2 6.466-6.98v39.6c-1.572.44-3.65 1.268-2.234 2.675H19.82c1.43-1.42-.823-2.276-2.195-2.675v-9.342s7.427 2.896 15.434 2.896c7.034 0 13.435-2.08 18.196-5.835 4.76-3.733 7.83-9.308 7.81-15.68.014-6.257-2.682-12-7.324-16.01zM46 51.92c-3.292 3.228-8.08 5.27-13.602 5.266-6.162.003-11.348-1.182-14.773-2.857V24.62c3.758-2.653 9.852-4.287 14.773-4.277 5.98.005 10.674 2.25 13.85 5.654 3.168 3.426 4.898 7.977 4.914 13.267-.02 5.154-1.87 9.4-5.162 12.655zm22.65-34.914h-2.207c-.98 0-1.774.79-1.774 1.763v40.498c0 .973.793 1.763 1.773 1.763h2.206c.978 0 1.773-.788 1.773-1.762v-40.5c0-.972-.795-1.762-1.774-1.762zm57.66 0h-2.206c-.98 0-1.774.79-1.774 1.763v40.498c0 .973.793 1.763 1.774 1.763h2.206c.98 0 1.774-.788 1.774-1.762v-40.5c0-.972-.796-1.762-1.774-1.762zm51.872 0h-2.053c-1.614 0-2.06.207-2.785 1.654-.724 1.44-16.7 32.906-16.7 32.906s-15.98-31.466-16.7-32.906c-.728-1.447-1.173-1.654-2.786-1.654h-2.054c-1.51 0-2.326.667-1.475 2.366.854 1.7 20.53 40.088 20.53 40.088.517.972 1.463 1.57 2.486 1.57 1.02 0 1.965-.598 2.483-1.57.033-.07 19.676-38.39 20.525-40.088.85-1.7.038-2.366-1.473-2.366zM108.886 59.56c.834 1.054 1.432 1.47 3.044 1.47h3.308c2.082 0 1.35-.94.76-1.71-1.47-1.927-15.97-20.25-15.97-20.25s15.022-18.425 16.493-20.353c.59-.77 1.323-1.71-.76-1.71h-3.307c-1.613 0-2.212.415-3.045 1.472-.832 1.053-13.04 15.97-13.04 15.97S84.15 19.534 83.317 18.48c-.833-1.058-1.432-1.474-3.044-1.474h-3.308c-2.08 0-1.35.94-.76 1.71 1.47 1.93 16.503 20.355 16.503 20.355S77.77 57.394 76.3 59.32c-.59.77-1.322 1.71.76 1.71h3.308c1.613 0 2.21-.416 3.045-1.47.832-1.057 12.954-15.872 12.954-15.872l12.52 15.87zM67.54 0c-1.317 0-2.412.436-3.29 1.307-.875.87-1.314 1.96-1.314 3.268 0 1.306.44 2.396 1.315 3.267.878.87 1.973 1.307 3.29 1.307 1.314 0 2.41-.437 3.286-1.308.877-.87 1.316-1.96 1.316-3.267s-.44-2.397-1.316-3.268C69.95.437 68.854 0 67.54 0zm57.66 0c-1.314 0-2.41.436-3.285 1.307-.878.87-1.316 1.96-1.316 3.268 0 1.306.437 2.396 1.315 3.267.876.87 1.97 1.307 3.286 1.307 1.317 0 2.412-.437 3.29-1.308.875-.87 1.314-1.96 1.314-3.267s-.44-2.397-1.314-3.268C127.612.437 126.517 0 125.2 0z"
<Path Canvas.Left="135" Canvas.Top="10" Data="M51.742 23.355c-4.64-4.026-11.134-6.35-18.683-6.35C13.382 17.006 0 32.09 0 32.09l3.77 5.945s2.088.174.983-3.328c.954-1.79 2.82-4.2 6.466-6.98v39.6c-1.572.44-3.65 1.268-2.234 2.675H19.82c1.43-1.42-.823-2.276-2.195-2.675v-9.342s7.427 2.896 15.434 2.896c7.034 0 13.435-2.08 18.196-5.835 4.76-3.733 7.83-9.308 7.81-15.68.014-6.257-2.682-12-7.324-16.01zM46 51.92c-3.292 3.228-8.08 5.27-13.602 5.266-6.162.003-11.348-1.182-14.773-2.857V24.62c3.758-2.653 9.852-4.287 14.773-4.277 5.98.005 10.674 2.25 13.85 5.654 3.168 3.426 4.898 7.977 4.914 13.267-.02 5.154-1.87 9.4-5.162 12.655zm22.65-34.914h-2.207c-.98 0-1.774.79-1.774 1.763v40.498c0 .973.793 1.763 1.773 1.763h2.206c.978 0 1.773-.788 1.773-1.762v-40.5c0-.972-.795-1.762-1.774-1.762zm57.66 0h-2.206c-.98 0-1.774.79-1.774 1.763v40.498c0 .973.793 1.763 1.774 1.763h2.206c.98 0 1.774-.788 1.774-1.762v-40.5c0-.972-.796-1.762-1.774-1.762zm51.872 0h-2.053c-1.614 0-2.06.207-2.785 1.654-.724 1.44-16.7 32.906-16.7 32.906s-15.98-31.466-16.7-32.906c-.728-1.447-1.173-1.654-2.786-1.654h-2.054c-1.51 0-2.326.667-1.475 2.366.854 1.7 20.53 40.088 20.53 40.088.517.972 1.463 1.57 2.486 1.57 1.02 0 1.965-.598 2.483-1.57.033-.07 19.676-38.39 20.525-40.088.85-1.7.038-2.366-1.473-2.366zM108.886 59.56c.834 1.054 1.432 1.47 3.044 1.47h3.308c2.082 0 1.35-.94.76-1.71-1.47-1.927-15.97-20.25-15.97-20.25s15.022-18.425 16.493-20.353c.59-.77 1.323-1.71-.76-1.71h-3.307c-1.613 0-2.212.415-3.045 1.472-.832 1.053-13.04 15.97-13.04 15.97S84.15 19.534 83.317 18.48c-.833-1.058-1.432-1.474-3.044-1.474h-3.308c-2.08 0-1.35.94-.76 1.71 1.47 1.93 16.503 20.355 16.503 20.355S77.77 57.394 76.3 59.32c-.59.77-1.322 1.71.76 1.71h3.308c1.613 0 2.21-.416 3.045-1.47.832-1.057 12.954-15.872 12.954-15.872l12.52 15.87zM67.54 0c-1.317 0-2.412.436-3.29 1.307-.875.87-1.314 1.96-1.314 3.268 0 1.306.44 2.396 1.315 3.267.878.87 1.973 1.307 3.29 1.307 1.314 0 2.41-.437 3.286-1.308.877-.87 1.316-1.96 1.316-3.267s-.44-2.397-1.316-3.268C69.95.437 68.854 0 67.54 0zm57.66 0c-1.314 0-2.41.436-3.285 1.307-.878.87-1.316 1.96-1.316 3.268 0 1.306.437 2.396 1.315 3.267.876.87 1.97 1.307 3.286 1.307 1.317 0 2.412-.437 3.29-1.308.875-.87 1.314-1.96 1.314-3.267s-.44-2.397-1.314-3.268C127.612.437 126.517 0 125.2 0z"
Fill="#0096FA" />
</Canvas>
</Viewbox>
@ -50,16 +45,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<xctk:WatermarkTextBox x:Name="Email" Padding="10,0,0,0" VerticalContentAlignment="Center"
Background="Transparent" BorderThickness="0" FontFamily="Microsoft YaHei UI Light"
FontSize="20" TextWrapping="Wrap"
Watermark="{x:Static i18N:AkaI18N.SignInAccount}" />
Watermark="{Binding Path=(i18N:AkaI18N.SignInAccount)}" />
</Border>
<Border Grid.Row="1" Height="60" Margin="50,90,50,0"
HorizontalAlignment="Stretch" VerticalAlignment="Top" BorderBrush="Black"
BorderThickness="0.5,0.25,0.5,0.5" CornerRadius="0 0 5 5">
<xctk:WatermarkPasswordBox x:Name="Password" Padding="10,0,0,0" VerticalContentAlignment="Center"
Background="Transparent" BorderThickness="0"
FontFamily="Microsoft YaHei UI Light"
Background="Transparent" BorderThickness="0" FontFamily="Microsoft YaHei UI Light"
FontSize="20" TextWrapping="Wrap"
Watermark="{x:Static i18N:AkaI18N.SignInPassword}" />
Watermark="{Binding Path=(i18N:AkaI18N.SignInPassword)}" />
</Border>
<TextBlock x:Name="ErrorMessage" Grid.Row="2" Height="50"
VerticalAlignment="Top" FontFamily="Microsoft YaHei UI Light" FontSize="15"
@ -68,13 +62,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<Button x:Name="Login" Grid.Row="2" Height="50"
Margin="70,10,70,30" VerticalAlignment="Center" Background="#0096FA"
BorderBrush="Transparent" Click="Login_OnClick"
Content="{x:Static i18N:AkaI18N.SignInButtonText}"
Content="{Binding Path=(i18N:AkaI18N.SignInButtonText)}"
FontFamily="Microsoft YaHei UI Light" FontSize="20" IsDefault="True" />
<materialDesign:DialogHost x:Name="DialogHost" Grid.Row="0" Grid.RowSpan="3"
Style="{DynamicResource MaterialDesignEmbeddedDialogHost}">
<materialDesign:DialogHost.DialogContent>
<Grid Margin="20">
<TextBlock Text="{x:Static i18N:AkaI18N.SignInUpdatingSession}" />
<TextBlock Text="{Binding Path=(i18N:AkaI18N.SignInUpdatingSession)}" />
</Grid>
</materialDesign:DialogHost.DialogContent>
</materialDesign:DialogHost>
@ -83,10 +77,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
IsOpen="False"
Style="{DynamicResource MaterialDesignEmbeddedDialogHost}">
<materialDesign:DialogHost.DialogContent>
<ScrollViewer HorizontalAlignment="Center" VerticalAlignment="Center"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" HorizontalScrollBarVisibility="Visible"
VerticalScrollBarVisibility="Visible">
<ScrollViewer HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible">
<wpf:ChromiumWebBrowser x:Name="ChromiumWebBrowser" Width="1000" Height="700"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
RequestHandler="{x:Static webApi:BypassProxyRequestHandler.Instance}" />

View File

@ -15,17 +15,10 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<UserControl x:Class="Pixeval.UI.UserControls.DownloadQueue"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
xmlns:i18N="clr-namespace:Pixeval.Objects.I18n"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:valueConverters="clr-namespace:Pixeval.Objects.ValueConverters"
xmlns:viewModel="clr-namespace:Pixeval.Data.ViewModel" Width="800"
<UserControl x:Class="Pixeval.UI.UserControls.DownloadQueue" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
xmlns:i18N="clr-namespace:Pixeval.Objects.I18n" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:valueConverters="clr-namespace:Pixeval.Objects.ValueConverters" xmlns:viewModel="clr-namespace:Pixeval.Data.ViewModel" Width="800"
Height="450" mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
@ -45,17 +38,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<SolidColorBrush x:Key="SecondaryAccentForegroundBrush" Color="#007CEE" />
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource MaterialDesignTabablzControlStyle}"
TargetType="{x:Type dragablz:TabablzControl}" />
<Style BasedOn="{StaticResource MaterialDesignTabablzControlStyle}" TargetType="{x:Type dragablz:TabablzControl}" />
<valueConverters:DoubleToPercentConverter x:Key="DoubleToPercentConverter" />
<DataTemplate x:Key="DownloadItemTemplate" DataType="viewModel:DownloadableIllustration">
<ListBoxItem Width="780" Height="70" HorizontalContentAlignment="Stretch">
<ListBoxItem.ContextMenu>
<ContextMenu>
<MenuItem Click="ShowDownloadIllustration"
Header="{x:Static i18N:AkaI18N.DownloadQueueShowDownloadIllust}" />
<MenuItem Click="RemoveFromDownloading"
Header="{x:Static i18N:AkaI18N.DownloadQueueRemoveFromDownloading}" />
<MenuItem Click="ShowDownloadIllustration" Header="{Binding Path=(i18N:AkaI18N.DownloadQueueShowDownloadIllust)}" />
<MenuItem Click="RemoveFromDownloading" Header="{Binding Path=(i18N:AkaI18N.DownloadQueueRemoveFromDownloading)}" />
</ContextMenu>
</ListBoxItem.ContextMenu>
<Grid Height="45" Margin="0,0,0,10" VerticalAlignment="Top">
@ -74,13 +64,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
Foreground="#007CEE" Maximum="1"
Style="{StaticResource RoundedCornerProgressBar}"
Value="{Binding Progress}" />
<StackPanel Margin="5,5,5,0" Orientation="Horizontal"
TextElement.FontFamily="Microsoft YaHei Light"
<StackPanel Margin="5,5,5,0" Orientation="Horizontal" TextElement.FontFamily="Microsoft YaHei Light"
TextElement.FontSize="12">
<TextBlock x:Name="ProgressIndicator"
Text="{Binding Progress, Converter={StaticResource DoubleToPercentConverter}}" />
<TextBlock Margin="10,0,0,0"
Text="{Binding DownloadState.Value, Converter={StaticResource EnumToStringConverter}}" />
<TextBlock x:Name="ProgressIndicator" Text="{Binding Progress, Converter={StaticResource DoubleToPercentConverter}}" />
<TextBlock Margin="10,0,0,0" Text="{Binding DownloadState.Value, Converter={StaticResource EnumToStringConverter}}" />
<TextBlock x:Name="HintMessage" MaxWidth="500" Margin="10,0,0,0"
HorizontalAlignment="Right"
Text="{Binding ReasonPhase}"
@ -92,14 +79,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<StackPanel Height="30" HorizontalAlignment="Right" Orientation="Horizontal">
<Grid Width="30" Height="30">
<TextBlock x:Name="RetryButton" HorizontalAlignment="Right" Cursor="Hand"
FontFamily="/Resources/#dqueue" FontSize="25"
MouseLeftButtonDown="RetryButton_OnMouseLeftButtonDown"
FontFamily="/Resources/#dqueue" FontSize="25" MouseLeftButtonDown="RetryButton_OnMouseLeftButtonDown"
Text="&#xea9e;" />
</Grid>
<Grid Width="30" Height="30" Margin="10,0,0,0">
<TextBlock x:Name="CancelButton" HorizontalAlignment="Right" Cursor="Hand"
FontFamily="/Resources/#dqueue" FontSize="25"
MouseLeftButtonDown="CancelButton_OnMouseLeftButtonDown"
FontFamily="/Resources/#dqueue" FontSize="25" MouseLeftButtonDown="CancelButton_OnMouseLeftButtonDown"
Text="&#xe63a;" />
</Grid>
</StackPanel>
@ -110,10 +95,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<ListBoxItem Width="780" Height="70" HorizontalContentAlignment="Stretch">
<ListBoxItem.ContextMenu>
<ContextMenu>
<MenuItem Click="ShowDownloadIllustration"
Header="{x:Static i18N:AkaI18N.DownloadQueueShowDownloadIllust}" />
<MenuItem Click="RemoveFromDownloaded"
Header="{x:Static i18N:AkaI18N.DownloadQueueRemoveFromDownloading}" />
<MenuItem Click="ShowDownloadIllustration" Header="{Binding Path=(i18N:AkaI18N.DownloadQueueShowDownloadIllust)}" />
<MenuItem Click="RemoveFromDownloaded" Header="{Binding Path=(i18N:AkaI18N.DownloadQueueRemoveFromDownloading)}" />
</ContextMenu>
</ListBoxItem.ContextMenu>
<Grid Height="50" Margin="0,0,0,10" VerticalAlignment="Top">
@ -132,13 +115,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
Foreground="#007CEE" Maximum="1"
Style="{StaticResource RoundedCornerProgressBar}"
Value="{Binding Progress}" />
<StackPanel Margin="5,5,5,0" Orientation="Horizontal"
TextElement.FontFamily="Microsoft YaHei Light"
<StackPanel Margin="5,5,5,0" Orientation="Horizontal" TextElement.FontFamily="Microsoft YaHei Light"
TextElement.FontSize="12">
<TextBlock x:Name="ProgressIndicator"
Text="{Binding Progress, Converter={StaticResource DoubleToPercentConverter}}" />
<TextBlock Margin="10,0,0,0"
Text="{Binding DownloadState.Value, Converter={StaticResource EnumToStringConverter}}" />
<TextBlock x:Name="ProgressIndicator" Text="{Binding Progress, Converter={StaticResource DoubleToPercentConverter}}" />
<TextBlock Margin="10,0,0,0" Text="{Binding DownloadState.Value, Converter={StaticResource EnumToStringConverter}}" />
<TextBlock x:Name="HintMessage" MaxWidth="500" Margin="10,0,0,0"
HorizontalAlignment="Right"
Text="{Binding ReasonPhase}"
@ -152,9 +132,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
Cursor="Hand" MouseLeftButtonDown="ViewDownloadLocationButton_OnMouseLeftButtonDown">
<Viewbox Width="24" Height="24">
<Canvas Width="24" Height="24">
<Path
Data="M20,6A2,2 0 0,1 22,8V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4H10L12,6H20M10.75,13H14V17H16V13H19.25L15,8.75"
Fill="Gray" />
<Path Data="M20,6A2,2 0 0,1 22,8V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4H10L12,6H20M10.75,13H14V17H16V13H19.25L15,8.75" Fill="Gray" />
</Canvas>
</Viewbox>
</Grid>
@ -168,13 +146,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<Grid>
<Grid VerticalAlignment="Top">
<Image x:Name="BrowsingHistoryMainImage" Width="175" Height="175"
HorizontalAlignment="Center" Cursor="Hand"
Loaded="BrowsingHistoryMainImage_OnLoaded"
MouseLeftButtonDown="BrowsingHistoryMainImage_OnMouseLeftButtonDown"
Stretch="UniformToFill"
HorizontalAlignment="Center" Cursor="Hand" Loaded="BrowsingHistoryMainImage_OnLoaded"
MouseLeftButtonDown="BrowsingHistoryMainImage_OnMouseLeftButtonDown" Stretch="UniformToFill"
Style="{StaticResource ReleaseImageStyle}" />
<Grid Background="Transparent" Cursor="Hand"
MouseLeftButtonDown="ReferUser_OnMouseLeftButtonDown"
<Grid Background="Transparent" Cursor="Hand" MouseLeftButtonDown="ReferUser_OnMouseLeftButtonDown"
Visibility="{Binding IsReferToUser, Converter={StaticResource VisibleIfTrueConverter}}">
<Grid Width="80" Height="80" HorizontalAlignment="Center"
VerticalAlignment="Center" Background="Gray" Opacity="0.3">
@ -219,12 +194,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<DrawingImage x:Key="EmptyBox">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,-12 V500 H512.00032 V0 H-12 Z">
<GeometryDrawing Brush="Gray"
Geometry="F1 M512.00032,512z M0,0z M455.074219,172.613281L509.070312,118.617188C511.296875,116.394531 512.34375,113.25 511.898438,110.136719 511.457031,107.023438 509.570312,104.296875 506.8125,102.78125L441.898438,67.136719C437.058594,64.480469 430.980469,66.25 428.320312,71.089844 425.664062,75.933594 427.429688,82.011719 432.273438,84.667969L485.507812,113.898438 439.167969,160.234375 272.5,68.714844 318.835938,22.378906 365.675781,48.101562C370.515625,50.757812 376.597656,48.992188 379.253906,44.148438 381.914062,39.308594 380.144531,33.226562 375.300781,30.570312L321.882812,1.234375C317.984375,-0.90625,313.140625,-0.214844,310,2.929688L256,56.929688 202,2.929688C198.855469,-0.214844000000001,194.011719,-0.902344000000001,190.117188,1.234375L5.18750000000017,102.78125C2.42968800000017,104.296875 0.542969000000171,107.019531 0.101562000000171,110.136719 -0.343749999999829,113.25 0.703125000000171,116.394531 2.92968800000017,118.617188L56.9257810000002,172.613281 2.92968800000017,226.605469C0.703125000000169,228.832031 -0.343749999999831,231.972656 0.101562000000169,235.089844 0.542969000000169,238.203125 2.42968800000017,240.929688 5.18750000000017,242.441406L61.0703120000002,273.128906 61.0703120000002,375.699219C61.0703120000002,379.351562,63.0585940000002,382.710938,66.2578120000002,384.46875L251.1875,486.011719C252.6875,486.835938 254.34375,487.246094 256,487.246094 257.65625,487.246094 259.3125,486.835938 260.8125,486.011719L445.742188,384.46875C448.941406,382.710938,450.929688,379.351562,450.929688,375.699219L450.929688,273.128906 506.8125,242.445312C509.570312,240.929688 511.457031,238.203125 511.898438,235.089844 512.34375,231.976562 511.296875,228.832031 509.070312,226.609375z M256,262.746094L91.847656,172.609375 256,82.46875 420.152344,172.609375z M193.167969,22.378906L239.5,68.714844 72.832031,160.234375 26.496094,113.898438z M72.839844,184.988281L239.507812,276.507812 193.167969,322.847656 26.496094,231.328125z M430.929688,369.785156L266,460.347656 266,358.125C266,352.601562 261.523438,348.125 256,348.125 250.476562,348.125 246,352.601562 246,358.125L246,460.347656 81.0703120000001,369.785156 81.0703120000001,284.113281 190.117188,343.992188C191.628906,344.820312 193.285156,345.226562 194.925781,345.226562 197.515625,345.226562 200.078125,344.21875 202,342.296875L256,288.296875 310,342.296875C311.921875,344.222656 314.484375,345.226562 317.074219,345.226562 318.714844,345.226562 320.371094,344.820312 321.882812,343.992188L430.929688,284.113281z M318.835938,322.847656L272.496094,276.503906 439.164062,184.988281 485.507812,231.324219z M318.835938,322.847656" />
<GeometryDrawing Brush="Gray"
Geometry="F1 M512.00032,512z M0,0z M404.800781,68.175781C407.429688,68.175781 410,67.105469 411.871094,65.242188 413.730469,63.382812 414.800781,60.804688 414.800781,58.175781 414.800781,55.542969 413.730469,52.964844 411.871094,51.105469 410.011719,49.242188 407.429688,48.175781 404.800781,48.175781 402.160156,48.175781 399.589844,49.242188 397.730469,51.105469 395.859375,52.964844 394.800781,55.542969 394.800781,58.175781 394.800781,60.804688 395.859375,63.382812 397.730469,65.242188 399.589844,67.105469 402.171875,68.175781 404.800781,68.175781z M404.800781,68.175781" />
<GeometryDrawing Brush="Gray"
Geometry="F1 M512.00032,512z M0,0z M256,314.925781C253.371094,314.925781 250.789062,315.992188 248.929688,317.855469 247.070312,319.722656 246,322.292969 246,324.925781 246,327.5625 247.070312,330.132812 248.929688,332.003906 250.789062,333.863281 253.371094,334.925781 256,334.925781 258.628906,334.925781 261.210938,333.863281 263.070312,332.003906 264.929688,330.132812 266,327.5625 266,324.925781 266,322.292969 264.929688,319.722656 263.070312,317.855469 261.210938,315.992188 258.628906,314.925781 256,314.925781z M256,314.925781" />
<GeometryDrawing Brush="Gray" Geometry="F1 M512.00032,512z M0,0z M455.074219,172.613281L509.070312,118.617188C511.296875,116.394531 512.34375,113.25 511.898438,110.136719 511.457031,107.023438 509.570312,104.296875 506.8125,102.78125L441.898438,67.136719C437.058594,64.480469 430.980469,66.25 428.320312,71.089844 425.664062,75.933594 427.429688,82.011719 432.273438,84.667969L485.507812,113.898438 439.167969,160.234375 272.5,68.714844 318.835938,22.378906 365.675781,48.101562C370.515625,50.757812 376.597656,48.992188 379.253906,44.148438 381.914062,39.308594 380.144531,33.226562 375.300781,30.570312L321.882812,1.234375C317.984375,-0.90625,313.140625,-0.214844,310,2.929688L256,56.929688 202,2.929688C198.855469,-0.214844000000001,194.011719,-0.902344000000001,190.117188,1.234375L5.18750000000017,102.78125C2.42968800000017,104.296875 0.542969000000171,107.019531 0.101562000000171,110.136719 -0.343749999999829,113.25 0.703125000000171,116.394531 2.92968800000017,118.617188L56.9257810000002,172.613281 2.92968800000017,226.605469C0.703125000000169,228.832031 -0.343749999999831,231.972656 0.101562000000169,235.089844 0.542969000000169,238.203125 2.42968800000017,240.929688 5.18750000000017,242.441406L61.0703120000002,273.128906 61.0703120000002,375.699219C61.0703120000002,379.351562,63.0585940000002,382.710938,66.2578120000002,384.46875L251.1875,486.011719C252.6875,486.835938 254.34375,487.246094 256,487.246094 257.65625,487.246094 259.3125,486.835938 260.8125,486.011719L445.742188,384.46875C448.941406,382.710938,450.929688,379.351562,450.929688,375.699219L450.929688,273.128906 506.8125,242.445312C509.570312,240.929688 511.457031,238.203125 511.898438,235.089844 512.34375,231.976562 511.296875,228.832031 509.070312,226.609375z M256,262.746094L91.847656,172.609375 256,82.46875 420.152344,172.609375z M193.167969,22.378906L239.5,68.714844 72.832031,160.234375 26.496094,113.898438z M72.839844,184.988281L239.507812,276.507812 193.167969,322.847656 26.496094,231.328125z M430.929688,369.785156L266,460.347656 266,358.125C266,352.601562 261.523438,348.125 256,348.125 250.476562,348.125 246,352.601562 246,358.125L246,460.347656 81.0703120000001,369.785156 81.0703120000001,284.113281 190.117188,343.992188C191.628906,344.820312 193.285156,345.226562 194.925781,345.226562 197.515625,345.226562 200.078125,344.21875 202,342.296875L256,288.296875 310,342.296875C311.921875,344.222656 314.484375,345.226562 317.074219,345.226562 318.714844,345.226562 320.371094,344.820312 321.882812,343.992188L430.929688,284.113281z M318.835938,322.847656L272.496094,276.503906 439.164062,184.988281 485.507812,231.324219z M318.835938,322.847656" />
<GeometryDrawing Brush="Gray" Geometry="F1 M512.00032,512z M0,0z M404.800781,68.175781C407.429688,68.175781 410,67.105469 411.871094,65.242188 413.730469,63.382812 414.800781,60.804688 414.800781,58.175781 414.800781,55.542969 413.730469,52.964844 411.871094,51.105469 410.011719,49.242188 407.429688,48.175781 404.800781,48.175781 402.160156,48.175781 399.589844,49.242188 397.730469,51.105469 395.859375,52.964844 394.800781,55.542969 394.800781,58.175781 394.800781,60.804688 395.859375,63.382812 397.730469,65.242188 399.589844,67.105469 402.171875,68.175781 404.800781,68.175781z M404.800781,68.175781" />
<GeometryDrawing Brush="Gray" Geometry="F1 M512.00032,512z M0,0z M256,314.925781C253.371094,314.925781 250.789062,315.992188 248.929688,317.855469 247.070312,319.722656 246,322.292969 246,324.925781 246,327.5625 247.070312,330.132812 248.929688,332.003906 250.789062,333.863281 253.371094,334.925781 256,334.925781 258.628906,334.925781 261.210938,333.863281 263.070312,332.003906 264.929688,330.132812 266,327.5625 266,324.925781 266,322.292969 264.929688,319.722656 263.070312,317.855469 261.210938,315.992188 258.628906,314.925781 256,314.925781z M256,314.925781" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
@ -234,7 +206,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<TabItem Background="White" Opacity="1">
<TabItem.Header>
<TextBlock FontFamily="Microsoft YaHei Light" FontSize="14"
Text="{x:Static i18N:AkaI18N.DownloadQueueDownloading}" />
Text="{Binding Path=(i18N:AkaI18N.DownloadQueueDownloading)}" />
</TabItem.Header>
<Grid Background="White">
<ListBox x:Name="DownloadItemsQueue" Margin="0,10,0,0" HorizontalAlignment="Center"
@ -251,7 +223,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<Image Width="120" Height="120"
Source="{StaticResource EmptyBox}" />
<TextBlock HorizontalAlignment="Stretch" FontFamily="Microsoft YaHei Light" FontSize="25"
Text="{x:Static i18N:AkaI18N.DownloadQueueEmptyNotifier}" />
Text="{Binding Path=(i18N:AkaI18N.DownloadQueueEmptyNotifier)}" />
</StackPanel>
</Grid>
</Grid>
@ -259,7 +231,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<TabItem Background="White" Opacity="1">
<TabItem.Header>
<TextBlock FontFamily="Microsoft YaHei Light" FontSize="14"
Text="{x:Static i18N:AkaI18N.DownloadQueueDownloaded}" />
Text="{Binding Path=(i18N:AkaI18N.DownloadQueueDownloaded)}" />
</TabItem.Header>
<Grid Background="White">
<ListBox x:Name="DownloadedItemsQueue" Margin="0,10,0,0" HorizontalAlignment="Center"
@ -276,7 +248,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<Image Width="120" Height="120"
Source="{StaticResource EmptyBox}" />
<TextBlock HorizontalAlignment="Stretch" FontFamily="Microsoft YaHei Light" FontSize="25"
Text="{x:Static i18N:AkaI18N.DownloadQueueEmptyNotifier}" />
Text="{Binding Path=(i18N:AkaI18N.DownloadQueueEmptyNotifier)}" />
</StackPanel>
</Grid>
</Grid>
@ -284,15 +256,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<TabItem Background="White">
<TabItem.Header>
<TextBlock FontFamily="Microsoft YaHei Light" FontSize="14"
Text="{x:Static i18N:AkaI18N.DownloadQueueBrowsingHistory}" />
Text="{Binding Path=(i18N:AkaI18N.DownloadQueueBrowsingHistory)}" />
</TabItem.Header>
<Grid Background="White">
<ListView x:Name="BrowsingHistoryQueue" Margin="0,10,0,0" HorizontalAlignment="Center"
ItemTemplate="{StaticResource BrowsingHistoryItemTemplate}"
ScrollViewer.CanContentScroll="False" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
VirtualizingPanel.CacheLength="0 0"
VirtualizingPanel.CacheLengthUnit="Pixel" VirtualizingPanel.ScrollUnit="Pixel"
VirtualizingPanel.VirtualizationMode="Standard">
ScrollViewer.CanContentScroll="False" ScrollViewer.HorizontalScrollBarVisibility="Disabled" VirtualizingPanel.CacheLength="0 0"
VirtualizingPanel.CacheLengthUnit="Pixel" VirtualizingPanel.ScrollUnit="Pixel" VirtualizingPanel.VirtualizationMode="Standard">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<controls:VirtualizingWrapPanel Orientation="Vertical" />
@ -304,7 +274,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<Image Width="120" Height="120"
Source="{StaticResource EmptyBox}" />
<TextBlock HorizontalAlignment="Stretch" FontFamily="Microsoft YaHei Light" FontSize="25"
Text="{x:Static i18N:AkaI18N.DownloadQueueHistoryListIsEmpty}" />
Text="{Binding Path=(i18N:AkaI18N.DownloadQueueHistoryListIsEmpty)}" />
</StackPanel>
</Grid>
</Grid>

View File

@ -77,7 +77,7 @@ namespace Pixeval.UI.UserControls
private void ViewDownloadLocationButton_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
var model = sender.GetDataContext<DownloadableIllustration>();
if (!model.GetPath().IsNullOrEmpty() && Path.GetDirectoryName(model.GetPath()) is var p)
if (!model.GetPath().IsNullOrEmpty() && Path.GetDirectoryName(model.GetPath()) is var _)
{
var processInfo = new ProcessStartInfo
{

View File

@ -15,11 +15,8 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<UserControl x:Class="Pixeval.UI.UserControls.IllustPresenter"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i18N="clr-namespace:Pixeval.Objects.I18n" xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
<UserControl x:Class="Pixeval.UI.UserControls.IllustPresenter" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:i18N="clr-namespace:Pixeval.Objects.I18n" xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Width="1000" Height="600"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Unloaded="IllustPresenter_OnUnloaded" mc:Ignorable="d">
@ -30,15 +27,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
Stretch="Uniform">
<Image.ContextMenu>
<ContextMenu>
<MenuItem Click="MenuItem_OnClick" Header="{x:Static i18N:AkaI18N.Copy}" />
<MenuItem Click="MenuItem_OnClick" Header="{Binding Path=(i18N:AkaI18N.Copy)}" />
</ContextMenu>
</Image.ContextMenu>
<Image.Effect>
<BlurEffect KernelType="Gaussian" Radius="15" />
</Image.Effect>
</Image>
<Grid x:Name="LoadingMask"
Visibility="{Binding LoadingOrigin, Converter={StaticResource VisibleIfTrueConverter}}">
<Grid x:Name="LoadingMask" Visibility="{Binding LoadingOrigin, Converter={StaticResource VisibleIfTrueConverter}}">
<ProgressBar x:Name="OriginalLoadIndicator" Width="200" Height="10"
HorizontalAlignment="Center" VerticalAlignment="Center" Background="#D4E5F9"
BorderThickness="0" Foreground="#007CEE" Maximum="1"
@ -56,20 +52,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
</Grid.ColumnDefinitions>
<Button x:Name="MovePrevButton" Grid.Column="0"
Height="{Binding ElementName=ContentImage, Path=ActualHeight}"
Click="MovePrevButton_OnClick"
PreviewMouseRightButtonDown="MovePrevButton_OnPreviewMouseRightButtonDown"
Click="MovePrevButton_OnClick" PreviewMouseRightButtonDown="MovePrevButton_OnPreviewMouseRightButtonDown"
Style="{DynamicResource MaterialDesignToolButton}" />
<Button x:Name="MoveNextButton" Grid.Column="1"
Height="{Binding ElementName=ContentImage, Path=ActualHeight}"
Click="MoveNextButton_OnClick"
PreviewMouseRightButtonDown="MoveNextButton_OnPreviewMouseRightButtonDown"
Click="MoveNextButton_OnClick" PreviewMouseRightButtonDown="MoveNextButton_OnPreviewMouseRightButtonDown"
Style="{DynamicResource MaterialDesignToolButton}" />
</Grid>
<Grid Visibility="{Binding Illust.IsUgoira, Converter={StaticResource VisibleIfTrueConverter}}">
<TextBlock x:Name="PlayGif" HorizontalAlignment="Center" VerticalAlignment="Center"
Cursor="Hand" FontFamily="/Resources/#dqueue" FontSize="54"
Foreground="#B1B1B1" PreviewMouseLeftButtonDown="PlayGif_OnPreviewMouseLeftButtonDown"
Text="&#xeb78;"
Foreground="#B1B1B1" PreviewMouseLeftButtonDown="PlayGif_OnPreviewMouseLeftButtonDown" Text="&#xeb78;"
Visibility="{Binding PlayButtonVisible, Converter={StaticResource VisibleIfTrueConverter}}" />
<mah:ProgressRing x:Name="GifLoadingProgressBar" Width="50" Height="50"
Foreground="#66CCFF"

View File

@ -15,14 +15,9 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<UserControl x:Class="Pixeval.UI.UserControls.InputBoxControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i18N="clr-namespace:Pixeval.Objects.I18n"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
<UserControl x:Class="Pixeval.UI.UserControls.InputBoxControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:i18N="clr-namespace:Pixeval.Objects.I18n" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
d:DataContext="{d:DesignData IllustrationQualification}"
TextElement.FontFamily="Microsoft YaHei Light" TextElement.FontSize="12px" mc:Ignorable="d">
<UserControl.Background>
@ -32,7 +27,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
materialDesign:ShadowAssist.Darken="True" materialDesign:ShadowAssist.ShadowDepth="Depth3">
<StackPanel>
<TextBox x:Name="ConditionTextBox" Margin="10"
materialDesign:HintAssist.Hint="{x:Static i18N:AkaI18N.ConditionBoxHint}"
materialDesign:HintAssist.Hint="{Binding Path=(i18N:AkaI18N.ConditionBoxHint)}"
PreviewKeyDown="ConditionTextBox_OnPreviewKeyDown"
Style="{DynamicResource MaterialDesignFloatingHintTextBox}"
Text="{Binding Condition, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

View File

@ -22,10 +22,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
xmlns:i18N="clr-namespace:Pixeval.Objects.I18n"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pixeval="clr-namespace:Pixeval"
xmlns:valueConverters="clr-namespace:Pixeval.Objects.ValueConverters"
xmlns:viewModel="clr-namespace:Pixeval.Data.ViewModel"
d:DataContext="{d:DesignData Settings}"
TextElement.FontFamily="Microsoft YaHei Light" mc:Ignorable="d">
TextElement.FontFamily="Microsoft YaHei Light"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
@ -44,11 +46,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<valueConverters:QueryR18ToggleButtonIsCheckedConverter x:Key="QueryR18ToggleButtonIsCheckedConverter" />
</ResourceDictionary>
</UserControl.Resources>
<materialDesign:Card Width="950" Height="660">
<materialDesign:Card Width="1000" Height="665">
<Grid>
<TextBlock Height="30" Margin="0,30,0,0" HorizontalAlignment="Center"
VerticalAlignment="Top" FontSize="20"
Text="{x:Static i18N:AkaI18N.PixevalSettings}" />
<TextBlock Height="30"
Margin="0,30,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="20"
Text="{Binding Path=(i18N:AkaI18N.PixevalSettings)}" />
<Separator Margin="50,70,50,0" VerticalAlignment="Top" />
<StackPanel Margin="100,90,100,0" VerticalAlignment="Top">
<Grid TextElement.FontSize="15">
@ -72,122 +77,194 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<ColumnDefinition Width="5*" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"
Text="{x:Static i18N:AkaI18N.SortByPopulation}" />
<ToggleButton Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right"
VerticalAlignment="Center" Background="#66CCFF"
<TextBlock Grid.Row="0"
Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding Path=(i18N:AkaI18N.SortByPopulation)}" />
<ToggleButton Grid.Row="0"
Grid.Column="1"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="#66CCFF"
IsChecked="{Binding Path=SortOnInserting, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center"
Text="{x:Static i18N:AkaI18N.TurnOffR18}" />
<ToggleButton Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right"
VerticalAlignment="Center" Background="#66CCFF" Checked="QueryR18_OnChecked"
<TextBlock Grid.Row="1"
Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding Path=(i18N:AkaI18N.TurnOffR18)}" />
<ToggleButton Grid.Row="1"
Grid.Column="1"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="#66CCFF"
Checked="QueryR18_OnChecked"
IsChecked="{Binding Path=ExcludeTag, Mode=OneWay, Converter={StaticResource QueryR18ToggleButtonIsCheckedConverter}}"
Unchecked="QueryR18_OnUnchecked" />
<TextBlock Grid.Row="2" Grid.Column="0" VerticalAlignment="Center"
Text="{x:Static i18N:AkaI18N.TurnOnIllustratorRecommend}" />
<ToggleButton Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right"
VerticalAlignment="Center" Background="#66CCFF"
<TextBlock Grid.Row="2"
Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding Path=(i18N:AkaI18N.TurnOnIllustratorRecommend)}" />
<ToggleButton Grid.Row="2"
Grid.Column="1"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="#66CCFF"
IsChecked="{Binding Path=RecommendIllustrator, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock Grid.Row="3" Grid.Column="0" VerticalAlignment="Center"
Text="{x:Static i18N:AkaI18N.TurnOnDirectConnect}" />
<ToggleButton Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right"
VerticalAlignment="Center" Background="#66CCFF"
<TextBlock Grid.Row="3"
Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding Path=(i18N:AkaI18N.CreateNewFolderWhenDownloadFromUser)}" />
<ToggleButton Grid.Row="3"
Grid.Column="1"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="#66CCFF"
IsChecked="{Binding Path=CreateNewFolderWhenDownloadFromUser, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock Grid.Row="4"
Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding Path=(i18N:AkaI18N.TurnOnDirectConnect)}" />
<ToggleButton Grid.Row="4"
Grid.Column="1"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="#66CCFF"
IsChecked="{Binding Path=DirectConnect, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock Grid.Row="4" Grid.Column="0" VerticalAlignment="Center"
Text="{x:Static i18N:AkaI18N.TagMatchOption}" />
<ComboBox Grid.Row="4" Grid.Column="1" Width="120"
HorizontalAlignment="Right" VerticalAlignment="Center" DisplayMemberPath="Description"
<TextBlock Grid.Row="5"
Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding Path=(i18N:AkaI18N.SelectCultureInfo)}" />
<ComboBox x:Name="CultureSelector"
Grid.Row="5"
Grid.Column="1"
Width="120"
HorizontalAlignment="Right"
VerticalAlignment="Center"
DisplayMemberPath="LocalizedName"
FontSize="15"
ItemsSource="{x:Static pixeval:AppContext.AvailableCultures}"
SelectedItem="{Binding Path=Culture, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource MultiCultureConverter}}"
SelectionChanged="CultureSelector_OnSelectionChanged" />
<TextBlock Grid.Row="6"
Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding Path=(i18N:AkaI18N.TagMatchOption)}" />
<ComboBox Grid.Row="6"
Grid.Column="1"
Width="120"
HorizontalAlignment="Right"
VerticalAlignment="Center"
DisplayMemberPath="Description"
FontSize="15"
ItemsSource="{x:Static viewModel:SearchTagMatchOptionModel.AllPossibleMatchOptions}"
SelectedItem="{Binding Path=TagMatchOption, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource TagMatchEnumToModelConverter}}" />
<TextBlock Grid.Row="5" Grid.Column="0" VerticalAlignment="Center"
Text="{x:Static i18N:AkaI18N.TurnOnCache}" />
<ToggleButton x:Name="UseCacheToggleButton" Grid.Row="5" Grid.Column="1"
HorizontalAlignment="Right" VerticalAlignment="Center" Background="#66CCFF"
IsChecked="{Binding Path=UseCache, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsThreeState="False" />
<TextBlock Grid.Row="6" Grid.Column="0" VerticalAlignment="Center">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Text" Value="{x:Static i18N:AkaI18N.MemoryCachePolicy}" />
<Style.Triggers>
<DataTrigger
Binding="{Binding ElementName=ChangeCachingPolicyToggleButton, Path=IsChecked}"
Value="True">
<Setter Property="Text" Value="{x:Static i18N:AkaI18N.FileCachePolicy}" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<ToggleButton x:Name="ChangeCachingPolicyToggleButton" Grid.Row="6" Grid.Column="1"
HorizontalAlignment="Right" VerticalAlignment="Center" Background="#66CCFF"
Checked="ChangeCachingPolicyToggleButton_OnChecked"
IsChecked="{Binding Path=CachingPolicy, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToCachingPolicyConverter}}"
IsEnabled="{Binding ElementName=UseCacheToggleButton, Path=IsChecked}"
IsThreeState="False" Unchecked="ChangeCachingPolicyToggleButton_OnUnchecked" />
<TextBlock Grid.Row="7" Grid.Column="0" VerticalAlignment="Center"
Text="{x:Static i18N:AkaI18N.MinBookmarkRequired}" />
<Slider Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="2"
Margin="200,0,0,0" VerticalAlignment="Center" AutoToolTipPlacement="BottomRight"
AutoToolTipPrecision="0" Foreground="#66CCFF" Maximum="2000"
<TextBlock Grid.Row="7"
Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding Path=(i18N:AkaI18N.MinBookmarkRequired)}" />
<Slider Grid.Row="7"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="200,0,0,0"
VerticalAlignment="Center"
AutoToolTipPlacement="BottomRight"
AutoToolTipPrecision="0"
Foreground="#66CCFF"
Maximum="2000"
Minimum="0"
Value="{Binding Path=MinBookmark, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock Grid.Row="8" Grid.Column="0" VerticalAlignment="Center"
Text="{x:Static i18N:AkaI18N.SearchPageCountHint}" />
<Slider Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="2"
Margin="200,0,0,0" VerticalAlignment="Center" AutoToolTipPlacement="BottomRight"
AutoToolTipPrecision="0" Foreground="#66CCFF" Maximum="100"
<TextBlock Grid.Row="8"
Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding Path=(i18N:AkaI18N.SearchPageCountHint)}" />
<Slider Grid.Row="8"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="200,0,0,0"
VerticalAlignment="Center"
AutoToolTipPlacement="BottomRight"
AutoToolTipPrecision="0"
Foreground="#66CCFF"
Maximum="100"
Minimum="1"
Value="{Binding QueryPages, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock Grid.Row="9" Grid.Column="0" VerticalAlignment="Center"
Text="{x:Static i18N:AkaI18N.SearchPageStart}" />
<TextBox Grid.Row="9" Grid.Column="0" Grid.ColumnSpan="2"
Margin="200,0,0,0" VerticalAlignment="Center"
Text="{Binding QueryStart, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock Grid.Row="10" Grid.Column="0" VerticalAlignment="Center"
Text="{x:Static i18N:AkaI18N.SpotlightSearchPageStart}" />
<TextBox Grid.Row="10" Grid.Column="0" Grid.ColumnSpan="2"
Margin="480,0,0,0" VerticalAlignment="Center"
Text="{Binding SpotlightQueryStart, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBox x:Name="DownloadLocationTextBox" Grid.Row="11" Grid.Column="0"
<TextBlock Grid.Row="9"
Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding Path=(i18N:AkaI18N.SearchPageStart)}" />
<TextBox Grid.Row="9"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="200,0,0,0"
VerticalAlignment="Center"
materialDesign:HintAssist.Hint="{x:Static i18N:AkaI18N.DownloadLocation}"
Text="{Binding QueryStart, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock Grid.Row="10"
Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding Path=(i18N:AkaI18N.SpotlightSearchPageStart)}" />
<TextBox Grid.Row="10"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="480,0,0,0"
VerticalAlignment="Center"
Text="{Binding SpotlightQueryStart, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBox x:Name="DownloadLocationTextBox"
Grid.Row="11"
Grid.Column="0"
VerticalAlignment="Center"
materialDesign:HintAssist.Hint="{Binding Path=(i18N:AkaI18N.DownloadLocation)}"
FontSize="13"
Style="{DynamicResource MaterialDesignFloatingHintTextBox}"
Text="{Binding Path=DownloadLocation, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<Button Grid.Row="11" Grid.Column="1" Width="30"
Height="30" VerticalAlignment="Center" Click="OpenFileDialogButton_OnClick"
<Button Grid.Row="11"
Grid.Column="1"
Width="30"
Height="30"
VerticalAlignment="Center"
Click="OpenFileDialogButton_OnClick"
Style="{DynamicResource MaterialDesignToolButton}">
<Viewbox Width="20" Height="20" VerticalAlignment="Bottom">
<Viewbox Width="20"
Height="20"
VerticalAlignment="Bottom">
<Canvas Width="24" Height="24">
<Path
Data="M4 4C2.89 4 2 4.89 2 6V18C2 19.11 2.9 20 4 20H12.08A7 7 0 0 1 12 19A7 7 0 0 1 19 12A7 7 0 0 1 22 12.69V8C22 6.89 21.1 6 20 6H12L10 4H4M18 14C17.87 14 17.76 14.09 17.74 14.21L17.55 15.53C17.25 15.66 16.96 15.82 16.7 16L15.46 15.5C15.35 15.5 15.22 15.5 15.15 15.63L14.15 17.36C14.09 17.47 14.11 17.6 14.21 17.68L15.27 18.5C15.25 18.67 15.24 18.83 15.24 19C15.24 19.17 15.25 19.33 15.27 19.5L14.21 20.32C14.12 20.4 14.09 20.53 14.15 20.64L15.15 22.37C15.21 22.5 15.34 22.5 15.46 22.5L16.7 22C16.96 22.18 17.24 22.35 17.55 22.47L17.74 23.79C17.76 23.91 17.86 24 18 24H20C20.11 24 20.22 23.91 20.24 23.79L20.43 22.47C20.73 22.34 21 22.18 21.27 22L22.5 22.5C22.63 22.5 22.76 22.5 22.83 22.37L23.83 20.64C23.89 20.53 23.86 20.4 23.77 20.32L22.7 19.5C22.72 19.33 22.74 19.17 22.74 19C22.74 18.83 22.73 18.67 22.7 18.5L23.76 17.68C23.85 17.6 23.88 17.47 23.82 17.36L22.82 15.63C22.76 15.5 22.63 15.5 22.5 15.5L21.27 16C21 15.82 20.73 15.65 20.42 15.53L20.23 14.21C20.22 14.09 20.11 14 20 14H18M19 17.5C19.83 17.5 20.5 18.17 20.5 19C20.5 19.83 19.83 20.5 19 20.5C18.16 20.5 17.5 19.83 17.5 19C17.5 18.17 18.17 17.5 19 17.5Z"
Fill="Gray" />
<Path Data="M4 4C2.89 4 2 4.89 2 6V18C2 19.11 2.9 20 4 20H12.08A7 7 0 0 1 12 19A7 7 0 0 1 19 12A7 7 0 0 1 22 12.69V8C22 6.89 21.1 6 20 6H12L10 4H4M18 14C17.87 14 17.76 14.09 17.74 14.21L17.55 15.53C17.25 15.66 16.96 15.82 16.7 16L15.46 15.5C15.35 15.5 15.22 15.5 15.15 15.63L14.15 17.36C14.09 17.47 14.11 17.6 14.21 17.68L15.27 18.5C15.25 18.67 15.24 18.83 15.24 19C15.24 19.17 15.25 19.33 15.27 19.5L14.21 20.32C14.12 20.4 14.09 20.53 14.15 20.64L15.15 22.37C15.21 22.5 15.34 22.5 15.46 22.5L16.7 22C16.96 22.18 17.24 22.35 17.55 22.47L17.74 23.79C17.76 23.91 17.86 24 18 24H20C20.11 24 20.22 23.91 20.24 23.79L20.43 22.47C20.73 22.34 21 22.18 21.27 22L22.5 22.5C22.63 22.5 22.76 22.5 22.83 22.37L23.83 20.64C23.89 20.53 23.86 20.4 23.77 20.32L22.7 19.5C22.72 19.33 22.74 19.17 22.74 19C22.74 18.83 22.73 18.67 22.7 18.5L23.76 17.68C23.85 17.6 23.88 17.47 23.82 17.36L22.82 15.63C22.76 15.5 22.63 15.5 22.5 15.5L21.27 16C21 15.82 20.73 15.65 20.42 15.53L20.23 14.21C20.22 14.09 20.11 14 20 14H18M19 17.5C19.83 17.5 20.5 18.17 20.5 19C20.5 19.83 19.83 20.5 19 20.5C18.16 20.5 17.5 19.83 17.5 19C17.5 18.17 18.17 17.5 19 17.5Z" Fill="Gray" />
</Canvas>
</Viewbox>
</Button>
<TextBox x:Name="ExcludeTagTextBox" Grid.Row="12" Grid.Column="0"
Grid.ColumnSpan="2" VerticalAlignment="Center"
materialDesign:HintAssist.Hint="{x:Static i18N:AkaI18N.TagsToBeExclude}"
FontSize="13" LostFocus="ExcludeTagTextBox_OnLostFocus"
<TextBox x:Name="ExcludeTagTextBox"
Grid.Row="12"
Grid.Column="0"
Grid.ColumnSpan="2"
VerticalAlignment="Center"
materialDesign:HintAssist.Hint="{Binding Path=(i18N:AkaI18N.TagsToBeExclude)}"
FontSize="13"
LostFocus="ExcludeTagTextBox_OnLostFocus"
Style="{DynamicResource MaterialDesignFloatingHintTextBox}"
Text="{Binding Path=ExcludeTag, Converter={StaticResource StringSplitConverter}, Mode=OneWay}" />
<TextBox x:Name="IncludeTagTextBox" Grid.Row="13" Grid.Column="0"
Grid.ColumnSpan="2" VerticalAlignment="Center"
materialDesign:HintAssist.Hint="{x:Static i18N:AkaI18N.TagsToBeInclude}"
FontSize="13" LostFocus="IncludeTagTextBox_OnLostFocus"
<TextBox x:Name="IncludeTagTextBox"
Grid.Row="13"
Grid.Column="0"
Grid.ColumnSpan="2"
VerticalAlignment="Center"
materialDesign:HintAssist.Hint="{Binding Path=(i18N:AkaI18N.TagsToBeInclude)}"
FontSize="13"
LostFocus="IncludeTagTextBox_OnLostFocus"
Style="{DynamicResource MaterialDesignFloatingHintTextBox}"
Text="{Binding Path=IncludeTag, Converter={StaticResource StringSplitConverter}, Mode=OneWay}" />
</Grid>
<Grid Margin="0,30,0,0">
<TextBlock VerticalAlignment="Bottom" FontSize="12"
Text="{x:Static i18N:AkaI18N.SearchPerPageCountHint}" />
<TextBlock x:Name="OpenWebApiR18Button" HorizontalAlignment="Right" VerticalAlignment="Bottom"
Cursor="Hand" FontFamily="/Pixeval;component/Resources/#dqueue" FontSize="15"
Foreground="#007CEE" MouseLeftButtonDown="OpenWebApiR18Button_OnMouseLeftButtonDown"
<TextBlock VerticalAlignment="Bottom"
FontSize="12"
Text="{Binding Path=(i18N:AkaI18N.SearchPerPageCountHint)}" />
<TextBlock x:Name="OpenWebApiR18Button"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Cursor="Hand"
FontFamily="/Pixeval;component/Resources/#dqueue"
FontSize="15"
Foreground="#007CEE"
MouseLeftButtonDown="OpenWebApiR18Button_OnMouseLeftButtonDown"
Text="&#xe70b;"
ToolTip="{x:Static i18N:AkaI18N.TurnOnWebR18}" />
ToolTip="{Binding Path=(i18N:AkaI18N.TurnOnWebR18)}" />
</Grid>
</StackPanel>
</Grid>

View File

@ -21,15 +21,13 @@
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media.Imaging;
using Microsoft.WindowsAPICodePack.Dialogs;
using Pixeval.Core;
using Pixeval.Data.ViewModel;
using Pixeval.Objects.Caching;
using Pixeval.Objects.Generic;
using Pixeval.Objects.I18n;
using Pixeval.Objects.Primitive;
using Pixeval.Persisting;
namespace Pixeval.UI.UserControls
@ -84,20 +82,6 @@ namespace Pixeval.UI.UserControls
Settings.Global.IncludeTag = new HashSet<string>(text);
}
private void ChangeCachingPolicyToggleButton_OnChecked(object sender, RoutedEventArgs e)
{
AppContext.DefaultCacheProvider.Clear();
AppContext.DefaultCacheProvider = new FileCache<BitmapImage, Illustration>(AppContext.CacheFolder,
image => image.ToStream(),
InternalIO.CreateBitmapImageFromStream);
}
private void ChangeCachingPolicyToggleButton_OnUnchecked(object sender, RoutedEventArgs e)
{
AppContext.DefaultCacheProvider.Clear();
AppContext.DefaultCacheProvider = MemoryCache<BitmapImage, Illustration>.Shared;
}
private async void OpenWebApiR18Button_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
MainWindow.MessageQueue.Enqueue(AkaI18N.TryingToToggleR18Switch);
@ -105,5 +89,10 @@ namespace Pixeval.UI.UserControls
? AkaI18N.ToggleR18OnSuccess
: AkaI18N.ToggleR18OnFailed);
}
private void CultureSelector_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
AkaI18N.Reload((I18nOption) CultureSelector.SelectedItem);
}
}
}

View File

@ -37,13 +37,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<StackPanel Grid.Row="1" Height="50" HorizontalAlignment="Center"
VerticalAlignment="Top" Orientation="Horizontal">
<TextBox x:Name="UploadFileTextBox" Width="800"
materialDesign:HintAssist.Hint="{x:Static i18N:AkaI18N.SauceNaoFileLocationHint}"
materialDesign:HintAssist.Hint="{Binding Path=(i18N:AkaI18N.SauceNaoFileLocationHint)}"
IsReadOnly="True"
Style="{DynamicResource MaterialDesignFloatingHintTextBox}" />
<Button x:Name="UploadFileAndQueryButton" Width="50" Height="40"
Margin="10,15,0,0" Click="UploadFileAndQueryButton_OnClick" IsDefault="False"
Style="{DynamicResource MaterialDesignToolButton}"
ToolTip="{x:Static i18N:AkaI18N.SauceNaoUploadAndSearch}">
ToolTip="{Binding Path=(i18N:AkaI18N.SauceNaoUploadAndSearch)}">
<Viewbox Width="30" Height="30">
<Canvas Width="24" Height="24">
<Path

View File

@ -56,7 +56,7 @@
Click="FollowButton_OnClick" Cursor="Hand" FontFamily="Microsoft YaHei Light"
Foreground="Black"
Style="{StaticResource MaterialDesignToolButton}">
<TextBlock Text="{x:Static i18N:AkaI18N.UserPreviewPopupFollow}" />
<TextBlock Text="{Binding Path=(i18N:AkaI18N.UserPreviewPopupFollow)}" />
</Button>
</Border>
<Border Width="80" Height="40" Background="#FFCBCBCB"
@ -66,7 +66,7 @@
Click="UnFollowButton_OnClick" Cursor="Hand" FontFamily="Microsoft YaHei Light"
Foreground="Black"
Style="{StaticResource MaterialDesignToolButton}">
<TextBlock Text="{x:Static i18N:AkaI18N.UserPreviewPopupUnFollow}" />
<TextBlock Text="{Binding Path=(i18N:AkaI18N.UserPreviewPopupUnFollow)}" />
</Button>
</Border>
</Grid>

View File

@ -20,33 +20,40 @@
</component>
<component name="ChangeListManager">
<list default="true" id="141c7ffe-f470-4fe3-9f88-da4ec3d9a477" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/../Pixeval.Updater/MainWindow.xaml.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval.Updater/MainWindow.xaml.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval.Interchange/Pixeval.Interchange.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval.Interchange/Pixeval.Interchange.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/App.xaml" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/App.xaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/App.xaml.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/App.xaml.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/AppContext.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/AppContext.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Core/BrowsingHistoryAccessor.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Core/BrowsingHistoryAccessor.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Core/GalleryAsyncEnumerable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Core/GalleryAsyncEnumerable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Core/PixivHelper.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Core/PixivHelper.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Core/QueryAsyncEnumerable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Core/QueryAsyncEnumerable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Core/RankingAsyncEnumerable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Core/RankingAsyncEnumerable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Core/RecommendAsyncEnumerable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Core/RecommendAsyncEnumerable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Core/SpotlightQueryAsyncEnumerable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Core/SpotlightQueryAsyncEnumerable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Core/UploadAsyncEnumerable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Core/UploadAsyncEnumerable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Core/UserFollowingAsyncEnumerable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Core/UserFollowingAsyncEnumerable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Core/UserPreviewAsyncEnumerable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Core/UserPreviewAsyncEnumerable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Core/UserUpdateAsyncEnumerable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Core/UserUpdateAsyncEnumerable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Data/Web/Delegation/DnsResolvedHttpClientHandler.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Data/Web/Delegation/DnsResolvedHttpClientHandler.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Data/Web/Response/WebApiUserDetailResponse.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Data/Web/Response/WebApiUserDetailResponse.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Data/ViewModel/Illustration.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Data/ViewModel/Illustration.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Data/ViewModel/RankOptionModel.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Data/ViewModel/RankOptionModel.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Data/ViewModel/SearchTagMatchOptionModel.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Data/ViewModel/SearchTagMatchOptionModel.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Objects/Exceptions/Logger/ApplicationLogStack.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Objects/Exceptions/Logger/ApplicationLogStack.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Objects/Exceptions/Logger/ExceptionDumper.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Objects/Exceptions/Logger/ExceptionDumper.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Objects/Web/HttpsProxyServer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Objects/Web/HttpsProxyServer.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Objects/Generic/Observable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Objects/Generic/Observable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Objects/I18n/ResouceLocator.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Objects/I18n/StringResources.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Objects/I18n/StringResources.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Objects/I18n/Xml/resx_en-us.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Objects/I18n/Xml/resx_en-us.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Objects/I18n/Xml/resx_zh-cn.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Objects/I18n/Xml/resx_zh-cn.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Objects/ValueConverters/StringSplitConverter.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Objects/ValueConverters/StringSplitConverter.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Objects/ValueConverters/TrendsStatConverter.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Objects/ValueConverters/TrendsStatConverter.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Objects/ValueConverters/VisibilityConverter.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Objects/ValueConverters/VisibilityConverter.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Persisting/Authentication.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Persisting/Authentication.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Persisting/Session.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Persisting/Session.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Persisting/Settings.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Persisting/Settings.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Persisting/WebApi/CertificateManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Persisting/WebApi/CertificateManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/Pixeval.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/Pixeval.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/MainWindow.xaml" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/MainWindow.xaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/MainWindow.xaml.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/MainWindow.xaml.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/SignIn.xaml" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/SignIn.xaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/SignIn.xaml.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/SignIn.xaml.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/UserControls/DownloadQueue.xaml" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/UserControls/DownloadQueue.xaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/UserControls/DownloadQueue.xaml.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/UserControls/DownloadQueue.xaml.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/UserControls/IllustPresenter.xaml" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/UserControls/IllustPresenter.xaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/UserControls/InputBoxControl.xaml" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/UserControls/InputBoxControl.xaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/UserControls/PixevalSettingPage.xaml" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/UserControls/PixevalSettingPage.xaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/UserControls/PixevalSettingPage.xaml.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/UserControls/PixevalSettingPage.xaml.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/UserControls/TrendingTagControl.xaml.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/UserControls/TrendingTagControl.xaml.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/UserControls/SauceNAOHomePage.xaml" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/UserControls/SauceNAOHomePage.xaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/UserControls/SauceNAOHomePage.xaml.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/UserControls/SauceNAOHomePage.xaml.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Pixeval/UI/UserControls/UserPreviewPopupContent.xaml" beforeDir="false" afterPath="$PROJECT_DIR$/../Pixeval/UI/UserControls/UserPreviewPopupContent.xaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -101,7 +108,7 @@
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2" />
<property name="restartRequiresConfirmation" value="false" />
<property name="settings.editor.selected.configurable" value="editor.preferences.fonts.default" />
<property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
</component>
<component name="RunManager" selected="JAR Application.pixeval-backend-1.0-SNAPSHOT.jar">
<configuration name="pixeval-backend [compileKotlin]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
@ -220,6 +227,8 @@
<workItem from="1590499497954" duration="804000" />
<workItem from="1590850087153" duration="439000" />
<workItem from="1590851053603" duration="1447000" />
<workItem from="1591476884705" duration="78000" />
<workItem from="1591476974023" duration="98000" />
</task>
<servers />
</component>
@ -291,11 +300,11 @@
<screen x="0" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="320" key="GridCell.Tab.1.right/0.0.2048.1112/-2560.0.2048.1112@0.0.2048.1112" timestamp="1589916618914" />
<state x="711" y="174" key="SettingsEditor" timestamp="1589757769002">
<state x="894" y="401" key="SettingsEditor" timestamp="1591476962624">
<screen x="0" y="0" width="2048" height="1112" />
</state>
<state x="-1890" y="192" key="SettingsEditor/0.0.2048.1112/-2560.0.2048.1112@-2560.0.2048.1112" timestamp="1589756549975" />
<state x="711" y="174" key="SettingsEditor/0.0.2048.1112/-2560.0.2048.1112@0.0.2048.1112" timestamp="1589757769002" />
<state x="894" y="401" key="SettingsEditor/0.0.2048.1112/-2560.0.2048.1112@0.0.2048.1112" timestamp="1591476962624" />
<state x="434" y="119" key="new project wizard" timestamp="1589820638229">
<screen x="0" y="0" width="2048" height="1112" />
</state>