Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
JiuLing-zhang committed Sep 25, 2024
1 parent 9aaa843 commit 1f9a8be
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 32 deletions.
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,19 @@ await UpgradeFactory.CreateHttpApp("url").RunAsync();

## 🔨 高级设置

🧰 构建并启用设置
```c#
var setting = new UpgradeSettingBuilder();
// setting.WithLang("").WithSignCheck(true).WithIcon("").With...
IUpgradeApp app = UpgradeFactory.CreateHttpApp("url");
app.SetUpgrade(setting)
await app.RunAsync();
```C#
await UpgradeFactory.CreateHttpApp("url")
.SetUpgrade(builder =>
{
builder.WithIcon("path")
.WithTimeout(60)
.WithBackgroundCheck(true)
.WithSignCheck(true)
.WithTheme(ThemeEnum.System)
.WithLang("zh")
.WithVersionFormat(VersionFormatEnum.MajorMinorBuild);
})
.RunAsync();
```

⚡ 设置图标
Expand Down
23 changes: 14 additions & 9 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,21 @@ await UpgradeFactory.CreateHttpApp("url").RunAsync();
}
```

## 🔨 Advanced Config
## 🔨 Advanced Settings

🧰 Build and Enable Settings
```c#
var setting = new UpgradeSettingBuilder();
// setting.WithLang("").WithSignCheck(true).WithIcon("").With...
IUpgradeApp app = UpgradeFactory.CreateHttpApp("url");
app.SetUpgrade(setting)
await app.RunAsync();
```C#
await UpgradeFactory.CreateHttpApp("url")
.SetUpgrade(builder =>
{
builder.WithIcon("path")
.WithTimeout(60)
.WithBackgroundCheck(true)
.WithSignCheck(true)
.WithTheme(ThemeEnum.System)
.WithLang("zh")
.WithVersionFormat(VersionFormatEnum.MajorMinorBuild);
})
.RunAsync();
```

⚡ Set icon
Expand Down
28 changes: 13 additions & 15 deletions v2.1_to_v2.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,16 @@ await oldApp.RunAsync();
```
* 🟢 v2.2.x 及以后
```C#
IUpgradeApp newApp = UpgradeFactory.CreateHttpApp("url");
// 使用参数构建器设置参数
var setting = new UpgradeSettingBuilder();
setting.WithIcon("path");
setting.WithTimeout(60);
setting.WithBackgroundCheck(true);
setting.WithSignCheck(true);
setting.WithTheme(ThemeEnum.System);
setting.WithLang("zh");
setting.WithVersionFormat(VersionFormatEnum.MajorMinorBuild);

newApp.SetUpgrade(setting);

await newApp.RunAsync();
```
await UpgradeFactory.CreateHttpApp("url")
.SetUpgrade(builder =>
{
builder.WithIcon("path")
.WithTimeout(60)
.WithBackgroundCheck(true)
.WithSignCheck(true)
.WithTheme(ThemeEnum.System)
.WithLang("zh")
.WithVersionFormat(VersionFormatEnum.MajorMinorBuild);
})
.RunAsync();
```

0 comments on commit 1f9a8be

Please sign in to comment.