first commit

This commit is contained in:
Wesley Hofman
2025-09-18 14:23:18 +02:00
commit 2f1f4199ad
293 changed files with 54467 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ChamChat.Models
{
public static class ExtensionMethods
{
public static String GetTags(this String XML, String Tag)
{
try
{
int i1 = XML.IndexOf("<" + Tag + ">") + Tag.Length + 2;
int i2 = XML.IndexOf("</" + Tag + ">");
return XML.Substring(i1, i2 - i1);
}
catch
{
return "";
}
}
public static String ToHex(this byte Dec)
{
return Dec.ToString("X").PadLeft(2,'0');
}
//public static Int32[] HrsMinSecFromMinutes(this double Minutes)
//{
// int[] result = new int[3];
// int hrs = (int)Math.Floor(Minutes / 60);
// double left = Minutes - 60 * (double)hrs;
// int min = (int)Math.Floor(left / 60);
// left -= (double)min;
// int sec = (int)Math.Floor(left * 60);
// return result;
//}
}
}