Пример #1
0
        public ThemePaletteViewModel(IStringProvider stringProvider, IThemePaletteModel paletteModel, string id, string title, string glyph, FluentEditor.ControlPalette.Model.IControlPaletteExportProvider exportProvider)
        {
            _stringProvider = stringProvider;
            _id             = id;
            _title          = title;
            _glyph          = glyph;

            _paletteModel   = paletteModel;
            _exportProvider = exportProvider;

            _paletteModel.ActivePresetChanged += OnActivePresetChanged;
        }
Пример #2
0
 public static ThemePaletteViewModel Parse(IStringProvider stringProvider, JsonObject data, IThemePaletteModel paletteModel, FluentEditor.ControlPalette.Model.IControlPaletteExportProvider exportProvider)
 {
     return(new ThemePaletteViewModel(stringProvider, paletteModel, data["Id"].GetOptionalString(), data["Title"].GetOptionalString(), data["Glyph"].GetOptionalString(), exportProvider));
 }