| 1 | using System; |
| 2 | using System.Text.RegularExpressions; |
| 3 | using FrankenDrift.Glue.Infragistics.Win.UltraWinToolbars; |
| 4 | |
| 5 | namespace FrankenDrift.Glue |
| 6 | { |
| 7 | public static partial class Util |
| 8 | { |
| 9 | public static string StripCarats(string str) => StripCarets(str); |
| 10 | public static string StripCarets(string str) |
| 11 | { |
| 12 | if (str.Contains("<#") && str.Contains("#>")) |
| 13 | str = str.Replace("<#", "[[==~~").Replace("#>", "~~==]]"); |
| 14 | return HtmlTagRegex().Replace(str, ""); |
| 15 | } |
| 16 | |
| 17 | public static string GetSetting(string _a, string _b, string _c, string _d = "") => _d; |
| 18 | public static void SaveSetting(string _a, string _b, string _c, string _val) { } |
| 19 | public static void DeleteSetting(string _a, string _b, string _c) { } |
| 20 | |
| 21 | public static void AddPrevious() { } |
| 22 | public static void AddPrevious(UltraToolbarsManager _a, string _b) { } |
| 23 | |
| 24 | [GeneratedRegex("<(.|\n)+?>")] |
| 25 | private static partial Regex HtmlTagRegex(); |
| 26 | } |
| 27 | |
| 28 | public static class Application |
| 29 | { |
| 30 | static UIGlue _frontend; |
| 31 | public static void SetFrontend(UIGlue app) |
| 32 | { |
| 33 | _frontend = app; |
| 34 | } |
| 35 | |
| 36 | public static string LocalUserAppDataPath => |
| 37 | Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); |
| 38 | public static string StartupPath => _frontend.GetExecutableLocation(); |
| 39 | public static string ExecutablePath => _frontend.GetExecutablePath(); |
| 40 | public static string ProductVersion => _frontend.GetClaimedAdriftVersion(); |
| 41 | |
| 42 | public static void DoEvents() => _frontend.DoEvents(); |
| 43 | } |
| 44 | } |