71 lines
1.5 KiB
C#
71 lines
1.5 KiB
C#
using Microsoft.UI.Xaml;
|
|
using SQLVision.Core.Models;
|
|
using System.Data;
|
|
|
|
namespace SQLVision.UI.ViewModels;
|
|
|
|
public class ResultTabViewModel : ObservableObject
|
|
{
|
|
private string _title;
|
|
private FrameworkElement _content;
|
|
private DataTable _dataTable;
|
|
private OutputDefinition _outputDefinition;
|
|
private bool _canExport;
|
|
private bool _canCopy;
|
|
|
|
public string Title
|
|
{
|
|
get => _title;
|
|
set => SetProperty(ref _title, value);
|
|
}
|
|
|
|
public FrameworkElement Content
|
|
{
|
|
get => _content;
|
|
set => SetProperty(ref _content, value);
|
|
}
|
|
|
|
public DataTable DataTable
|
|
{
|
|
get => _dataTable;
|
|
set => SetProperty(ref _dataTable, value);
|
|
}
|
|
|
|
public OutputDefinition OutputDefinition
|
|
{
|
|
get => _outputDefinition;
|
|
set => SetProperty(ref _outputDefinition, value);
|
|
}
|
|
|
|
public bool CanExport
|
|
{
|
|
get => _canExport;
|
|
set => SetProperty(ref _canExport, value);
|
|
}
|
|
|
|
public bool CanCopy
|
|
{
|
|
get => _canCopy;
|
|
set => SetProperty(ref _canCopy, value);
|
|
}
|
|
|
|
public IRelayCommand ExportCommand { get; }
|
|
public IRelayCommand CopyDataCommand { get; }
|
|
|
|
public ResultTabViewModel()
|
|
{
|
|
ExportCommand = new RelayCommand(Export);
|
|
CopyDataCommand = new RelayCommand(CopyData);
|
|
}
|
|
|
|
private void Export()
|
|
{
|
|
// Экспорт данных вкладки
|
|
}
|
|
|
|
private void CopyData()
|
|
{
|
|
// Копирование данных в буфер обмена
|
|
}
|
|
}
|