protected void OnStatusButtonClick()
 {
     if (NumberOfServersOnlineLeft > 0 || ServerModel.Online)
     {
         ServerModel.Online = !ServerModel.Online;
         ServerRepository.Update(ServerModel);
         SetServerStatusButtonName();
         NumberOfServersOnlineChanged.InvokeAsync(ServerModel.Online);
     }
     else
     {
         RegisterMessage.InvokeAsync(new List <string> {
             "No more servers online allowed!", "Error"
         });
     }
 }
 protected async Task RemoveServer()
 {
     if (!ServerModel.Online)
     {
         //var confirmed = await js.Confirm($"Are you sure you want to delete {ServerModel.Name} server?");
         //if (confirmed) {
         //    await Removed.InvokeAsync(ServerModel);
         //}
         confirmation.Show();
     }
     else
     {
         await RegisterMessage.InvokeAsync(new List <string> {
             "Deleting online servers is forbidden!", "Error"
         });
     }
 }