Ejemplo n.º 1
0
        public void OnEnable()
        {
            settings = new SettingsLoader();
            settings.Load();
            var settingsPanel = new SettingsEditorTool(() => settings.Value as ArtWindowSettings);

            request           = new RequestTool();
            request.onChange += Repaint;
            request.onReset  += Repaint;

            target            = new Target();
            target.onChange  += ShowAllTools;
            target.onReset   += HideAllTools;
            history           = new History(() => target.Value, settings.Value);
            target.onChange  += () => history.Add(target.Value);
            history.onSelect += x => target.Value = x as Sample;


            var layers = new Layers(() => target.Value);

            leftPanel = new ToolBox()
            {
                layers,
                request as IEditorTool
            };
            rightPanel = new ToolBox()
            {
                settingsPanel,
                history as IEditorTool,
            };

            centerPanel = new ToolBox()
            {
                new Preview(() => target.Value, layers,
                            settings.Value,
                            () => request.ActiveRequest?.texture),
            };

            history.LoadSavedData();
        }
Ejemplo n.º 2
0
 public void Add(HistoryDbModel model)
 {
     proxy.Add(model);
 }