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