调整了模板
This commit is contained in:
@@ -7,6 +7,7 @@ namespace BITFactory;
|
||||
public partial class CourseElement : Node
|
||||
{
|
||||
private static Node CurrentScene;
|
||||
private static string CurrentScenePath=string.Empty;
|
||||
[Export]
|
||||
public PackedScene CourseScene;
|
||||
|
||||
@@ -41,7 +42,7 @@ public partial class CourseElement : Node
|
||||
|
||||
Stopwatch stopwatch = new();
|
||||
stopwatch.Start();
|
||||
if (CurrentScene?.Name == CourseScene?.ResourceName)
|
||||
if (CurrentScenePath == CourseScene?.ResourcePath)
|
||||
{
|
||||
BIT4Log.Log<CourseElement>($"已返回当前课程");
|
||||
UXService.Open(CurrentScene as Control);
|
||||
@@ -54,6 +55,7 @@ public partial class CourseElement : Node
|
||||
BIT4Log.Log<CourseElement>($"已释放当前课程:\t{CurrentScene.Name}");
|
||||
}
|
||||
CurrentScene = CourseScene!.Instantiate();
|
||||
CurrentScenePath = CourseScene.ResourcePath;
|
||||
GetTree().Root.AddChild(CurrentScene);
|
||||
UXService.Open(CurrentScene as Control);
|
||||
BIT4Log.Log<CourseElement>($"已加载新的课程:\t{CourseScene.ResourceName}");
|
||||
|
@@ -141,9 +141,9 @@ public partial class SearchEngine:Node,ISearchEngine
|
||||
|
||||
instance.titleLabel.Text = entry.Display ?? entry.Id ?? entry.Key;
|
||||
instance.Text = entry.Value;
|
||||
instance.updateTimeLabel.Text = entry.UpdateDate.ToString(CultureInfo.InvariantCulture);
|
||||
instance.createTimeLabel.Text = entry.CreateDate.ToString(CultureInfo.InvariantCulture);
|
||||
instance.headerLabel.Text = entry.Key;
|
||||
instance.labels[0].Text = entry.UpdateDate.ToString(CultureInfo.InvariantCulture);
|
||||
instance.labels[1].Text = entry.CreateDate.ToString(CultureInfo.InvariantCulture);
|
||||
instance.labels[2].Text = entry.Key;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user