Пример #1
0
        public static EditPaneViewModel CreateModel(ModelText model, int n)
        {
            var modelName =
                model.Name.Length != 0
                    ? model.Name
                    : NameProvider.IndexedModel(n);

            return(new EditPaneViewModel
            {
                Format = model.Format.ToString(),
                Text = model.Text,
                ScribanName = modelName,
                LinkedPath = model.Path,
                AvailableFormats = Enum.GetNames(typeof(ModelFormat)),
                PaneType = PaneType.Model,
                FileLinkage = FileLinkageTypes.LoadSave
            });
        }