mirror of
https://github.com/leiurayer/downkyi.git
synced 2024-04-21 12:41:55 +00:00
当复制视频详情页的输入框中的字符时,不读取剪贴板内容
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
namespace DownKyi
|
||||
{
|
||||
public class AppConstant
|
||||
{
|
||||
public const string ClipboardId = "32ff00b1-1a09-4b25-9ca7-dcb6914b141c";
|
||||
}
|
||||
}
|
||||
@@ -95,6 +95,7 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="AppConstant.cs" />
|
||||
<Compile Include="Converter\CountConverter.cs" />
|
||||
<Compile Include="CustomControl\CustomPager.xaml.cs">
|
||||
<DependentUpon>CustomPager.xaml</DependentUpon>
|
||||
@@ -498,7 +499,6 @@
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include=".gitignore" />
|
||||
<None Include="app.config" />
|
||||
<None Include="app.manifest" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
@@ -580,12 +580,6 @@
|
||||
<Resource Include="Resources\channel.png" />
|
||||
<Resource Include="Resources\play.png" />
|
||||
<Resource Include="Resources\time.png" />
|
||||
<Content Include="x64\libwebp.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="x86\libwebp.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="打不开DownKyi请点我.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
@@ -354,7 +354,7 @@ namespace DownKyi.ViewModels
|
||||
}
|
||||
|
||||
SearchService searchService = new SearchService();
|
||||
searchService.BiliInput(input, ViewIndexViewModel.Tag, eventAggregator);
|
||||
searchService.BiliInput(input + AppConstant.ClipboardId, ViewIndexViewModel.Tag, eventAggregator);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace DownKyi.ViewModels
|
||||
private readonly IDialogService dialogService;
|
||||
|
||||
// 保存输入字符串,避免被用户修改
|
||||
private string input;
|
||||
private string input = null;
|
||||
|
||||
#region 页面属性申明
|
||||
|
||||
@@ -745,8 +745,6 @@ namespace DownKyi.ViewModels
|
||||
/// <param name="navigationContext"></param>
|
||||
public override void OnNavigatedTo(NavigationContext navigationContext)
|
||||
{
|
||||
base.OnNavigatedTo(navigationContext);
|
||||
|
||||
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
|
||||
|
||||
DownloadManage = ButtonIcon.Instance().DownloadManage;
|
||||
@@ -757,13 +755,25 @@ namespace DownKyi.ViewModels
|
||||
// Parent参数为null时,表示是从下一个页面返回到本页面,不需要执行任务
|
||||
if (navigationContext.Parameters.GetValue<string>("Parent") != null)
|
||||
{
|
||||
string param = navigationContext.Parameters.GetValue<string>("Parameter");
|
||||
// 移除剪贴板id
|
||||
string intput = param.Replace(AppConstant.ClipboardId, "");
|
||||
|
||||
// 检测是否从剪贴板传入
|
||||
if (InputText == intput && param.EndsWith(AppConstant.ClipboardId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 正在执行任务时不开启新任务
|
||||
if (LoadingVisibility != Visibility.Visible)
|
||||
{
|
||||
InputText = navigationContext.Parameters.GetValue<string>("Parameter");
|
||||
InputText = intput;
|
||||
PropertyChangeAsync(ExecuteInputCommand);
|
||||
}
|
||||
}
|
||||
|
||||
base.OnNavigatedTo(navigationContext);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user