35 lines
939 B
C#
35 lines
939 B
C#
using OwnChar.App.Desktop.Api;
|
|
using OwnChar.Model;
|
|
using Pilz.UI;
|
|
using System.Windows.Forms;
|
|
|
|
namespace OwnChar.App.Desktop.UI.MainTabs;
|
|
|
|
public partial class TabUserView : UserControl, ILoadContent
|
|
{
|
|
private readonly IMainWindowApi mainApi;
|
|
private readonly UserAccount? account;
|
|
private readonly UserProfile? profile;
|
|
|
|
private TabUserView(IMainWindowApi mainApi, UserAccount? account, UserProfile? profile)
|
|
{
|
|
this.mainApi = mainApi;
|
|
this.account = account;
|
|
this.profile = profile;
|
|
InitializeComponent();
|
|
}
|
|
|
|
public TabUserView(IMainWindowApi mainApi, UserAccount? account) : this(mainApi, account, mainApi.Manager!.Users.GetOwnUserProfile())
|
|
{
|
|
}
|
|
|
|
public TabUserView(IMainWindowApi mainApi, UserProfile? profile) : this(mainApi, null, profile)
|
|
{
|
|
}
|
|
|
|
public void LoadContent()
|
|
{
|
|
characterListControl1.LoadContent(mainApi, profile);
|
|
}
|
|
}
|