You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
885 B
29 lines
885 B
using System.Text.Json.Serialization; |
|
using CommunityToolkit.Mvvm.ComponentModel; |
|
using StabilityMatrix.Core.Models.FileInterfaces; |
|
#pragma warning disable CS0657 // Not a valid attribute location for this declaration |
|
|
|
namespace StabilityMatrix.Avalonia.ViewModels.Inference; |
|
|
|
public abstract partial class InferenceTabViewModelBase : LoadableViewModelBase |
|
{ |
|
/// <summary> |
|
/// The title of the tab |
|
/// </summary> |
|
public virtual string TabTitle => ProjectFile?.Name ?? "New Project"; |
|
|
|
/// <summary> |
|
/// Whether there are unsaved changes |
|
/// </summary> |
|
[ObservableProperty] |
|
[property: JsonIgnore] |
|
private bool hasUnsavedChanges; |
|
|
|
/// <summary> |
|
/// The tab's project file |
|
/// </summary> |
|
[ObservableProperty] |
|
[NotifyPropertyChangedFor(nameof(TabTitle))] |
|
[property: JsonIgnore] |
|
private FilePath? projectFile; |
|
}
|
|
|