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
|
|
|
|
}
|