mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-19 16:08:02 +03:00
добавил tma в просмотр и отрефакторил код
This commit is contained in:
26
NResUI/Models/MissionTmaViewModel.cs
Normal file
26
NResUI/Models/MissionTmaViewModel.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using MissionTmaLib.Parsing;
|
||||
|
||||
namespace NResUI.Models;
|
||||
|
||||
public class MissionTmaViewModel
|
||||
{
|
||||
public bool HasFile { get; set; }
|
||||
public string? Error { get; set; }
|
||||
|
||||
public MissionTma? Mission { get; set; }
|
||||
|
||||
public string? Path { get; set; }
|
||||
|
||||
public void SetParseResult(MissionTmaParseResult result, string path)
|
||||
{
|
||||
Error = result.Error;
|
||||
|
||||
if (result.Mission != null)
|
||||
{
|
||||
HasFile = true;
|
||||
}
|
||||
|
||||
Mission = result.Mission;
|
||||
Path = path;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user