Implement OnRefreshContactsListReceived and OnRefreshUserListReceived
This commit is contained in:
parent
e2caef95d3
commit
65bd759549
@ -258,10 +258,6 @@ namespace qtcnet_client
|
||||
Location = new(12, 91)
|
||||
};
|
||||
|
||||
// add controls to current form
|
||||
Controls.Add(CurrentProfileControl);
|
||||
Controls.Add(MainTabControl);
|
||||
|
||||
// get and set contacts
|
||||
var _currentUserContacts = await _apiService.GetCurrentUserContacts();
|
||||
if (_currentUserContacts.Success && _currentUserContacts.Data != null)
|
||||
@ -272,6 +268,10 @@ namespace qtcnet_client
|
||||
if (_currentUserDirectory.Success && _currentUserDirectory.Data != null)
|
||||
await SetupDirectoryUI(_currentUserDirectory.Data);
|
||||
|
||||
// add controls to current form
|
||||
Controls.Add(CurrentProfileControl);
|
||||
Controls.Add(MainTabControl);
|
||||
|
||||
ResumeLayout(true);
|
||||
}
|
||||
else
|
||||
@ -347,9 +347,9 @@ namespace qtcnet_client
|
||||
//_gatewayService.OnServerReconnected += _gatewayService_OnServerReconnected;
|
||||
//_gatewayService.OnServerDisconnect += _gatewayService_OnServerDisconnect;
|
||||
//_gatewayService.OnDirectMessageReceived += _gatewayService_OnDirectMessageReceived;
|
||||
//_gatewayService.OnRefreshUserListsReceived += _gatewayService_OnRefreshUserListReceived;
|
||||
_gatewayService.OnRefreshUserListsReceived += _gatewayService_OnRefreshUserListReceived;
|
||||
//_gatewayService.OnRefreshRoomListReceived += _gatewayService_OnRefreshRoomListReceived;
|
||||
//_gatewayService.OnRefreshContactsListReceived += _gatewayService_OnRefreshContactsListReceived;
|
||||
_gatewayService.OnRefreshContactsListReceived += _gatewayService_OnRefreshContactsListReceived;
|
||||
//_gatewayService.OnServerConfigReceived += _gatewayService_OnServerConfigReceived;
|
||||
//_gatewayService.OnUserForceLogout += _gatewayService_OnUserForceLogout;
|
||||
|
||||
@ -368,9 +368,15 @@ namespace qtcnet_client
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private void _gatewayService_OnRefreshContactsListReceived(object? sender, EventArgs e)
|
||||
private async void _gatewayService_OnRefreshContactsListReceived(object? sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
if(MainTabControl != null)
|
||||
{
|
||||
// get and set contacts
|
||||
var _currentUserContacts = await _apiService.GetCurrentUserContacts();
|
||||
if (_currentUserContacts.Success && _currentUserContacts.Data != null)
|
||||
await SetupContactsUI(_currentUserContacts.Data);
|
||||
}
|
||||
}
|
||||
|
||||
private void _gatewayService_OnRefreshRoomListReceived(object? sender, EventArgs e)
|
||||
@ -378,9 +384,15 @@ namespace qtcnet_client
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private void _gatewayService_OnRefreshUserListReceived(object? sender, EventArgs e)
|
||||
private async void _gatewayService_OnRefreshUserListReceived(object? sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
if(MainTabControl != null)
|
||||
{
|
||||
// get and set user directory
|
||||
var _currentUserDirectory = await _apiService.GetAllUsersAsync();
|
||||
if (_currentUserDirectory.Success && _currentUserDirectory.Data != null)
|
||||
await SetupDirectoryUI(_currentUserDirectory.Data);
|
||||
}
|
||||
}
|
||||
|
||||
private void _gatewayService_OnServerDisconnect(object? sender, EventArgs e)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user