mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-06-08 23:19:14 +08:00
Fix nav error
This commit is contained in:
parent
085669e43a
commit
cfdca6f031
@ -754,16 +754,10 @@ namespace GrasscutterTools.Forms
|
|||||||
/// <returns>如果导航到了则返回页面实例,否则返回空</returns>
|
/// <returns>如果导航到了则返回页面实例,否则返回空</returns>
|
||||||
public TPage NavigateTo<TPage>() where TPage : BasePage
|
public TPage NavigateTo<TPage>() where TPage : BasePage
|
||||||
{
|
{
|
||||||
for (var i = 0; i < TCMain.TabPages.Count; i++)
|
ListPages.SelectedIndex = -1;
|
||||||
{
|
var page = Pages[typeof(TPage).Name];
|
||||||
if (TCMain.TabPages[i].Controls[0] is TPage page)
|
TCMain.SelectedTab = page.Parent as TabPage;
|
||||||
{
|
return page as TPage;
|
||||||
ListPages.SelectedIndex = i;
|
|
||||||
return page;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion - 通用 General -
|
#endregion - 通用 General -
|
||||||
|
Loading…
Reference in New Issue
Block a user