mirror of
https://github.com/BlossomiShymae/Needlework.Net.git
synced 2025-12-06 10:10:48 +01:00
28 lines
952 B
C#
28 lines
952 B
C#
using Avalonia.Controls;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using FluentAvalonia.UI.Controls;
|
|
using System;
|
|
|
|
namespace Needlework.Net.Desktop.ViewModels
|
|
{
|
|
public partial class InfoBarViewModel : ObservableObject
|
|
{
|
|
[ObservableProperty] private string _title;
|
|
[ObservableProperty] private bool _isOpen;
|
|
[ObservableProperty] private string _message;
|
|
[ObservableProperty] private InfoBarSeverity _severity;
|
|
[ObservableProperty] private TimeSpan _duration;
|
|
[ObservableProperty] private Control? _actionButton;
|
|
|
|
public InfoBarViewModel(string title, bool isOpen, string message, InfoBarSeverity severity, TimeSpan duration, Control? actionButton = null)
|
|
{
|
|
_title = title;
|
|
_isOpen = isOpen;
|
|
_message = message;
|
|
_severity = severity;
|
|
_duration = duration;
|
|
_actionButton = actionButton;
|
|
}
|
|
}
|
|
}
|