XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEEDToolBox

【WinUI】XFE精英危险工具箱

公开
关注 0 Fork 0 Star 0
UTF-8
namespace XFEEDToolBox;
public partial class App
{
    private static async Task<object> RunGalaxyProbeAsync()
    {
        var selection=ViewModel.GalaxySelection;var centre=ViewModel.GalaxyCentre;var search=ViewModel.GalaxySearch;var radius=ViewModel.GalaxyRadius;
        ViewModel.GalaxySearch="Sol";await ViewModel.SearchGalaxyCommand.ExecuteAsync(null);
        var found=ViewModel.GalaxySelection is {Name:"Sol",Position:{X:0,Y:0,Z:0}};
        ViewModel.GalaxyRadius=5;await ViewModel.LoadNearbyGalaxyCommand.ExecuteAsync(null);
        var status=ViewModel.GalaxyStatus;var loaded=status.StartsWith("已载入 Sol",StringComparison.Ordinal);
        var result=new{knownSystems=ViewModel.GalaxySystems.Count,solFoundAtMeasuredOrigin=found,nearbyPublicRequestSucceeded=loaded,message=status,gameCommandsInvoked=false};
        ViewModel.GalaxySelection=selection;ViewModel.GalaxyCentre=centre;ViewModel.GalaxySearch=search;ViewModel.GalaxyRadius=radius;
        return result;
    }
}