I think i am done

This commit is contained in:
JacobTech 2024-11-18 22:48:28 -05:00
parent f47dd7c3a0
commit fdfece9ab9
3 changed files with 25 additions and 8 deletions

View File

@ -264,6 +264,10 @@ public class TextBox : UserControl
set set
{ {
_watermark.Text = value; _watermark.Text = value;
if (string.IsNullOrEmpty(Text))
{
Pointer.Location = _label.Location;
}
} }
} }

View File

@ -402,7 +402,11 @@ public class PublicChat : UserControl
FileUpload FU = new(Channel!.Server, FilePath); FileUpload FU = new(Channel!.Server, FilePath);
FilesToUpload.Add(FU); FilesToUpload.Add(FU);
FileFlow.Controls.Add(FU); FileFlow.Controls.Add(FU);
FU.BackgroundColor = Color4.Red; FU.Clicked += o =>
{
RemoveFile(FU);
return Task.CompletedTask;
};
if (ReloadUI) TryDraw(); if (ReloadUI) TryDraw();
} }
@ -410,7 +414,6 @@ public class PublicChat : UserControl
private Task CFOnSizeChanged(IRenderObject arg) private Task CFOnSizeChanged(IRenderObject arg)
{ {
FileFlow.BackgroundColor = Color4.Green;
arg.Location = new(arg.Location.X, arg.Location.Y + OldSize - arg.Size.Y); arg.Location = new(arg.Location.X, arg.Location.Y + OldSize - arg.Size.Y);
MessageFlow.Size = new(MessageFlow.Size.X, FileFlow.Location.Y - MessageFlow.Location.Y); MessageFlow.Size = new(MessageFlow.Size.X, FileFlow.Location.Y - MessageFlow.Location.Y);
OldSize = arg.Size.Y; OldSize = arg.Size.Y;
@ -426,6 +429,8 @@ public class PublicChat : UserControl
public void RemoveFile(FileUpload FU) public void RemoveFile(FileUpload FU)
{ {
FileFlow.Controls.Remove(FU);
FilesToUpload.Remove(FU);
MessageFlow.Size = new(MessageFlow.Size.X, FileFlow.Location.Y - MessageFlow.Location.Y); MessageFlow.Size = new(MessageFlow.Size.X, FileFlow.Location.Y - MessageFlow.Location.Y);
} }

View File

@ -209,13 +209,21 @@ public class MainScreenWindow : Window
.Result.Content.ReadAsStringAsync().Result != .Result.Content.ReadAsStringAsync().Result !=
FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion) FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion)
{ {
var update = new UpdateWindow(); if (Globals.UpdaterSettings.AutoUpdate)
var result = update.ShowDialogue(this);
if (result == UpdateWindow.DialogueResult.Yes)
{ {
Globals.Download = true; Globals.Download = true;
Close(); Close();
} }
else
{
var update = new UpdateWindow();
var result = update.ShowDialogue(this);
if (result == UpdateWindow.DialogueResult.Yes)
{
Globals.Download = true;
Close();
}
}
} }
await LoginOnChangeToApp(); await LoginOnChangeToApp();
} }
@ -752,11 +760,11 @@ public class MainScreenWindow : Window
private Task AddButtonClicked(IRenderObject arg) private Task AddButtonClicked(IRenderObject arg)
{ {
CenterFullScreenBase aso = new(new AddServerOverlayForm()) /* CenterFullScreenBase aso = new(new AddServerOverlayForm())
{ {
AllowHoverFromBehind = false AllowHoverFromBehind = false
}; };*/
//AddServerOverlayld aso = new(); AddServerOverlayld aso = new();
aso.Clicked += AsoOnClicked; aso.Clicked += AsoOnClicked;
Controls.Add(aso); Controls.Add(aso);