mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 19:24:51 +00:00
Move models to core.
This commit is contained in:
35
RomRepoMgr.Core/EventArgs/RomSetsEventArgs.cs
Normal file
35
RomRepoMgr.Core/EventArgs/RomSetsEventArgs.cs
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// RomRepoMgr - ROM repository manager
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ License ] --------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2020 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using RomRepoMgr.Core.Models;
|
||||||
|
|
||||||
|
namespace RomRepoMgr.Core.EventArgs
|
||||||
|
{
|
||||||
|
public sealed class RomSetEventArgs : System.EventArgs
|
||||||
|
{
|
||||||
|
public List<RomSetModel> RomSets { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
// Copyright © 2020 Natalia Portillo
|
// Copyright © 2020 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace RomRepoMgr.Models
|
namespace RomRepoMgr.Core.Models
|
||||||
{
|
{
|
||||||
public sealed class AssemblyModel
|
public sealed class AssemblyModel
|
||||||
{
|
{
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
// Copyright © 2020 Natalia Portillo
|
// Copyright © 2020 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace RomRepoMgr.Models
|
namespace RomRepoMgr.Core.Models
|
||||||
{
|
{
|
||||||
public class RomSetModel
|
public class RomSetModel
|
||||||
{
|
{
|
||||||
@@ -29,7 +29,8 @@ using Avalonia;
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.ApplicationLifetimes;
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using RomRepoMgr.Models;
|
using RomRepoMgr.Core.EventArgs;
|
||||||
|
using RomRepoMgr.Core.Models;
|
||||||
using RomRepoMgr.ViewModels;
|
using RomRepoMgr.ViewModels;
|
||||||
using RomRepoMgr.Views;
|
using RomRepoMgr.Views;
|
||||||
|
|
||||||
@@ -56,7 +57,7 @@ namespace RomRepoMgr
|
|||||||
base.OnFrameworkInitializationCompleted();
|
base.OnFrameworkInitializationCompleted();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnGotRomSets(object sender, SplashWindowViewModel.RomSetEventArgs e) => _romSets = e.RomSets;
|
void OnGotRomSets(object sender, RomSetEventArgs e) => _romSets = e.RomSets;
|
||||||
|
|
||||||
void OnSplashFinished(object sender, EventArgs e)
|
void OnSplashFinished(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Models\" />
|
|
||||||
<Compile Update="**\*.xaml.cs">
|
<Compile Update="**\*.xaml.cs">
|
||||||
<DependentUpon>%(Filename)</DependentUpon>
|
<DependentUpon>%(Filename)</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ using System.Threading.Tasks;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Microsoft.DotNet.PlatformAbstractions;
|
using Microsoft.DotNet.PlatformAbstractions;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using RomRepoMgr.Models;
|
using RomRepoMgr.Core.Models;
|
||||||
using RomRepoMgr.Views;
|
using RomRepoMgr.Views;
|
||||||
|
|
||||||
namespace RomRepoMgr.ViewModels
|
namespace RomRepoMgr.ViewModels
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ using Avalonia;
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.ApplicationLifetimes;
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using RomRepoMgr.Models;
|
using RomRepoMgr.Core.Models;
|
||||||
using RomRepoMgr.Views;
|
using RomRepoMgr.Views;
|
||||||
|
|
||||||
namespace RomRepoMgr.ViewModels
|
namespace RomRepoMgr.ViewModels
|
||||||
@@ -117,7 +117,8 @@ namespace RomRepoMgr.ViewModels
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var dialog = new ImportDat();
|
var dialog = new ImportDat();
|
||||||
dialog.DataContext = new ImportDatViewModel(dialog, result[0]);
|
var importDatViewModel = new ImportDatViewModel(dialog, result[0]);
|
||||||
|
dialog.DataContext = importDatViewModel;
|
||||||
await dialog.ShowDialog(_view);
|
await dialog.ShowDialog(_view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reactive;
|
using System.Reactive;
|
||||||
@@ -34,8 +33,9 @@ using Avalonia.Controls.ApplicationLifetimes;
|
|||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
using RomRepoMgr.Core.EventArgs;
|
||||||
|
using RomRepoMgr.Core.Models;
|
||||||
using RomRepoMgr.Database;
|
using RomRepoMgr.Database;
|
||||||
using RomRepoMgr.Models;
|
|
||||||
|
|
||||||
namespace RomRepoMgr.ViewModels
|
namespace RomRepoMgr.ViewModels
|
||||||
{
|
{
|
||||||
@@ -352,10 +352,5 @@ namespace RomRepoMgr.ViewModels
|
|||||||
internal event EventHandler WorkFinished;
|
internal event EventHandler WorkFinished;
|
||||||
|
|
||||||
internal event EventHandler<RomSetEventArgs> GotRomSets;
|
internal event EventHandler<RomSetEventArgs> GotRomSets;
|
||||||
|
|
||||||
public sealed class RomSetEventArgs : EventArgs
|
|
||||||
{
|
|
||||||
public List<RomSetModel> RomSets { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user