First commit
This commit is contained in:
30
Feladat1/Program.cs
Normal file
30
Feladat1/Program.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Feladat1.UI.MainWindow;
|
||||
using Logic;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Repository;
|
||||
|
||||
namespace Feladat1;
|
||||
|
||||
class Program
|
||||
{
|
||||
static int Main()
|
||||
{
|
||||
var application = Adw.Application.New("org.piper.feladat1", Gio.ApplicationFlags.FlagsNone);
|
||||
application.OnActivate += (sender, args) =>
|
||||
{
|
||||
var window = new MainWindow().Window;
|
||||
window.Application = (Adw.Application)sender;
|
||||
window.Show();
|
||||
};
|
||||
|
||||
return application.RunWithSynchronizationContext(null);
|
||||
}
|
||||
|
||||
private static ServiceProvider SetupServices()
|
||||
{
|
||||
var services = new ServiceCollection();
|
||||
services.AddSingleton<IRepository, JsonRepository>();
|
||||
services.AddSingleton<IUserService, UserService>();
|
||||
return services.BuildServiceProvider();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user