2021-04-05 18:18:56 -05:00
|
|
|
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace ZuneUIXTools.ViewModels
|
|
|
|
|
{
|
2021-04-10 12:27:52 -05:00
|
|
|
public class UIXDocumentViewModel : DocumentViewModelBase
|
2021-04-05 18:18:56 -05:00
|
|
|
{
|
2021-04-10 12:27:52 -05:00
|
|
|
public UIXDocumentViewModel(string fileName) : base(fileName)
|
2021-04-05 18:18:56 -05:00
|
|
|
{
|
|
|
|
|
Content = File.ReadAllText(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _content = null;
|
|
|
|
|
public string Content
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (FileName != null)
|
|
|
|
|
_content = File.ReadAllText(FileName);
|
|
|
|
|
return _content;
|
|
|
|
|
}
|
|
|
|
|
set => SetProperty(ref _content, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _uiRoot;
|
|
|
|
|
public string UIRoot
|
|
|
|
|
{
|
|
|
|
|
get => _uiRoot;
|
|
|
|
|
set => SetProperty(ref _uiRoot, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|