fixes
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
b2678b485e
commit
73dbd82dfb
@ -1,10 +0,0 @@
|
||||
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="ShoopNCook.Views.Components.NoticePopup">
|
||||
<VerticalStackLayout>
|
||||
<Label
|
||||
x:Name="MessageLabel"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center" />
|
||||
</VerticalStackLayout>
|
||||
</ContentView>
|
@ -1,39 +0,0 @@
|
||||
namespace ShoopNCook.Views.Components;
|
||||
using Microsoft.Maui.Graphics;
|
||||
|
||||
public partial class NoticePopup : ContentView
|
||||
{
|
||||
public NoticePopup(string message, string messageType)
|
||||
{
|
||||
|
||||
InitializeComponent();
|
||||
MessageLabel.Text = message;
|
||||
|
||||
switch (messageType)
|
||||
{
|
||||
case "Error":
|
||||
this.BackgroundColor = Microsoft.Maui.Graphics.Colors.Red;
|
||||
break;
|
||||
case "Warning":
|
||||
this.BackgroundColor = Microsoft.Maui.Graphics.Colors.Yellow;
|
||||
break;
|
||||
case "Notice":
|
||||
this.BackgroundColor = Microsoft.Maui.Graphics.Colors.Blue;
|
||||
break;
|
||||
case "Success":
|
||||
this.BackgroundColor = Microsoft.Maui.Graphics.Colors.Green;
|
||||
break;
|
||||
}
|
||||
|
||||
// Display the toast for 3 seconds
|
||||
|
||||
Device.StartTimer(TimeSpan.FromSeconds(3), () =>
|
||||
{
|
||||
// Close the toast
|
||||
// You need to replace this with your actual code to close the toast
|
||||
this.IsVisible = false;
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in new issue