* UIPage: 重新梳理页面加载顺序

This commit is contained in:
Sunny 2023-03-15 21:00:31 +08:00
parent ee328aa648
commit 595f5c19b1
2 changed files with 3 additions and 17 deletions

View File

@ -938,22 +938,7 @@ namespace Sunny.UI
if (SelectedIndex >= 0) if (SelectedIndex >= 0)
{ {
List<UIPage> pages; List<UIPage> pages = TabPages[SelectedIndex].GetControls<UIPage>();
//if (LastIndex != SelectedIndex)
//{
// if (LastIndex >= 0 && TabPages.Count > 0 && LastIndex < TabPages.Count)
// {
// pages = TabPages[LastIndex].GetControls<UIPage>();
// foreach (var page in pages)
// {
// page.Final();
// }
// }
//
// LastIndex = SelectedIndex;
//}
pages = TabPages[SelectedIndex].GetControls<UIPage>();
foreach (var page in pages) foreach (var page in pages)
{ {
page.ReLoad(); page.ReLoad();

View File

@ -35,6 +35,7 @@
* 2022-10-28: V3.2.6 * 2022-10-28: V3.2.6
* 2023-02-24: V3.3.2 PageDeselecting * 2023-02-24: V3.3.2 PageDeselecting
* 2023-02-24: V3.3.2 Dock.Fill * 2023-02-24: V3.3.2 Dock.Fill
* 2023-03-15: V3.3.3
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -505,7 +506,7 @@ namespace Sunny.UI
IsShown = true; IsShown = true;
} }
public void ReLoad() internal void ReLoad()
{ {
if (IsShown) if (IsShown)
{ {