Added button to jump to template editing from profile tab, made TemplateManager IDisposable

This commit is contained in:
RisaDev
2024-06-16 02:58:17 +03:00
parent faa4af97ad
commit ef6c7014e4
5 changed files with 178 additions and 20 deletions

View File

@@ -0,0 +1,33 @@
using CustomizePlus.Templates.Data;
using OtterGui.Classes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CustomizePlus.Templates.Events;
/// <summary>
/// Triggered when something related to template editor happens
/// </summary>
public class TemplateEditorEvent() : EventWrapper<TemplateEditorEvent.Type, Template?, TemplateEditorEvent.Priority>(nameof(TemplateEditorEvent))
{
public enum Type
{
/// <summary>
/// Called when something requests editor to be enabled.
/// </summary>
EditorEnableRequested,
/// <summary>
/// Called when something requests editor to be enabled. Stage 2 - logic after tab has been switched.
/// </summary>
EditorEnableRequestedStage2
}
public enum Priority
{
MainWindow = -1,
TemplatePanel
}
}