38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using CommunityToolkit.Mvvm.Messaging;
|
|
using Livia.Models.Data;
|
|
using Livia.Utility;
|
|
using Livia.ViewModels;
|
|
using Livia.Views.Utility;
|
|
|
|
namespace Livia.Views.Controls;
|
|
|
|
/// <summary>
|
|
/// Interaction logic for MosaicImageGroupControl.xaml
|
|
/// </summary>
|
|
public partial class MosaicImageGroupControl
|
|
{
|
|
public MosaicImageGroupControl()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void ToggleButtonOnChecked(object sender, RoutedEventArgs e)
|
|
{
|
|
MosaicImageData? data = ViewUtility.GetDataContextFromSender<MosaicImageData>(sender);
|
|
if (data == null || DataContext is not MosaicImageGroupControlViewModel viewModel)
|
|
return;
|
|
|
|
viewModel.SetSelectedMosaicImage(data);
|
|
}
|
|
|
|
private void PerfusionDataGridJumpButtonOnClick(object sender, RoutedEventArgs e)
|
|
{
|
|
if (sender is not Button button)
|
|
return;
|
|
if (button.DataContext is not MosaicImageData data)
|
|
return;
|
|
WeakReferenceMessenger.Default.Send(new PerfusionDataGridChangeParameterMessage(data.DisplayName, true));
|
|
}
|
|
} |