working on grouplistcontrol & charlistcontrol
This commit is contained in:
@@ -17,6 +17,11 @@ public partial class CharacterListControl : UserControl
|
||||
private UserProfile? profile;
|
||||
private Group? group;
|
||||
|
||||
public CharacterListControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void LoadContent(IMainWindowApi mainApi, UserProfile? profile)
|
||||
{
|
||||
LoadContent(mainApi, profile, null);
|
||||
@@ -32,7 +37,6 @@ public partial class CharacterListControl : UserControl
|
||||
this.mainApi = mainApi;
|
||||
this.profile = profile;
|
||||
this.group = group;
|
||||
InitializeComponent();
|
||||
PrepareList();
|
||||
LoadList(group);
|
||||
}
|
||||
@@ -42,8 +46,8 @@ public partial class CharacterListControl : UserControl
|
||||
radListView_CharList.BeginUpdate();
|
||||
radListView_CharList.Columns.Clear();
|
||||
|
||||
radListView_CharList.Columns.Add(CharListControlLangRes.Column_CharName);
|
||||
radListView_CharList.Columns.Add(CharListControlLangRes.Column_CharFandom);
|
||||
radListView_CharList.Columns.Add(GeneralLangRes.Column_Name);
|
||||
radListView_CharList.Columns.Add(GeneralLangRes.Column_Fandom);
|
||||
|
||||
if (profile != null)
|
||||
radListView_CharList.Columns.Add(CharListControlLangRes.Column_CharOwner);
|
||||
@@ -157,16 +161,16 @@ public partial class CharacterListControl : UserControl
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(filterText))
|
||||
{
|
||||
var allValues = new string[]
|
||||
var allValues = new string?[]
|
||||
{
|
||||
character.Name!,
|
||||
character.Fandom ?? "",
|
||||
character.Owner!.Name!,
|
||||
character.Name,
|
||||
character.Fandom,
|
||||
character.Owner?.Name,
|
||||
};
|
||||
|
||||
foreach (var value in allValues)
|
||||
{
|
||||
if (!isValidResult && value.Contains(filterText))
|
||||
if (!isValidResult && value is not null && value.Contains(filterText))
|
||||
isValidResult = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user