using CommunityToolkit.Mvvm.ComponentModel; using Newtonsoft.Json.Linq; using Serein.Library; using Serein.Workbench.ViewModels; using Serein.Workbench.Views; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Reflection.Metadata; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; using System.Xml.Linq; namespace Serein.Workbench.Models { public partial class FlowEditorTabModel : ObservableObject { /// /// tab 名称 /// /* public string Name { get { var vm = (FlowCanvasViewModel)Content.DataContext; return vm.Model.Name ?? "null"; } set { var vm = (FlowCanvasViewModel)Content.DataContext; vm.Model.Name = value; OnPropertyChanged(nameof(Name)); } } */ [ObservableProperty] private FlowCanvasDetails _model; /// /// 正在选中 /// [ObservableProperty] private bool _isSelected; /// /// 正在编辑标题 /// [ObservableProperty] private bool _isEditing; /// /// tab对应的控件 /// [ObservableProperty] private FlowCanvasView content; public FlowEditorTabModel(FlowCanvasView content) { this.Content = content; } } }