25 lines
801 B
C#
25 lines
801 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using JD.Oasis.Service.API;
|
|
|
|
namespace JD.Oasis.Module.ViewModel.TreeViewModel
|
|
{
|
|
public class FileTreeNodeViewModel : OasisTreeNodeViewModel
|
|
{
|
|
public FileTreeNodeViewModel(LocalizedLine line, string name, bool isChecked) : base(name, line.Path, isChecked)
|
|
{
|
|
LineId = line.Id;
|
|
Translations = line.Translations.ToDictionary(pair => pair.Key.Name, pair => pair.Value);
|
|
IsLineForPhone = line.IsForPhone;
|
|
MasterText = line.Translations.Single(t => t.Key.IsMaster).Value;
|
|
}
|
|
|
|
public int LineId { get; }
|
|
|
|
public bool IsLineForPhone { get; }
|
|
|
|
public string MasterText { get; }
|
|
|
|
public Dictionary<string, string> Translations { get; }
|
|
}
|
|
}
|