80f2610b04
Erik hat die 3 Schichten arschitektur voll fertig gemacht wenn jemand sachen added OHNE sie zu beachten gibts stress
52 lines
942 B
C#
52 lines
942 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using bib_talk.Repository;
|
|
|
|
namespace bib_talk.Business
|
|
{
|
|
public class MainWindowManager
|
|
{
|
|
private MainWindowDatabase mwDatabase;
|
|
private string loggedinUser;
|
|
|
|
public MainWindowManager(MainWindow mainWindow)
|
|
{
|
|
mwDatabase = new MainWindowDatabase(mainWindow);
|
|
}
|
|
|
|
public MainWindowManager(MainWindow mainWindow, string user)
|
|
{
|
|
mwDatabase = new MainWindowDatabase(mainWindow, user);
|
|
loggedinUser = user;
|
|
}
|
|
|
|
public void SendMessage()
|
|
{
|
|
mwDatabase.SendMessage();
|
|
}
|
|
|
|
public void LoadMessages()
|
|
{
|
|
mwDatabase.LoadMessages();
|
|
}
|
|
|
|
public void LoadOnlineUsers()
|
|
{
|
|
mwDatabase.LoadOnlineUsers();
|
|
}
|
|
|
|
public void LogoutUser()
|
|
{
|
|
mwDatabase.LogoutUser();
|
|
}
|
|
|
|
public async Task UploadProfileImage(string filePath)
|
|
{
|
|
await mwDatabase.UploadProfileImage(filePath);
|
|
}
|
|
}
|
|
}
|