12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using PixiEditor.Views;
- namespace PixiEditor.Models.Dialogs
- {
- class ImportFileDialog : CustomDialog
- {
- private int _fileWidth;
- public int FileWidth
- {
- get { return _fileWidth; }
- set { if (_fileWidth != value) { _fileWidth = value; RaisePropertyChanged("Width"); } }
- }
- private int _fileHeight;
- public int FileHeight
- {
- get { return _fileHeight; }
- set { if (_fileHeight != value) { _fileHeight = value; RaisePropertyChanged("FileHeight"); } }
- }
- private string _filePath;
- public string FilePath
- {
- get { return _filePath; }
- set { if (_filePath != value) { _filePath = value; RaisePropertyChanged("FilePath"); } }
- }
- public override bool ShowDialog()
- {
- ImportFilePopup popup = new ImportFilePopup();
- popup.ShowDialog();
- if (popup.DialogResult == true)
- {
- FileHeight = popup.ImportHeight;
- FileWidth = popup.ImportWidth;
- FilePath = popup.FilePath;
- }
- return (bool)popup.DialogResult;
- }
- }
- }
|