显卡鉴定手册:8 页阅读窗口、8 种语言;外观折价进 Tuning
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6f121a6899
commit
9f93c3f3cf
15 files changed
+54
-21
No files matched your search
@@ -28,7 +28,7 @@ namespace Decentralized
|
||||
int i = chapter.IndexOf(m, StringComparison.Ordinal);
|
||||
if (i > 0 && i < end) end = i;
|
||||
}
|
||||
return chapter.Substring(0, end);
|
||||
return chapter.Substring(0, end).TrimEnd();
|
||||
}
|
||||
|
||||
private static string Body(string chapter)
|
||||
@@ -42,11 +42,25 @@ namespace Decentralized
|
||||
return chapter;
|
||||
}
|
||||
|
||||
public static void Open()
|
||||
private static string _key = "guide.web3.text", _nameKey = "item.web3guide.name";
|
||||
private static readonly Dictionary<string, int> _chapterOf = new Dictionary<string, int>();
|
||||
|
||||
public static void Open() => Show("guide.web3.text", "item.web3guide.name");
|
||||
public static void OpenGpu() => Show("guide.gpu.text", "item.guide.name");
|
||||
|
||||
private static void Show(string key, string nameKey)
|
||||
{
|
||||
var chapters = TuningText.Render(L.T("guide.web3.text")).Replace("¶", "\n\n").Split('§');
|
||||
_key = key; _nameKey = nameKey;
|
||||
_chapter = _chapterOf.TryGetValue(key, out var ch0) ? ch0 : 0;
|
||||
Reopen();
|
||||
}
|
||||
|
||||
private static void Reopen()
|
||||
{
|
||||
_chapterOf[_key] = _chapter;
|
||||
var chapters = TuningText.Render(L.T(_key)).Replace("¶", "\n\n").Split('§');
|
||||
if (_chapter >= chapters.Length) _chapter = 0;
|
||||
var b = CustomUIManager.Window(Id, L.T("item.web3guide.name"));
|
||||
var b = CustomUIManager.Window(Id, L.T(_nameKey));
|
||||
if (b == null) return;
|
||||
_picked.Clear(); _clear.Clear(); _rows.Clear();
|
||||
b.SetSize(WinW, WinH).SetDraggable(true).SetCloseOnEscape(true).UseMachineryStyle();
|
||||
@@ -64,7 +78,7 @@ namespace Decentralized
|
||||
{
|
||||
int k = i;
|
||||
PledgerSkin.TableRow(b, RowW, 30f, new[] { RowW }, new[] { TextAnchor.MiddleLeft },
|
||||
new[] { Title(chapters[i]) }, i == _chapter, () => { _chapter = k; Open(); }, _rows, _clear);
|
||||
new[] { Title(chapters[i]) }, i == _chapter, () => { _chapter = k; Reopen(); }, _rows, _clear);
|
||||
}
|
||||
b.End();
|
||||
b.End();
|
||||
|
||||
Reference in new issue
Block a user