dev #17

Merged
JacobTech merged 29 commits from dev into main 2024-04-11 15:50:14 -04:00
Showing only changes of commit 46fdd869da - Show all commits

View File

@ -4,6 +4,7 @@ using GraphicsManager.Objects;
using GraphicsManager.Objects.Core; using GraphicsManager.Objects.Core;
using Luski.net.Interfaces; using Luski.net.Interfaces;
using Luski.net.JsonTypes; using Luski.net.JsonTypes;
using File = Luski.net.JsonTypes.File;
namespace Luski.GUI.MainScreen.UI; namespace Luski.GUI.MainScreen.UI;
@ -24,23 +25,10 @@ public class ChatMessage : UserControl
if (Msg.Files != null && Msg.Files.Length > 0) if (Msg.Files != null && Msg.Files.Length > 0)
{ {
/*
for (int i = 0; i < Msg.Files.Length; i++) for (int i = 0; i < Msg.Files.Length; i++)
{ {
File file = Msg.Files[i]; Controls.Add(new ContentEmbed(Msg.Files[i], Msg.ChannelID));
ContentEmbed button = new(file, Msg.ChannelID); }
if (InvokeRequired)
{
Invoke(new Action(() =>
{
Controls.Add(button);
}));
}
else
{
Controls.Add(button);
}
}*/
} }
DateTime time = new DateTime(2022, 1, 1, 0, 0, 0, 0).AddMilliseconds(Msg.Id >> 22).ToLocalTime(); DateTime time = new DateTime(2022, 1, 1, 0, 0, 0, 0).AddMilliseconds(Msg.Id >> 22).ToLocalTime();
@ -78,21 +66,7 @@ public class ChatMessage : UserControl
{ {
for (int i = 0; i < msg.Files.Length; i++) for (int i = 0; i < msg.Files.Length; i++)
{ {
//files example Controls.Add(new ContentEmbed(msg.Files[i], Msg.ChannelID));
/*
File file = msg.Files[i];
ContentEmbed button = new(file, Msg.ChannelID);
if (InvokeRequired)
{
Invoke(new Action(() =>
{
Controls.Add(button);
}));
}
else
{
Controls.Add(button);
}*/
} }
} }
} }