Добавьте файлы проекта.
This commit is contained in:
70
SQLVision.UI/ViewModels/ResultTabViewModel.cs
Normal file
70
SQLVision.UI/ViewModels/ResultTabViewModel.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
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()
|
||||
{
|
||||
// Копирование данных в буфер обмена
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user