Initial commit to new repository
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
public class BoolToVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type t, object p, CultureInfo c)
|
||||
{
|
||||
return (!(value is bool) || !(bool)value) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
|
||||
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
||||
{
|
||||
return v is Visibility && (Visibility)v == Visibility.Visible;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using AxCopilot.Services;
|
||||
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
public class ClipboardHasImageConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type t, object p, CultureInfo c)
|
||||
{
|
||||
return (!(value is ClipboardEntry { Image: not null })) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
|
||||
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using AxCopilot.Services;
|
||||
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
public class ClipboardThumbnailConverter : IValueConverter
|
||||
{
|
||||
public object? Convert(object value, Type t, object p, CultureInfo c)
|
||||
{
|
||||
if (value is ClipboardEntry { Image: not null } clipboardEntry)
|
||||
{
|
||||
return clipboardEntry.Image;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
public class CountToVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type t, object p, CultureInfo c)
|
||||
{
|
||||
return (!(value is int num) || num <= 0) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
|
||||
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
31
.decompiledproj/AxCopilot/Themes/HexToColorConverter.cs
Normal file
31
.decompiledproj/AxCopilot/Themes/HexToColorConverter.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
public class HexToColorConverter : IValueConverter
|
||||
{
|
||||
public static readonly HexToColorConverter Instance = new HexToColorConverter();
|
||||
|
||||
public object Convert(object value, Type t, object p, CultureInfo c)
|
||||
{
|
||||
if (value is string value2)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (Color)ColorConverter.ConvertFromString(value2);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return Colors.Transparent;
|
||||
}
|
||||
|
||||
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
29
.decompiledproj/AxCopilot/Themes/IndexToNumberConverter.cs
Normal file
29
.decompiledproj/AxCopilot/Themes/IndexToNumberConverter.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
public class IndexToNumberConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type t, object p, CultureInfo c)
|
||||
{
|
||||
if (value is ListViewItem container)
|
||||
{
|
||||
ItemsControl itemsControl = ItemsControl.ItemsControlFromItemContainer((DependencyObject)(object)container);
|
||||
if (itemsControl != null)
|
||||
{
|
||||
int num = itemsControl.ItemContainerGenerator.IndexFromContainer((DependencyObject)(object)container);
|
||||
return (num >= 0 && num < 9) ? (num + 1).ToString() : "";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
public class InverseBoolToVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type t, object p, CultureInfo c)
|
||||
{
|
||||
return (value is bool && (bool)value) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
|
||||
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
||||
{
|
||||
return !(v is Visibility) || (Visibility)v != Visibility.Visible;
|
||||
}
|
||||
}
|
||||
19
.decompiledproj/AxCopilot/Themes/NullToCollapsedConverter.cs
Normal file
19
.decompiledproj/AxCopilot/Themes/NullToCollapsedConverter.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
public class NullToCollapsedConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type t, object p, CultureInfo c)
|
||||
{
|
||||
return (!(value is string value2) || string.IsNullOrEmpty(value2)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
|
||||
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
18
.decompiledproj/AxCopilot/Themes/StringEqualConverter.cs
Normal file
18
.decompiledproj/AxCopilot/Themes/StringEqualConverter.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
public class StringEqualConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type t, object p, CultureInfo c)
|
||||
{
|
||||
return value is string text && p is string text2 && text == text2;
|
||||
}
|
||||
|
||||
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
||||
{
|
||||
return (v is bool && (bool)v) ? p : Binding.DoNothing;
|
||||
}
|
||||
}
|
||||
100
.decompiledproj/AxCopilot/Themes/SymbolToBackgroundConverter.cs
Normal file
100
.decompiledproj/AxCopilot/Themes/SymbolToBackgroundConverter.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
public class SymbolToBackgroundConverter : IValueConverter
|
||||
{
|
||||
private static readonly Dictionary<string, SolidColorBrush> SymbolColors = new Dictionary<string, SolidColorBrush>
|
||||
{
|
||||
{
|
||||
"\ue774",
|
||||
Brush("#0078D4")
|
||||
},
|
||||
{
|
||||
"\ue8b7",
|
||||
Brush("#107C10")
|
||||
},
|
||||
{
|
||||
"\ue756",
|
||||
Brush("#1B1B1B")
|
||||
},
|
||||
{
|
||||
"\ue77f",
|
||||
Brush("#8764B8")
|
||||
},
|
||||
{
|
||||
"\ue8a1",
|
||||
Brush("#C50F1F")
|
||||
},
|
||||
{
|
||||
"\ue82d",
|
||||
Brush("#0099BC")
|
||||
},
|
||||
{
|
||||
"\uecca",
|
||||
Brush("#C239B3")
|
||||
},
|
||||
{
|
||||
"\uecaa",
|
||||
Brush("#4B5EFC")
|
||||
},
|
||||
{
|
||||
"\ue8a5",
|
||||
Brush("#605E5C")
|
||||
},
|
||||
{
|
||||
"\ue74e",
|
||||
Brush("#107C10")
|
||||
},
|
||||
{
|
||||
"\ue74d",
|
||||
Brush("#C50F1F")
|
||||
},
|
||||
{
|
||||
"\ue8ac",
|
||||
Brush("#CA5010")
|
||||
},
|
||||
{
|
||||
"\ue72c",
|
||||
Brush("#0078D4")
|
||||
},
|
||||
{
|
||||
"\ue946",
|
||||
Brush("#4B5EFC")
|
||||
},
|
||||
{
|
||||
"\ue7ba",
|
||||
Brush("#CA5010")
|
||||
},
|
||||
{
|
||||
"\uea39",
|
||||
Brush("#C50F1F")
|
||||
}
|
||||
};
|
||||
|
||||
private static readonly SolidColorBrush DefaultBrush = Brush("#4B5EFC");
|
||||
|
||||
public object Convert(object value, Type t, object p, CultureInfo c)
|
||||
{
|
||||
SolidColorBrush value2;
|
||||
return (value is string key && SymbolColors.TryGetValue(key, out value2)) ? value2 : DefaultBrush;
|
||||
}
|
||||
|
||||
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private static SolidColorBrush Brush(string hex)
|
||||
{
|
||||
Color color = (Color)ColorConverter.ConvertFromString(hex);
|
||||
SolidColorBrush solidColorBrush = new SolidColorBrush(color);
|
||||
((Freezable)solidColorBrush).Freeze();
|
||||
return solidColorBrush;
|
||||
}
|
||||
}
|
||||
186
.decompiledproj/AxCopilot/Themes/Symbols.cs
Normal file
186
.decompiledproj/AxCopilot/Themes/Symbols.cs
Normal file
@@ -0,0 +1,186 @@
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
internal static class Symbols
|
||||
{
|
||||
public const string Search = "\ue721";
|
||||
|
||||
public const string Globe = "\ue774";
|
||||
|
||||
public const string Folder = "\ue8b7";
|
||||
|
||||
public const string Terminal = "\ue756";
|
||||
|
||||
public const string LaunchIcon = "\ue7c4";
|
||||
|
||||
public const string Clipboard = "\ue77f";
|
||||
|
||||
public const string Workspace = "\ue8a1";
|
||||
|
||||
public const string Cloud = "\ue82d";
|
||||
|
||||
public const string Plugin = "\uecca";
|
||||
|
||||
public const string App = "\uecaa";
|
||||
|
||||
public const string File = "\ue8a5";
|
||||
|
||||
public const string Excel = "\ue9f9";
|
||||
|
||||
public const string Word = "\ue8a5";
|
||||
|
||||
public const string Slides = "\uee71";
|
||||
|
||||
public const string Pdf = "\uea90";
|
||||
|
||||
public const string Image = "\ueb9f";
|
||||
|
||||
public const string Video = "\ue714";
|
||||
|
||||
public const string Music = "\uec4f";
|
||||
|
||||
public const string Archive = "\ue8c6";
|
||||
|
||||
public const string Code = "\ue943";
|
||||
|
||||
public const string Config = "\ue713";
|
||||
|
||||
public const string TextFile = "\ue8d2";
|
||||
|
||||
public const string Web = "\ue774";
|
||||
|
||||
public const string Warning = "\ue7ba";
|
||||
|
||||
public const string Error = "\uea39";
|
||||
|
||||
public const string Info = "\ue946";
|
||||
|
||||
public const string Save = "\ue74e";
|
||||
|
||||
public const string Delete = "\ue74d";
|
||||
|
||||
public const string Rename = "\ue8ac";
|
||||
|
||||
public const string Restore = "\ue72c";
|
||||
|
||||
public const string Calculator = "\ue8ef";
|
||||
|
||||
public const string Equal = "\ue8d2";
|
||||
|
||||
public const string Snippet = "\ue70b";
|
||||
|
||||
public const string Text = "\ue8d2";
|
||||
|
||||
public const string History = "\ue81c";
|
||||
|
||||
public const string ClipPaste = "\ue77f";
|
||||
|
||||
public const string Picture = "\ueb9f";
|
||||
|
||||
public const string Lock = "\ue72e";
|
||||
|
||||
public const string Sleep = "\uec46";
|
||||
|
||||
public const string Power = "\ue7e8";
|
||||
|
||||
public const string Restart = "\ue777";
|
||||
|
||||
public const string Logout = "\uf3b1";
|
||||
|
||||
public const string RecycleBin = "\ue74d";
|
||||
|
||||
public const string MediaPlay = "\ue768";
|
||||
|
||||
public const string MediaNext = "\ue893";
|
||||
|
||||
public const string MediaPrev = "\ue892";
|
||||
|
||||
public const string VolumeUp = "\ue995";
|
||||
|
||||
public const string VolumeDown = "\ue993";
|
||||
|
||||
public const string VolumeMute = "\ue74f";
|
||||
|
||||
public const string Computer = "\ue7f4";
|
||||
|
||||
public const string Person = "\ue77b";
|
||||
|
||||
public const string Network = "\ue968";
|
||||
|
||||
public const string Battery = "\ue83f";
|
||||
|
||||
public const string BatteryCharging = "\ue83e";
|
||||
|
||||
public const string BatteryLow = "\ueba0";
|
||||
|
||||
public const string Clock = "\ue823";
|
||||
|
||||
public const string Processor = "\ue950";
|
||||
|
||||
public const string Memory = "\ue950";
|
||||
|
||||
public const string Storage = "\ueda2";
|
||||
|
||||
public const string Emoji = "\ue76e";
|
||||
|
||||
public const string ColorPicker = "\ue771";
|
||||
|
||||
public const string Timer = "\ue916";
|
||||
|
||||
public const string RecentFiles = "\ue81c";
|
||||
|
||||
public const string Currency = "\ue8ee";
|
||||
|
||||
public const string Uninstall = "\ue74d";
|
||||
|
||||
public const string Note = "\ue70b";
|
||||
|
||||
public const string PortIcon = "\ue968";
|
||||
|
||||
public const string EnvVar = "\ue8d7";
|
||||
|
||||
public const string JsonValid = "\ue930";
|
||||
|
||||
public const string JsonFormat = "\ue8a4";
|
||||
|
||||
public const string JsonMinify = "\ue8c6";
|
||||
|
||||
public const string EncodeIcon = "\ue8cb";
|
||||
|
||||
public const string SnapLayout = "\ue8a0";
|
||||
|
||||
public const string CaptureIcon = "\ue722";
|
||||
|
||||
public const string ScrollCapture = "\ue8f4";
|
||||
|
||||
public const string ReminderBell = "\uea8f";
|
||||
|
||||
public const string Lightbulb = "\ue82f";
|
||||
|
||||
public const string EyeDropper = "\uef3c";
|
||||
|
||||
public const string DateIcon = "\ue787";
|
||||
|
||||
public const string ServiceIcon = "\ue912";
|
||||
|
||||
public const string PipeIcon = "\ue8c8";
|
||||
|
||||
public const string JournalIcon = "\ue70b";
|
||||
|
||||
public const string RoutineIcon = "\ue82f";
|
||||
|
||||
public const string BatchIcon = "\ue8c6";
|
||||
|
||||
public const string DiffIcon = "\ue89a";
|
||||
|
||||
public const string WindowIcon = "\ue8a7";
|
||||
|
||||
public const string TextStats = "\ue8d2";
|
||||
|
||||
public const string Favorite = "\ue728";
|
||||
|
||||
public const string RenameIcon = "\ue8ac";
|
||||
|
||||
public const string MonitorIcon = "\ue7f4";
|
||||
|
||||
public const string ScaffoldIcon = "\ue8f1";
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
public class WarningSubtitleColorConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type t, object p, CultureInfo c)
|
||||
{
|
||||
return (!(value is string text) || !text.Contains('⚠')) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
|
||||
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user