Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 在结果页面动态更改哈希结果的格式 #37

Merged
merged 4 commits into from
Jul 13, 2023

Conversation

KiyanYang
Copy link
Owner

Summary

在结果页面可以动态更改哈希结果的格式。

Detail / Remark

在哈希任务中同时包含哈希类别和格式信息,同时结果项监测哈希格式的变化以响应输出。模型变化基本如下:

+ class HashOption
+ {
+     public HashKind Kind { get; set; }
+     public HashFormat Format { get; set; }
+ }

  class HashTask
  {
-     public HashKind[] SelectHashKinds { get; set; }
+     public HashOption[] HashOptions { get; set; }
  }

- record struct HashResultItem(HashKind Kind, string Value);
+ class HashResultItem
+ {
+     private readonly HashOption _hashOption;
+     private readonly byte[] _hashValue;
+
+     // HashOption_PropertyChanged Handler
+     ..ctor(HashOption hashOption, byte[] hashValue);
+
+     public HashKind Kind { get; }
+     public string Value { get; }
+ }

在结果页面通过对话框设置哈希输出格式。

interface IDialogService
{
+   Task<ContentDialogResult> ShowHashResultConfigDialogAsync(IList<HashOption> hashOptions);
}

PR Checklist

  • Closes: #xxx
  • Related: #xxx
  • Localization: All end user facing strings can be localized
  • Documentation updated: if relevant, docs or wiki should updated

@KiyanYang KiyanYang merged commit 150542e into main Jul 13, 2023
5 checks passed
@KiyanYang KiyanYang deleted the feat/kiyanyang/dynamic-change-hash-byformat branch July 13, 2023 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant