2025-06-22 21:09:32 +08:00
|
|
|
|
|
|
|
|
|
using MCI18n.Models;
|
2025-06-22 11:33:58 +08:00
|
|
|
|
using MCI18n.Utilities;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
using System.Windows.Documents;
|
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
using System.Windows.Media;
|
|
|
|
|
using System.Windows.Media.Imaging;
|
|
|
|
|
using System.Windows.Navigation;
|
|
|
|
|
using System.Windows.Shapes;
|
|
|
|
|
|
|
|
|
|
namespace MCI18n
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaction logic for MainWindow.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class MainWindow : Window
|
|
|
|
|
{
|
|
|
|
|
private MainWindowViewModel viewModel;
|
|
|
|
|
public MainWindow()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
this.DataContext = viewModel = new MainWindowViewModel();
|
|
|
|
|
}
|
2025-06-22 21:09:32 +08:00
|
|
|
|
|
|
|
|
|
private void ChapterListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if(sender is ListView listView)
|
|
|
|
|
{
|
|
|
|
|
var selectItem = listView.SelectedItem;
|
|
|
|
|
viewModel.ChapterSelectionChanged(selectItem as ChapterModel);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-06-22 11:33:58 +08:00
|
|
|
|
}
|
|
|
|
|
}
|