0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-05-18 19:31:17 +03:00
ParkanPlayground/NResUI/Models/TexmExplorerViewModel.cs

27 lines
512 B
C#
Raw Normal View History

2024-11-18 23:48:42 +03:00
using TexmLib;
2024-11-15 19:06:44 +03:00
namespace NResUI.Models;
2024-11-18 23:48:42 +03:00
public class TexmExplorerViewModel
2024-11-15 19:06:44 +03:00
{
public bool HasFile { get; set; }
public string? Error { get; set; }
2024-11-18 23:48:42 +03:00
public TexmFile? TexmFile { get; set; }
2024-11-15 19:06:44 +03:00
public string? Path { get; set; }
2024-11-18 23:48:42 +03:00
public void SetParseResult(TexmParseResult result, string path)
2024-11-15 19:06:44 +03:00
{
Error = result.Error;
2024-11-18 23:48:42 +03:00
if (result.TexmFile != null)
2024-11-15 19:06:44 +03:00
{
HasFile = true;
}
2024-11-18 23:48:42 +03:00
TexmFile = result.TexmFile;
2024-11-15 19:06:44 +03:00
Path = path;
}
2024-11-18 23:48:42 +03:00
2024-11-15 19:06:44 +03:00
}