using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using RainmeterStudio.Core.Editor; using RainmeterStudio.Core.Editor.Features; using RainmeterStudio.Core.Model; namespace RainmeterStudio.Editor.SkinDesigner { /// /// Interaction logic for SkinDesignerUI.xaml /// public partial class SkinDesignerUI : UserControl, IDocumentEditor, IToolboxProvider { private SkinDocument _document; #region IDocumentEditor /// /// Gets the attached document /// public IDocument AttachedDocument { get { return _document; } } /// /// Gets the Editor UI /// public UIElement EditorUI { get { return this; } } #endregion /// /// Gets or sets the attached skin document /// public SkinDocument Document { get { return _document; } protected set { _document = value; Reset(); } } /// /// Initializes the skin designer UI /// /// Skin document to be edited public SkinDesignerUI(SkinDocument document) { InitializeComponent(); Document = document; } /// /// Reloads everything /// private void Reset() { meterControl.Skin = Document.Skin; } public IEnumerable ToolboxItems { get { yield return new ToolboxItem("Item 1"); yield return new ToolboxItem("Item 2"); yield return new ToolboxItem("Item 3"); yield return new ToolboxItem("Item 4"); } } public event EventHandler ToolboxItemsChanged; public void ToolboxItemDrop(ToolboxItem item) { } } }