MOBILE BUGFIX-ek

This commit is contained in:
2025-04-25 10:29:14 +02:00
parent 1294a00219
commit 62419a2c28
10 changed files with 266 additions and 67 deletions
+16 -7
View File
@@ -1,6 +1,7 @@
using Android.Util;
using CommunityToolkit.Maui.Alerts;
using CommunityToolkit.Maui.Core;
using DevExpress.Maui.Core.Internal;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
@@ -18,7 +19,7 @@ namespace WorkFlowCheck.MAUI.Helper
public static string DatabaseName = "";
public static bool Syncronised = false;
public static UserDTO SystemUserDTO;
public static string ProgramVersion = "v1.1.018";
public static string ProgramVersion = "v1.1.020";
#if DEBUG
public static string ApiBaseUrl = $"https://dev.wfcapi.nuvolar.hu/";
@@ -57,20 +58,20 @@ namespace WorkFlowCheck.MAUI.Helper
}
}
public async static Task ShowSnackBar(string message,
string actionButtonTextColor = "#FF0000",
string backgroundColor = "#FF0000",
string textColor = "#FF0000",
string actionButtonTextColor = "#FFFFFF00",
string backgroundColor = "#FFFF0000",
string textColor = "##FFFFFF00",
int duration = 10,
string actionButtonText = "Ok",
Func<Task> action = null)
{
var visualOptions = new SnackbarOptions
{
ActionButtonTextColor = Colors.Yellow,
ActionButtonTextColor = Color.FromArgb(actionButtonTextColor),
CornerRadius = new CornerRadius(10),
Font = Microsoft.Maui.Font.SystemFontOfSize(16),
BackgroundColor = Colors.Red,
TextColor = Colors.Yellow
BackgroundColor = Color.FromArgb(backgroundColor),
TextColor = Color.FromArgb(textColor)
};
var snackbar = Snackbar.Make(
@@ -86,5 +87,13 @@ namespace WorkFlowCheck.MAUI.Helper
);
await snackbar.Show();
}
public static string ColorToHex(Color color)
{
// ARGB értékek lekérése
uint colorInt = (uint)color.ToArgb();
// Hexadecimális stringgé alakítás, és a '#'-t is hozzáadjuk
return $"#{colorInt:X8}";
}
}
}