Refactor application to remove Windows Forms dependencies and transition to Avalonia UI
- Deleted MainWindow.xaml.cs, which contained the WPF implementation of the main window. - Updated Program.cs to remove Windows Forms initialization and support only Avalonia UI. - Removed Windows Forms specific code from ViewModelBase, including control marshalling logic.
This commit is contained in:
parent
988a3d94e1
commit
d6b778a648
16 changed files with 64 additions and 4415 deletions
|
|
@ -15,9 +15,6 @@ using System.Runtime.InteropServices;
|
|||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#if WINDOWS
|
||||
using System.Windows.Forms;
|
||||
#endif
|
||||
using System.Windows.Input;
|
||||
using AutoMapper;
|
||||
using MaddoShared;
|
||||
|
|
@ -167,8 +164,7 @@ namespace ImageCatalog_2
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Optional UI-thread invoker set by the active UI layer (WPF, Avalonia, etc.).
|
||||
/// When set, <see cref="InvokeOnUiThreadAsync"/> uses this delegate instead of the WPF dispatcher.
|
||||
/// Optional UI-thread invoker set by the active UI layer.
|
||||
/// </summary>
|
||||
public Action<Action>? UiInvoker { get; set; }
|
||||
|
||||
|
|
@ -179,7 +175,7 @@ namespace ImageCatalog_2
|
|||
if (UiInvoker != null)
|
||||
UiInvoker(action);
|
||||
else
|
||||
System.Windows.Application.Current?.Dispatcher.Invoke(action);
|
||||
action();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1886,11 +1882,7 @@ namespace ImageCatalog_2
|
|||
public event EventHandler<string?>? LoadSettingsRequested;
|
||||
public event EventHandler? SelectColorRequested;
|
||||
// Request that the View shows a message to the user (message, caption, icon)
|
||||
#if WINDOWS
|
||||
public event EventHandler<Tuple<string, string, MessageBoxIcon>>? ShowMessageRequested;
|
||||
#else
|
||||
public event EventHandler<Tuple<string, string, int>>? ShowMessageRequested;
|
||||
#endif
|
||||
public event EventHandler? SelectTransparentColorRequested;
|
||||
|
||||
private void SelectSourceFolder(object parameter)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue