Added main structure
This commit is contained in:
40
GifResizer/Views/MainWindow.xaml.cs
Normal file
40
GifResizer/Views/MainWindow.xaml.cs
Normal 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user