bib_Talk_Chatprogramm/bibtalk/bib-talk/Business/MainWindowManager.cs
2024-08-15 11:45:39 +02:00

48 lines
856 B
C#

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);
}
}
}