149 m_placeHolder.IsVisible =
string.IsNullOrEmpty(
m_inputKey.Text);
154 m_actionButton.IsVisible =
false;
155 m_action2Button.IsVisible =
false;
156 m_webPageButton.IsVisible =
false;
159 m_downloadButton.IsEnabled = communityContentEntry !=
null;
160 if (communityContentEntry !=
null) {
167 m_actionButton.IsEnabled =
false;
168 m_action2Button.IsEnabled =
false;
173 m_searchTypeButton.IsEnabled =
false;
176 m_searchTypeButton.IsEnabled =
true;
178 m_action2Button.Text = communityContentEntry !=
null && communityContentEntry.IsShow == 0
187 items.Remove(
Order.ByHide);
196 delegate(
object item) {
207 List<object> list = [
string.Empty];
223 delegate(
object item) {
225 m_isOwn = item is
string str && !
string.IsNullOrEmpty(str);
232 m_inputKey.Text =
string.Empty;
236 && communityContentEntry !=
null) {
240 && communityContentEntry !=
null) {
246 communityContentEntry.
Name,
254 communityContentEntry.
Index,
256 delegate(
byte[] data) {
260 string msg = result[0].GetInt32() == 200
262 : result[1].GetString();
268 delegate(Exception e) {
282 if (communityContentEntry.
Boutique == 0) {
290 if (!
string.IsNullOrEmpty(s)) {
293 boutique =
int.Parse(s);
301 communityContentEntry.
Type.ToString(),
302 communityContentEntry.
Index,
305 delegate(
byte[] data) {
310 string msg = result[0].GetInt32() == 200
312 : result[1].GetString();
318 delegate(Exception e) {
336 communityContentEntry.
Name,
344 communityContentEntry.
Type.ToString(),
345 communityContentEntry.
Index,
348 delegate(
byte[] data) {
352 string msg = result[0].GetInt32() == 200
354 : result[1].GetString();
360 delegate(Exception e) {
376 && communityContentEntry !=
null) {
379 int isShow = (communityContentEntry.IsShow + 1) % 2;
382 communityContentEntry.
Index,
385 delegate(
byte[] data) {
394 string msg = result[0].GetInt32() == 200 ? sucessMsg + communityContentEntry.Name : result[1].GetString();
400 delegate(Exception e) {
460 if (
Input.Hold.HasValue
461 &&
Input.HoldTime > 2f
462 &&
Input.Hold.Value.Y < 20f) {
464 Task.Delay(250).Wait();
469 string text =
string.Empty;
476 string text2 =
m_filter is
string s ? s :
string.Empty;
478 string text4 =
m_order.ToString();
479 string cacheKey = $
"{text2}\n{text3}\n{text4}\n{text}\n{m_inputKey.Text}";
480 if (
string.IsNullOrEmpty(cursor)
482 m_treePanel.ScrollPosition = 0f;
485 &&
m_itemsCache.TryGetValue(cacheKey, out IEnumerable<object> value)) {
487 foreach (
object item
in value)
511 delegate(List<CommunityContentEntry> list,
string nextCursor) {
521 if (rootNode ==
null) {
526 m_treePanel.m_widgetsDirty =
true;
527 if (item2.
Icon ==
null
528 && !
string.IsNullOrEmpty(item2.
IconSrc)) {
534 delegate(
byte[] data) {
537 if (data.Length > 0) {
539 Image<Rgba32> image = SixLabors.ImageSharp.Image.Load<Rgba32>(data);
540 bool flag = image.Width > image.Height;
541 if (image.Width > 256
542 || image.Height > 256) {
543 image.Mutate(x => x.Resize(flag ? 256 : 0, flag ? 0 : 256, KnownResamplers.Bicubic));
547 float ratio = (float)image.Height / image.Width;
548 iconMargin =
new Vector2(0f, (1f - ratio) * 32f);
550 else if (image.Width < image.Height) {
551 float ratio = (float)image.Width / image.Height;
552 iconMargin =
new Vector2((1f - ratio) * 32f, 0f);
555 item2.Icon = texture;
557 if (linkedNode !=
null) {
558 linkedNode.Icon = texture;
559 linkedNode.IconMargin = iconMargin;
561 if (parentNode is {
Tag:
int }
562 && parentNode.
Nodes.Last(item3 => item3.Icon !=
null) == linkedNode)
564 parentNode.Icon = texture;
565 parentNode.IconMargin = iconMargin;
580 item2.LinkedNode.Icon = item2.
Icon;
585 && !
string.IsNullOrEmpty(nextCursor)) {
588 loadMoreNode.Selectable =
false;
589 loadMoreNode.Tag =
"Load More";
590 loadMoreNode.OnClicked = () =>
PopulateList(nextCursor);
595 delegate(Exception error) {