Added main structure

This commit is contained in:
Laurent
2026-02-16 22:44:44 +01:00
parent 663302c5b1
commit be6de65f85
10 changed files with 176 additions and 37 deletions

View File

@@ -0,0 +1,40 @@
using System.Windows;
using GifResizer.ViewModels;
using Microsoft.Win32;
namespace GifResizer.Views;
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private readonly MainViewModel _mainViewModel;
public MainWindow(MainViewModel viewModel)
{
InitializeComponent();
_mainViewModel = viewModel;
DataContext = _mainViewModel;
}
private void BrowseButton_Click(object sender, RoutedEventArgs e)
{
OpenFileDialog fileDialog = new OpenFileDialog
{
Filter = "GIF files (*.gif)|*.gif|All files (*.*)|*.*",
Title = "Select a GIF file"
};
if (fileDialog.ShowDialog() == true)
{
_mainViewModel.FilePath = fileDialog.FileName;
}
}
private void ResizeButton_Click(object sender, RoutedEventArgs e)
{
}
}