code cleanup

This commit is contained in:
2024-06-11 06:59:17 +02:00
parent 07cacbfbda
commit ac3cfc270c
21 changed files with 317 additions and 414 deletions

View File

@@ -1,35 +1,34 @@
using OwnChar.App.Desktop.Api;
using OwnChar.Model;
using Pilz.UI.Telerik.Dialogs;
using Pilz.UI;
using System.Windows.Forms;
namespace OwnChar.App.Desktop.UI.MainTabs
namespace OwnChar.App.Desktop.UI.MainTabs;
public partial class TabUserView : UserControl, ILoadContent
{
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)
{
private readonly IMainWindowApi mainApi;
private readonly UserAccount? account;
private readonly UserProfile? profile;
this.mainApi = mainApi;
this.account = account;
this.profile = profile;
InitializeComponent();
}
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, UserAccount? account) : this(mainApi, account, mainApi.Manager!.Users.GetOwnUserProfile())
{
}
public TabUserView(IMainWindowApi mainApi, UserProfile? profile) : this(mainApi, null, profile)
{
}
public TabUserView(IMainWindowApi mainApi, UserProfile? profile) : this(mainApi, null, profile)
{
}
public void LoadContent()
{
characterListControl1.LoadContent(mainApi, profile);
}
public void LoadContent()
{
characterListControl1.LoadContent(mainApi, profile);
}
}