12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using PixiEditor.ViewModels;
- using System.Windows;
- using System.Windows.Input;
- namespace PixiEditor.Views
- {
- public partial class ImportFilePopup : Window
- {
- private readonly ImportFilePopupViewModel dc = new ImportFilePopupViewModel();
- public ImportFilePopup()
- {
- InitializeComponent();
- DataContext = dc;
- Loaded += (_, _) => sizePicker.FocusWidthPicker();
- }
- public int ImportHeight
- {
- get => dc.ImportHeight;
- set => dc.ImportWidth = value;
- }
- public int ImportWidth
- {
- get => dc.ImportWidth;
- set => dc.ImportWidth = value;
- }
- public string FilePath
- {
- get => dc.FilePath;
- set => dc.FilePath = value;
- }
- private void CommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e)
- {
- e.CanExecute = true;
- }
- private void CommandBinding_Executed_Close(object sender, ExecutedRoutedEventArgs e)
- {
- SystemCommands.CloseWindow(this);
- }
- }
- }
|