This commit is contained in:
Meik
2025-11-11 11:03:42 +01:00
commit dc3e8a2e4c
582 changed files with 191465 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

View File

@@ -0,0 +1,17 @@
<Application x:Class="F4SDicons.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!--Dark/LightMode-->
<ResourceDictionary Source="ResourcesLightMode.xaml"/>
<!--ScrollViewer Ressourcen-->
<ResourceDictionary Source="ScrollViewerResources.xaml"/>
<!--Slider Ressourcen-->
<ResourceDictionary Source="CustomSlider.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>

View File

@@ -0,0 +1,21 @@
using C4IT.Logging;
using System.Windows;
namespace F4SDicons
{
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
InitializeLogger();
}
private void InitializeLogger()
{
cLogManagerFile.CreateInstance(false, SubFolder: "Logs");
cLogManager.DefaultLogger.LogAssemblyInfo();
}
}
}

View File

@@ -0,0 +1,97 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<Style x:Key="SliderRepeatButton" TargetType="RepeatButton">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Focusable" Value="false" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RepeatButton">
<Border x:Name="RightSliderBorder" Background="{DynamicResource colorF2F2F2}" Height="5" BorderThickness="1"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SliderRepeatButton1" TargetType="RepeatButton">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RepeatButton">
<Border x:Name="LeftSliderBorder" SnapsToDevicePixels="True" Background="{DynamicResource colorF2F2F2}" Height="5" BorderThickness="1"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SliderThumb" TargetType="Thumb">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Thumb">
<!--Add name to ellipse to use in controltemplate triggers-->
<Border x:Name="ThumbBorder" Height="15" Width="15" CornerRadius="10" VerticalAlignment="Center" HorizontalAlignment="Center" Background="{DynamicResource color3D3C3C}" Padding="2">
<TextBlock x:Name="ThumbBorderText" FontSize="12" FontWeight="DemiBold" Foreground="{DynamicResource colorF7FAFA}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed" Text="{Binding RelativeSource={RelativeSource AncestorType=Slider, AncestorLevel=1}, Path=Value, StringFormat=N0}">
<!--<TextBlock.Text>
<Binding ElementName="CustomSlider" Path="Value"/>
</TextBlock.Text>-->
</TextBlock>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="ThumbBorder" Property="Height" Value="27"></Setter>
<Setter TargetName="ThumbBorder" Property="Width" Value="27"></Setter>
<Setter TargetName="ThumbBorder" Property="CornerRadius" Value="13"></Setter>
<Setter Property="Cursor" Value="Hand"></Setter>
<Setter TargetName="ThumbBorderText" Property="Visibility" Value="Visible"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="Slider" TargetType="Slider">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="30"/>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Track Grid.Row="1" x:Name="PART_Track" >
<Track.DecreaseRepeatButton>
<RepeatButton Style="{StaticResource SliderRepeatButton1}" Command="Slider.DecreaseLarge" />
</Track.DecreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource SliderThumb}" />
</Track.Thumb>
<Track.IncreaseRepeatButton>
<RepeatButton Style="{StaticResource SliderRepeatButton}" Command="Slider.IncreaseLarge" />
</Track.IncreaseRepeatButton>
</Track>
</Grid>
</ControlTemplate>
<Style x:Name="CustomSlider" TargetType="Slider">
<Setter Property="Focusable" Value="False"/>
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Minimum" Value="50"/>
<Setter Property="Maximum" Value="200"/>
<Setter Property="Value" Value="100"/>
<Style.Triggers>
<Trigger Property="Orientation" Value="Horizontal">
<Setter Property="MinHeight" Value="21" />
<Setter Property="MinWidth" Value="104" />
<Setter Property="Template" Value="{StaticResource Slider}" />
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>

View File

@@ -0,0 +1,225 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{459169D0-712D-46A8-B9A8-2EE0FDFD3AF3}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>F4SDicons</RootNamespace>
<AssemblyName>F4SD-IconPicker</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>false</Deterministic>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Setup %28Release%29|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Setup %28Release%29\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>IconPickerLogo.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'NewFeatures%28Debug%29|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\NewFeatures%28Debug%29\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="MaterialIcons, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MaterialIcons.1.0.3\lib\MaterialIcons.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="WpfAnimatedGif, Version=2.0.0.0, Culture=neutral, PublicKeyToken=9e7cd3b544a090dc, processorArchitecture=MSIL">
<HintPath>..\..\packages\WpfAnimatedGif.2.0.2\lib\net40\WpfAnimatedGif.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="..\..\..\Common Code\MultiLanguage\C4IT.MultiLanguage.MultiLanguageSupport.cs">
<Link>Common\C4IT.MultiLanguage.MultiLanguageSupport.cs</Link>
</Compile>
<Compile Include="..\..\..\Common Code\XML\C4IT.XML.ConfigParsing.cs">
<Link>Common\C4IT.XML.ConfigParsing.cs</Link>
</Compile>
<Compile Include="Models\AdvancedIconInformation.cs" />
<Compile Include="Models\IconCollectionUserControl.cs" />
<Compile Include="Models\RoutedEventArgsIconInfo.cs" />
<Compile Include="User Controls\CopyTextBox.xaml.cs">
<DependentUpon>CopyTextBox.xaml</DependentUpon>
</Compile>
<Compile Include="User Controls\IconGrid.xaml.cs">
<DependentUpon>IconGrid.xaml</DependentUpon>
</Compile>
<Compile Include="User Controls\IconList.xaml.cs">
<DependentUpon>IconList.xaml</DependentUpon>
</Compile>
<Compile Include="User Controls\SearchBar.xaml.cs">
<DependentUpon>SearchBar.xaml</DependentUpon>
</Compile>
<Compile Include="User Controls\WindowStateBar.xaml.cs">
<DependentUpon>WindowStateBar.xaml</DependentUpon>
</Compile>
<Compile Include="User Controls\ZoomViewer.xaml.cs">
<DependentUpon>ZoomViewer.xaml</DependentUpon>
</Compile>
<Page Include="CustomSlider.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="ResourcesDarkMode.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ResourcesLightMode.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ScrollViewerResources.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="User Controls\CopyTextBox.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="User Controls\IconGrid.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="User Controls\IconList.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="User Controls\SearchBar.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="User Controls\WindowStateBar.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="User Controls\ZoomViewer.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="F4SDicon.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\IconsF4SD.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\F4SDicon3.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\IconPickerLogo.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\F4SD-AdaptableIcon\F4SD-AdaptableIcon.csproj">
<Project>{bab63a6a-1524-435d-9f96-7a30b6ee0624}</Project>
<Name>F4SD-AdaptableIcon</Name>
</ProjectReference>
<ProjectReference Include="..\..\F4SD-Logging\F4SD-Logging.csproj">
<Project>{7793f281-b226-4e20-b6f6-5d53d70f1dc1}</Project>
<Name>F4SD-Logging</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Resource Include="IconPickerLogo.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,10 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

View File

@@ -0,0 +1,190 @@
<Window x:Class="F4SDicons.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:F4SDicons"
xmlns:mi="clr-namespace:MaterialIcons;assembly=MaterialIcons"
xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
xmlns:uc="clr-namespace:F4SDicons.User_Controls"
mc:Ignorable="d"
SizeChanged="Window_SizeChanged"
WindowStyle="None"
ResizeMode="NoResize"
Title="F4SD Icon Picker" Height="600" Width="880" Icon="/Images/IconPickerLogo.ico">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="45"/>
</WindowChrome.WindowChrome>
<Window.Resources>
<SolidColorBrush x:Key="color1C4A99" Color="#1C4A99"/>
<SolidColorBrush x:Key="colorFFFFFF" Color="#FFFFFF"/>
<BooleanToVisibilityConverter x:Key="MyBoolToVisibilityConverter" />
</Window.Resources>
<Grid Background="{DynamicResource colorE9E9E9}">
<Grid.RowDefinitions>
<RowDefinition Height="45"/>
<RowDefinition Height="*"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<uc:WindowStateBar Grid.Column="1" WindowChrome.IsHitTestVisibleInChrome="True">
</uc:WindowStateBar>
</Grid>
<Grid Grid.Row="1" Name="upperGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition x:Name="colDef3" Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Column="0" Grid.Row="2" Name="listGrid" VerticalAlignment="Stretch" Background="{DynamicResource colorE9E9E9}">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<uc:SearchBar x:Name="SearchBarUC">
</uc:SearchBar>
<Border Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<ScrollViewer Margin="0,0,5,0">
<StackPanel Name="mIconsStackpanel" Orientation="Vertical">
<uc:IconList x:Name="IconListUC" IconSelected="Viewer_IconSelected" />
<uc:IconGrid x:Name="IconGridUC" IconSelected="Viewer_IconSelected" Visibility="Collapsed"/>
</StackPanel>
</ScrollViewer>
</Border>
</Grid>
<Grid Grid.Column="1" Grid.Row="0" Background="{DynamicResource colorE9E9E9}">
<Grid.RowDefinitions>
<RowDefinition Height="6*"/>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<uc:ZoomViewer Grid.Row="0" x:Name="currentIconUC">
</uc:ZoomViewer>
<uc:CopyTextBox Grid.Row="1" x:Name="currentNameUC" ToolTipText="Icon-Name kopieren">
</uc:CopyTextBox>
<uc:CopyTextBox Grid.Row="2" x:Name="currentFullNameUC" ToolTipText="XML-Konfigurationswert kopieren">
</uc:CopyTextBox>
</Grid>
</Grid>
<Grid Grid.Row="2" Name="bottomGrid" Background="{DynamicResource colorE9E9E9}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="35"/>
<ColumnDefinition Width="3"/>
<ColumnDefinition Width="35"/>
<ColumnDefinition Width="20"/>
</Grid.ColumnDefinitions>
<Grid.Resources>
<Style TargetType="Border">
<Setter Property="Background" Value="{DynamicResource colorE9E9E9}"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="CornerRadius" Value="5"/>
<Setter Property="Height" Value="35"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource colorF2F2F2}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="ico:AdaptableIcon">
<Setter Property="PrimaryIconColor" Value="{DynamicResource color3D3C3C}"/>
<Setter Property="IconHeight" Value="30"/>
<Setter Property="IconWidth" Value="30"/>
<Setter Property="BorderPadding" Value="5"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="PrimaryIconColor" Value="{DynamicResource color1F92EE}"/>
<Setter Property="IconBackgroundColor" Value="{DynamicResource colorF2F2F2}"/>
<Setter Property="Cursor" Value="Hand"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="F4SDicon" TargetType="ico:AdaptableIcon">
<Setter Property="PrimaryIconColor" Value="{DynamicResource color3D3C3C}"/>
<Setter Property="SecondaryIconColor" Value="{DynamicResource colorF7FAFA}"/>
<Setter Property="BorderPadding" Value="0"/>
<Setter Property="IconWidth" Value="30"/>
<Setter Property="IconHeight" Value="30"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="PrimaryIconColor" Value="{DynamicResource color1C4A99}"/>
<Setter Property="SecondaryIconColor" Value="{DynamicResource colorFFFFFF}"/>
</Trigger>
</Style.Triggers>
</Style>
</Grid.Resources>
<ico:AdaptableIcon Grid.Column="0" x:Name="materialLogo" Style="{DynamicResource F4SDicon}" SelectedInternIcon="f4sd">
</ico:AdaptableIcon>
<ico:AdaptableIcon Grid.Column="2" x:Name="gridIcon" MouseLeftButtonUp="ChangeToGrid_ButtonUp" ToolTip="Gitter-Ansicht" SelectedMaterialIcon="ic_grid_on">
</ico:AdaptableIcon>
<ico:AdaptableIcon Grid.Column="2" x:Name="listIcon" Visibility="Collapsed" MouseLeftButtonUp="ChangeToList_ButtonUp" ToolTip="Listen-Ansicht" SelectedMaterialIcon="ic_format_list_bulleted">
</ico:AdaptableIcon>
<ico:AdaptableIcon Grid.Column="4" x:Name="darkModeIcon" MouseLeftButtonUp="ChangeToDarkMode_ButtonUp" ToolTip="Dark-Mode" SelectedInternIcon="style_moonFilled">
</ico:AdaptableIcon>
<ico:AdaptableIcon Grid.Column="4" x:Name="lightModeIcon" Visibility="Collapsed" MouseLeftButtonUp="ChangeToLightMode_ButtonUp" ToolTip="Light-Mode" SelectedInternIcon="style_sunFilled">
</ico:AdaptableIcon>
</Grid>
</Grid>
</Window>

View File

@@ -0,0 +1,311 @@
using FasdDesktopUi.Basics.UserControls.AdaptableIcon;
using MaterialIcons;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using F4SDicons.Models;
using F4SD_AdaptableIcon.Enums;
namespace F4SDicons
{
public partial class MainWindow : System.Windows.Window
{
private List<cAdvancedIconInformation> iconInformation = new List<cAdvancedIconInformation>();
public MainWindow() => InitializeComponent();
protected override void OnInitialized(EventArgs e)
{
base.OnInitialized(e);
SearchBarUC.bindingTextBox.DataContext = this;
InstantiateIconInformation();
}
private void InstantiateIconInformation()
{
List<cAdvancedIconInformation> IconInformation = new List<cAdvancedIconInformation>();
foreach (enumInternIcons internIcon in Enum.GetValues(typeof(enumInternIcons)))
{
switch (internIcon)
{
case enumInternIcons.none:
case enumInternIcons.fasd:
case enumInternIcons.f4sd:
case enumInternIcons.f4sd_outline:
case enumInternIcons.f4sd_speedo:
case enumInternIcons.f4sd_product_logo:
case enumInternIcons.misc_functionMarker:
continue;
}
cAdvancedIconInformation tempIconInformation = new cAdvancedIconInformation() { IsVisible = true };
tempIconInformation.UpdateIconInformation(internIcon);
IconInformation.Add(tempIconInformation);
}
foreach (MaterialIconType materialIcon in Enum.GetValues(typeof(MaterialIconType)))
{
cAdvancedIconInformation tempIconInformation = new cAdvancedIconInformation() { IsVisible = true };
tempIconInformation.UpdateIconInformation(materialIcon);
IconInformation.Add(tempIconInformation);
}
iconInformation = IconInformation;
IconListUC.IconInformation = IconInformation;
IconGridUC.IconInformation = IconInformation;
}
#region Variables
bool greaterThan = false;
string src = "ResourcesLightMode.xaml";
#endregion
#region Search Filter
private string searchvalue;
public string SearchValue
{
get { return searchvalue; }
set
{
searchvalue = value;
FilterIconInformation(value);
}
}
private void FilterIconInformation(string filterValue)
{
foreach (var information in iconInformation)
{
if (string.IsNullOrWhiteSpace(filterValue))
{
information.IsVisible = true;
continue;
}
information.IsVisible = information.IconName.Contains(filterValue);
}
}
#endregion
#region Size Change
private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
{
var ah = ActualHeight;
var aw = ActualWidth;
if (ah > aw)
{
if (greaterThan == false)
{
HeightGtWidth();
}
}
else
{
if (greaterThan == true)
{
WidthGtHeight();
}
}
}
private void HeightGtWidth()
{
RowDefinition rowDef3 = new RowDefinition();
rowDef3.Height = new GridLength(1, GridUnitType.Star);
upperGrid.RowDefinitions.Add(rowDef3);
var spareColumnDefinitions = upperGrid.ColumnDefinitions.Skip(1).ToList();
foreach (var spareColumnDefinition in spareColumnDefinitions)
{
upperGrid.ColumnDefinitions.Remove(spareColumnDefinition);
}
greaterThan = true;
}
private void WidthGtHeight()
{
ColumnDefinition colDef3 = new ColumnDefinition();
colDef3.Width = new GridLength(1, GridUnitType.Star);
upperGrid.ColumnDefinitions.Add(colDef3);
var spareRowDefinitions = upperGrid.RowDefinitions.Skip(1).ToList();
foreach (var spareRowDefinition in spareRowDefinitions)
{
upperGrid.RowDefinitions.Remove(spareRowDefinition);
}
greaterThan = false;
}
#endregion
#region Grid/List
bool gridMode = false;
#region To Grid
private void ChangeToGrid_ButtonUp(object sender, MouseButtonEventArgs e)
{
if (gridMode == false)
{
ShowGrid();
}
listIcon.Visibility = Visibility.Visible;
gridIcon.Visibility = Visibility.Collapsed;
gridMode = true;
}
public void ShowGrid()
{
IconGridUC.Visibility = Visibility.Visible;
IconListUC.Visibility = Visibility.Collapsed;
}
#endregion
#region To List
private void ChangeToList_ButtonUp(object sender, MouseButtonEventArgs e)
{
if (gridMode == true)
{
ShowList();
}
gridIcon.Visibility = Visibility.Visible;
listIcon.Visibility = Visibility.Collapsed;
gridMode = false;
}
public void ShowList()
{
IconListUC.Visibility = Visibility.Visible;
IconGridUC.Visibility = Visibility.Collapsed;
}
#endregion
#endregion
#region Color Mode
bool colorMode = false;
#region Dark Mode
private void ChangeToDarkMode_ButtonUp(object sender, MouseButtonEventArgs e)
{
if (colorMode == false)
{
Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
src = "ResourcesDarkMode.xaml";
System.Windows.Application.Current.Resources.MergedDictionaries.Insert(0, new ResourceDictionary { Source = new Uri(src, UriKind.Relative) });
System.Windows.Application.Current.Resources.MergedDictionaries.Remove(System.Windows.Application.Current.Resources.MergedDictionaries[1]);
}
lightModeIcon.Visibility = Visibility.Visible;
darkModeIcon.Visibility = Visibility.Collapsed;
colorMode = true;
Mouse.OverrideCursor = null;
}
#endregion
#region Light Mode
private void ChangeToLightMode_ButtonUp(object sender, MouseButtonEventArgs e)
{
if (colorMode == true)
{
Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
src = "ResourcesLightMode.xaml";
System.Windows.Application.Current.Resources.MergedDictionaries.Insert(0, new ResourceDictionary { Source = new Uri(src, UriKind.Relative) });
System.Windows.Application.Current.Resources.MergedDictionaries.Remove(System.Windows.Application.Current.Resources.MergedDictionaries[1]);
}
darkModeIcon.Visibility = Visibility.Visible;
lightModeIcon.Visibility = Visibility.Collapsed;
colorMode = false;
Mouse.OverrideCursor = null;
}
#endregion
#endregion
#region Klick Event
private void Viewer_IconSelected(object sender, RoutedEventArgs e)
{
if (!(sender is FrameworkElement frameworkElement) || !(e is RoutedEventArgsIconInfo iconEventArgs))
return;
if (iconEventArgs.IconType == enumIconTypes.intern)
{
if (Enum.TryParse(iconEventArgs.IconName, out enumInternIcons internIconType))
{
currentIconUC.currentIcon.SelectedInternIcon = internIconType;
currentNameUC.TextContent = iconEventArgs.IconName;
currentFullNameUC.TextContent = "<Icon IconType=\"intern\" Name=\"" + iconEventArgs.IconName + "\"/>";
}
}
else if (iconEventArgs.IconType == enumIconTypes.material)
{
if (Enum.TryParse(iconEventArgs.IconName, out MaterialIconType materialIconType))
{
currentIconUC.currentIcon.SelectedMaterialIcon = materialIconType;
currentNameUC.TextContent = iconEventArgs.IconName;
currentFullNameUC.TextContent = "<Icon IconType=\"material\" Name=\"" + iconEventArgs.IconName + "\"/>";
}
}
}
#endregion
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static FasdDesktopUi.Basics.UserControls.AdaptableIcon.cIconPainter;
namespace F4SDicons.Models
{
public class cAdvancedIconInformation : cIconInformation, INotifyPropertyChanged
{
private bool isVisible;
public bool IsVisible
{
get { return isVisible; }
set
{
isVisible = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsVisible)));
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace F4SDicons.Models
{
public class IconCollectionUserControl : UserControl
{
#region Events
public static readonly RoutedEvent IconSelectedEvent = EventManager.RegisterRoutedEvent("IconSelected", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(UserControl));
#endregion
}
}

View File

@@ -0,0 +1,27 @@
using F4SD_AdaptableIcon.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace F4SDicons.Models
{
public class RoutedEventArgsIconInfo : RoutedEventArgs
{
public string IconName { get; set; }
public enumIconTypes IconType { get; set; }
public RoutedEventArgsIconInfo()
{
}
public RoutedEventArgsIconInfo(RoutedEvent customEvent) : base (customEvent)
{
}
}
}

View File

@@ -0,0 +1,55 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("F4SD Icon Picker")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Consulting4IT GmbH, Germany")]
[assembly: AssemblyProduct("F4SD Icon Picker")]
[assembly: AssemblyCopyright("Copyright © 2024, Consulting4IT GmbH, Germany")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.*")]
[assembly: AssemblyFileVersion("1.1.0.0")]

View File

@@ -0,0 +1,70 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace F4SDicons.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("F4SDicons.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace F4SDicons.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -0,0 +1,52 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon">
<SolidColorBrush x:Key="colorE9E9E9" Color="#363636"/>
<SolidColorBrush x:Key="colorF7FAFA" Color="#1A1A1A"/>
<SolidColorBrush x:Key="color3D3C3C" Color="#9B9B9B"/>
<SolidColorBrush x:Key="color1F92EE" Color="#0077A8"/>
<SolidColorBrush x:Key="colorF2F2F2" Color="#272727"/>
<SolidColorBrush x:Key="color9A9B9B" Color="#5A5A5A"/>
<Color x:Key="ControlLightColor">#303030</Color>
<Color x:Key="ControlMediumColor">#303030</Color>
<Color x:Key="ControlDarkColor">#303030</Color>
<SolidColorBrush x:Key="Scrollbar.Track.Color">#575757</SolidColorBrush>
<Style TargetType="ico:AdaptableIcon" x:Key="GridIconStyle">
<Setter Property="PrimaryIconColor" Value="#9B9B9B"/>
<Setter Property="SecondaryIconColor" Value="#1A1A1A"/>
<Setter Property="IconHeight" Value="55"/>
<Setter Property="IconWidth" Value="55" />
<Setter Property="BorderPadding" Value="7.5" />
<Setter Property="IconBackgroundColor" Value="#1A1A1A"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="IconCornerRadius" Value="7.5"/>
<Setter Property="Margin" Value="5, 2.5, 0, 2.5" />
</Style>
<Style TargetType="Border" x:Key="ListBorderIconStyle">
<Setter Property="Background" Value="#1A1A1A" />
<Setter Property="CornerRadius" Value="5"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Margin" Value="10,3,10,0"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Cursor" Value="Hand"/>
<Style.Resources>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#9B9B9B"/>
</Style>
<Style TargetType="ico:AdaptableIcon">
<Setter Property="PrimaryIconColor" Value="#9B9B9B"/>
<Setter Property="SecondaryIconColor" Value="#1A1A1A"/>
</Style>
</Style.Resources>
</Style>
</ResourceDictionary>

View File

@@ -0,0 +1,52 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon">
<SolidColorBrush x:Key="colorE9E9E9" Color="#E9E9E9"/>
<SolidColorBrush x:Key="colorF7FAFA" Color="#F7FAFA"/>
<SolidColorBrush x:Key="color3D3C3C" Color="#3D3C3C"/>
<SolidColorBrush x:Key="color1F92EE" Color="#1F92EE"/>
<SolidColorBrush x:Key="colorF2F2F2" Color="#F2F2F2"/>
<SolidColorBrush x:Key="color9A9B9B" Color="#9A9B9B"/>
<Color x:Key="ControlLightColor">#DBDBDB</Color>
<Color x:Key="ControlMediumColor">#DBDBDB</Color>
<Color x:Key="ControlDarkColor">#DBDBDB</Color>
<SolidColorBrush x:Key="Scrollbar.Track.Color">#F2F2F2</SolidColorBrush>
<Style TargetType="ico:AdaptableIcon" x:Key="GridIconStyle">
<Setter Property="PrimaryIconColor" Value="#3D3C3C"/>
<Setter Property="SecondaryIconColor" Value="#F7FAFA"/>
<Setter Property="IconHeight" Value="55"/>
<Setter Property="IconWidth" Value="55" />
<Setter Property="BorderPadding" Value="7.5" />
<Setter Property="IconBackgroundColor" Value="#F7FAFA"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="IconCornerRadius" Value="7.5"/>
<Setter Property="Margin" Value="5, 2.5, 0, 2.5" />
</Style>
<Style TargetType="Border" x:Key="ListBorderIconStyle">
<Setter Property="Background" Value="#F7FAFA" />
<Setter Property="CornerRadius" Value="5"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Margin" Value="10,3,10,0"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Cursor" Value="Hand"/>
<Style.Resources>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#3D3C3C"/>
</Style>
<Style TargetType="ico:AdaptableIcon">
<Setter Property="PrimaryIconColor" Value="#3D3C3C"/>
<Setter Property="SecondaryIconColor" Value="#F7FAFA"/>
</Style>
</Style.Resources>
</Style>
</ResourceDictionary>

View File

@@ -0,0 +1,346 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Color x:Key="WindowColor">#FFE8EDF9</Color>
<Color x:Key="ContentAreaColorLight">#FFC5CBF9</Color>
<Color x:Key="ContentAreaColorDark">#FF7381F9</Color>
<Color x:Key="DisabledControlLightColor">#FFE8EDF9</Color>
<Color x:Key="DisabledControlDarkColor">#FFC5CBF9</Color>
<Color x:Key="DisabledForegroundColor">#FF888888</Color>
<Color x:Key="SelectedBackgroundColor">#FFC5CBF9</Color>
<Color x:Key="SelectedUnfocusedColor">#FFDDDDDD</Color>
<!--<Color x:Key="ControlLightColor">#DBDBDB</Color>
<Color x:Key="ControlMediumColor">#DBDBDB</Color>
<Color x:Key="ControlDarkColor">#DBDBDB</Color>-->
<Color x:Key="ControlMouseOverColor">#FF3843C4</Color>
<Color x:Key="ControlPressedColor">#FF211AA9</Color>
<Color x:Key="GlyphColor">#FF444444</Color>
<Color x:Key="GlyphMouseOver">sc#1, 0.004391443, 0.002428215, 0.242281124</Color>
<!--Border colors-->
<Color x:Key="BorderLightColor">#FFCCCCCC</Color>
<Color x:Key="BorderMediumColor">#FF888888</Color>
<Color x:Key="BorderDarkColor">#FF444444</Color>
<Color x:Key="PressedBorderLightColor">#FF888888</Color>
<Color x:Key="PressedBorderDarkColor">#FF444444</Color>
<Color x:Key="DisabledBorderLightColor">#FFAAAAAA</Color>
<Color x:Key="DisabledBorderDarkColor">#FF888888</Color>
<Color x:Key="DefaultBorderBrushDarkColor">Black</Color>
<!--Control-specific resources.-->
<Color x:Key="HeaderTopColor">#FFC5CBF9</Color>
<Color x:Key="DatagridCurrentCellBorderColor">Black</Color>
<Color x:Key="SliderTrackDarkColor">#FFC5CBF9</Color>
<Color x:Key="NavButtonFrameColor">#FF3843C4</Color>
<LinearGradientBrush x:Key="MenuPopupBrush"
EndPoint="0.5,1"
StartPoint="0.5,0">
<GradientStop Color="{DynamicResource ControlLightColor}"
Offset="0" />
<GradientStop Color="{DynamicResource ControlMediumColor}"
Offset="0.5" />
<GradientStop Color="{DynamicResource ControlLightColor}"
Offset="1" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="ProgressBarIndicatorAnimatedFill"
StartPoint="0,0"
EndPoint="1,0">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#000000FF"
Offset="0" />
<GradientStop Color="#600000FF"
Offset="0.4" />
<GradientStop Color="#600000FF"
Offset="0.6" />
<GradientStop Color="#000000FF"
Offset="1" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<Style x:Key="ScrollBarLineButton"
TargetType="{x:Type RepeatButton}">
<Setter Property="SnapsToDevicePixels"
Value="True" />
<Setter Property="OverridesDefaultStyle"
Value="true" />
<Setter Property="Focusable"
Value="false" />
</Style>
<Style x:Key="ScrollBarPageButton"
TargetType="{x:Type RepeatButton}">
<Setter Property="SnapsToDevicePixels"
Value="True" />
<Setter Property="OverridesDefaultStyle"
Value="true" />
<Setter Property="IsTabStop"
Value="false" />
<Setter Property="Focusable"
Value="false" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<Border Background="Transparent" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ScrollBarThumb"
TargetType="{x:Type Thumb}">
<Setter Property="SnapsToDevicePixels"
Value="True" />
<Setter Property="OverridesDefaultStyle"
Value="true" />
<Setter Property="IsTabStop"
Value="false" />
<Setter Property="Focusable"
Value="false" />
<Setter Property="Cursor"
Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border CornerRadius="2"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="0" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="VerticalScrollBar"
TargetType="{x:Type ScrollBar}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition MaxHeight="0.1" />
<RowDefinition Height="*" />
<RowDefinition MaxHeight="0.1" />
</Grid.RowDefinitions>
<Border Grid.RowSpan="3"
CornerRadius="2"
Background="{DynamicResource Scrollbar.Track.Color}" />
<RepeatButton Grid.Row="0"
Style="{StaticResource ScrollBarLineButton}"
Height="18"
Command="ScrollBar.LineUpCommand"
Content="M 0 4 L 8 4 L 4 0 Z" />
<Track x:Name="PART_Track"
Grid.Row="1"
IsDirectionReversed="true">
<Track.DecreaseRepeatButton>
<RepeatButton Style="{StaticResource ScrollBarPageButton}"
Command="ScrollBar.PageUpCommand" />
</Track.DecreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource ScrollBarThumb}"
Margin="1,0,1,0">
<Thumb.BorderBrush>
<LinearGradientBrush StartPoint="0,0"
EndPoint="1,0">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="{DynamicResource BorderLightColor}"
Offset="0.0" />
<GradientStop Color="{DynamicResource BorderDarkColor}"
Offset="1.0" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Thumb.BorderBrush>
<Thumb.Background>
<LinearGradientBrush StartPoint="0,0"
EndPoint="1,0">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="{DynamicResource ControlLightColor}"
Offset="0.0" />
<GradientStop Color="{DynamicResource ControlMediumColor}"
Offset="1.0" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Thumb.Background>
</Thumb>
</Track.Thumb>
<Track.IncreaseRepeatButton>
<RepeatButton Style="{StaticResource ScrollBarPageButton}"
Command="ScrollBar.PageDownCommand" />
</Track.IncreaseRepeatButton>
</Track>
<RepeatButton Grid.Row="2"
Style="{StaticResource ScrollBarLineButton}"
Height="18"
Command="ScrollBar.LineDownCommand"
Content="M 0 0 L 4 4 L 8 0 Z" />
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="HorizontalScrollBar"
TargetType="{x:Type ScrollBar}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition MaxWidth="0.1" />
<ColumnDefinition Width="*" />
<ColumnDefinition MaxWidth="0.1" />
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="3"
CornerRadius="2"
Background="{DynamicResource Scrollbar.Track.Color}" />
<RepeatButton Grid.Column="0"
Style="{StaticResource ScrollBarLineButton}"
Width="18"
Command="ScrollBar.LineLeftCommand"
Content="M 4 0 L 4 8 L 0 4 Z" />
<Track x:Name="PART_Track"
Grid.Column="1"
IsDirectionReversed="False">
<Track.DecreaseRepeatButton>
<RepeatButton Style="{StaticResource ScrollBarPageButton}"
Command="ScrollBar.PageLeftCommand" />
</Track.DecreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource ScrollBarThumb}"
Margin="0,1,0,1">
<Thumb.BorderBrush>
<LinearGradientBrush StartPoint="0,0"
EndPoint="1,0">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="{DynamicResource BorderLightColor}"
Offset="0.0" />
<GradientStop Color="{DynamicResource BorderDarkColor}"
Offset="1.0" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Thumb.BorderBrush>
<Thumb.Background>
<LinearGradientBrush StartPoint="0,0"
EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="{DynamicResource ControlLightColor}"
Offset="0.0" />
<GradientStop Color="{DynamicResource ControlMediumColor}"
Offset="1.0" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Thumb.Background>
</Thumb>
</Track.Thumb>
<Track.IncreaseRepeatButton>
<RepeatButton Style="{StaticResource ScrollBarPageButton}"
Command="ScrollBar.PageRightCommand" />
</Track.IncreaseRepeatButton>
</Track>
<RepeatButton Grid.Column="2"
Style="{StaticResource ScrollBarLineButton}"
Width="18"
Command="ScrollBar.LineRightCommand"
Content="M 0 0 L 4 4 L 0 8 Z" />
</Grid>
</ControlTemplate>
<Style x:Key="{x:Type ScrollBar}"
TargetType="{x:Type ScrollBar}">
<Setter Property="SnapsToDevicePixels"
Value="True" />
<Setter Property="OverridesDefaultStyle"
Value="true" />
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Orientation"
Value="Horizontal"/>
<Condition Property="IsMouseOver"
Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="Width"
Value="Auto" />
<Setter Property="Height"
Value="6" />
<Setter Property="Template"
Value="{StaticResource HorizontalScrollBar}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Orientation"
Value="Horizontal"/>
<Condition Property="IsMouseOver"
Value="true"/>
</MultiTrigger.Conditions>
<Setter Property="Width"
Value="Auto" />
<Setter Property="Height"
Value="10" />
<Setter Property="Margin"
Value="0 -2"/>
<Setter Property="Template"
Value="{StaticResource HorizontalScrollBar}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Orientation"
Value="Vertical"/>
<Condition Property="IsMouseOver"
Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="Width"
Value="6" />
<Setter Property="Height"
Value="Auto" />
<Setter Property="Template"
Value="{StaticResource VerticalScrollBar}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Orientation"
Value="Vertical"/>
<Condition Property="IsMouseOver"
Value="true"/>
</MultiTrigger.Conditions>
<Setter Property="Width"
Value="10" />
<Setter Property="Margin"
Value="-2 0"/>
<Setter Property="Height"
Value="Auto" />
<Setter Property="Template"
Value="{StaticResource VerticalScrollBar}" />
</MultiTrigger>
</Style.Triggers>
</Style>
</ResourceDictionary>

View File

@@ -0,0 +1,42 @@
<UserControl x:Class="F4SDicons.User_Controls.CopyTextBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:F4SDicons.User_Controls"
xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:Background="Moccasin" Name="TextUserControl">
<DockPanel>
<DockPanel.Resources>
<Style TargetType="ico:AdaptableIcon">
<Setter Property="PrimaryIconColor" Value="{DynamicResource color3D3C3C}"/>
<Setter Property="IconHeight" Value="40"/>
<Setter Property="IconWidth" Value="40"/>
<Setter Property="BorderPadding" Value="5"/>
<Setter Property="Margin" Value="10"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="PrimaryIconColor" Value="{DynamicResource color1F92EE}"/>
<Setter Property="IconBackgroundColor" Value="{DynamicResource colorF2F2F2}"/>
<Setter Property="Cursor" Value="Hand"/>
</Trigger>
</Style.Triggers>
</Style>
</DockPanel.Resources>
<ico:AdaptableIcon DockPanel.Dock="Right" x:Name="CopyBorder" MouseLeftButtonUp="currentNameButton_Click" ToolTip="{Binding ElementName=TextUserControl, Path=ToolTipText}" SelectedMaterialIcon="ic_content_copy">
</ico:AdaptableIcon>
<TextBlock Name="CopyBlock" Text="{Binding ElementName=TextUserControl, Path=TextContent}" Foreground="{DynamicResource color3D3C3C}" FontFamily="Calibri Light" TextWrapping="Wrap" Height="45" FontSize="14" Background="{DynamicResource colorF7FAFA}" Margin="10,0,0,0">
</TextBlock>
</DockPanel>
</UserControl>

View File

@@ -0,0 +1,87 @@
using FasdDesktopUi.Basics.UserControls.AdaptableIcon;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace F4SDicons.User_Controls
{
public partial class CopyTextBox : UserControl
{
public CopyTextBox()
{
InitializeComponent();
}
#region Dependency Properties
public string TextContent
{
get { return (string)GetValue(TextContentProperty); }
set { SetValue(TextContentProperty, value); }
}
// Using a DependencyProperty as the backing store for TextContent. This enables animation, styling, binding, etc...
public static readonly DependencyProperty TextContentProperty =
DependencyProperty.Register("TextContent", typeof(string), typeof(CopyTextBox), new PropertyMetadata(""));
public string ToolTipText
{
get { return (string)GetValue(ToolTipTextProperty); }
set { SetValue(ToolTipTextProperty, value); }
}
// Using a DependencyProperty as the backing store for ToolTipText. This enables animation, styling, binding, etc...
public static readonly DependencyProperty ToolTipTextProperty =
DependencyProperty.Register("ToolTipText", typeof(string), typeof(CopyTextBox), new PropertyMetadata(""));
#endregion
#region Klick Event
private void currentNameButton_Click(object sender, MouseButtonEventArgs e)
{
System.Windows.Clipboard.SetText(CopyBlock.Text);
if (!(sender is AdaptableIcon senderIcon) )
{
return;
}
Dispatcher.Invoke(async ()=>
{
var currentMaterialIcon = senderIcon.SelectedMaterialIcon;
senderIcon.SelectedMaterialIcon = null;
senderIcon.SelectedInternIcon = F4SD_AdaptableIcon.Enums.enumInternIcons.misc_check;
Color ColorGreen = (Color)ColorConverter.ConvertFromString("#75B159");
senderIcon.PrimaryIconColor = new SolidColorBrush(ColorGreen);
await Task.Delay(500);
senderIcon.SelectedInternIcon = null;
senderIcon.SelectedMaterialIcon = currentMaterialIcon;
senderIcon.ClearValue(AdaptableIcon.PrimaryIconColorProperty);
});
}
#endregion
}
}

View File

@@ -0,0 +1,35 @@
<UserControl x:Class="F4SDicons.User_Controls.IconGrid"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
xmlns:local="clr-namespace:F4SDicons.User_Controls"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibility"/>
</UserControl.Resources>
<StackPanel x:Name="GridCollection">
<ItemsControl ItemsSource="{Binding IconInformation}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<ico:AdaptableIcon x:Name="adaptableIcon" ToolTip="{Binding IconName}" Tag="{Binding IconName}" SelectedInternIcon="{Binding InternIcon}" SelectedMaterialIcon="{Binding MaterialIcon}" MouseLeftButtonUp="adaptableIcon_MouseLeftButtonUp" TouchDown="adaptableIcon_TouchDown" Visibility="{Binding IsVisible, Converter = {StaticResource BooleanToVisibility}}" Style="{DynamicResource GridIconStyle}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</UserControl>

View File

@@ -0,0 +1,103 @@
using F4SD_AdaptableIcon.Enums;
using F4SDicons.Models;
using FasdDesktopUi.Basics.UserControls.AdaptableIcon;
using MaterialIcons;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using static FasdDesktopUi.Basics.UserControls.AdaptableIcon.cIconPainter;
namespace F4SDicons.User_Controls
{
public partial class IconGrid : UserControl
{
public List<cAdvancedIconInformation> IconInformation
{
get { return (List<cAdvancedIconInformation>)GetValue(IconInformationProperty); }
set { SetValue(IconInformationProperty, value); }
}
// Using a DependencyProperty as the backing store for IconInformation. This enables animation, styling, binding, etc...
public static readonly DependencyProperty IconInformationProperty =
DependencyProperty.Register("IconInformation", typeof(List<cAdvancedIconInformation>), typeof(IconGrid), new PropertyMetadata(null));
public IconGrid()
{
InitializeComponent();
}
#region Klick Event
#region Event
public event RoutedEventHandler IconSelected
{
add { AddHandler(IconCollectionUserControl.IconSelectedEvent, value); }
remove { RemoveHandler(IconCollectionUserControl.IconSelectedEvent, value); }
}
#endregion
#region Klick
private void adaptableIcon_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
MaterialIconWasClicked(sender);
}
private void adaptableIcon_TouchDown(object sender, TouchEventArgs e)
{
MaterialIconWasClicked(sender);
}
#endregion
#region On Klick
private void MaterialIconWasClicked(object sender)
{
if (!(sender is FrameworkElement frameworkElement))
return;
enumIconTypes? iconType = null;
if (Enum.TryParse(frameworkElement.Tag.ToString(), out MaterialIconType _))
iconType = enumIconTypes.material;
else if (Enum.TryParse(frameworkElement.Tag.ToString(), out enumInternIcons _))
iconType = enumIconTypes.intern;
if (iconType is null)
return;
RoutedEventArgsIconInfo eventArgs = new RoutedEventArgsIconInfo(IconCollectionUserControl.IconSelectedEvent) { IconName = frameworkElement.Tag.ToString(), IconType = iconType.Value };
RaiseEvent(eventArgs);
}
#endregion
#endregion
}
}

View File

@@ -0,0 +1,34 @@
<UserControl x:Class="F4SDicons.User_Controls.IconList"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:F4SDicons.User_Controls"
xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibility"/>
</UserControl.Resources>
<StackPanel x:Name="collectionStackPanel">
<ItemsControl ItemsSource="{Binding IconInformation}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border x:Name="adaptableBorder" MouseLeftButtonUp="MaterialStackPanel_MouseLeftButtonUp" TouchDown="MaterialStackPanel_TouchDown" ToolTip="{Binding IconName}" Tag="{Binding IconName}" Visibility="{Binding IsVisible, Converter = {StaticResource BooleanToVisibility}}" Style="{DynamicResource ListBorderIconStyle}">
<StackPanel x:Name="adaptableStackPanel" Orientation="Horizontal">
<ico:AdaptableIcon Margin="0, 0, 10, 0" BorderPadding="2.5" IconHeight="25" IconWidth="25" SelectedInternIcon="{Binding InternIcon}" SelectedMaterialIcon="{Binding MaterialIcon}"/>
<Border x:Name="scrollBorder">
<TextBlock x:Name="adaptableBlock" FontFamily="Calibri Regular" FontSize="18" Text="{Binding IconName}"/>
</Border>
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</UserControl>

View File

@@ -0,0 +1,92 @@
using F4SD_AdaptableIcon.Enums;
using F4SDicons.Models;
using FasdDesktopUi.Basics.UserControls.AdaptableIcon;
using MaterialIcons;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using static FasdDesktopUi.Basics.UserControls.AdaptableIcon.cIconPainter;
namespace F4SDicons.User_Controls
{
public partial class IconList : UserControl
{
public List<cAdvancedIconInformation> IconInformation
{
get { return (List<cAdvancedIconInformation>)GetValue(IconInformationProperty); }
set { SetValue(IconInformationProperty, value); }
}
// Using a DependencyProperty as the backing store for IconInformation. This enables animation, styling, binding, etc...
public static readonly DependencyProperty IconInformationProperty =
DependencyProperty.Register("IconInformation", typeof(List<cAdvancedIconInformation>), typeof(IconList), new PropertyMetadata(null));
public IconList()
{
InitializeComponent();
}
#region Klick
private void MaterialStackPanel_TouchDown(object sender, TouchEventArgs e)
{
MaterialStackPanelWasClicked(sender);
}
private void MaterialStackPanel_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
MaterialStackPanelWasClicked(sender);
}
#endregion
#region Event
public event RoutedEventHandler IconSelected
{
add { AddHandler(IconCollectionUserControl.IconSelectedEvent, value); }
remove { RemoveHandler(IconCollectionUserControl.IconSelectedEvent, value); }
}
#endregion
private void MaterialStackPanelWasClicked(object sender)
{
if (!(sender is FrameworkElement frameworkElement))
return;
enumIconTypes? iconType = null;
if (Enum.TryParse(frameworkElement.Tag.ToString(), out MaterialIconType _))
iconType = enumIconTypes.material;
else if (Enum.TryParse(frameworkElement.Tag.ToString(), out enumInternIcons _))
iconType = enumIconTypes.intern;
if (iconType is null)
return;
RoutedEventArgsIconInfo eventArgs = new RoutedEventArgsIconInfo(IconCollectionUserControl.IconSelectedEvent) { IconName = frameworkElement.Tag.ToString(), IconType = iconType.Value };
RaiseEvent(eventArgs);
}
}
}

View File

@@ -0,0 +1,54 @@
<UserControl x:Class="F4SDicons.User_Controls.SearchBar"
x:Name="_this"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:F4SDicons.User_Controls"
xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
mc:Ignorable="d"
d:DesignHeight="100" d:DesignWidth="500">
<Border Grid.Row="0" Background="{DynamicResource colorF7FAFA}" CornerRadius="17.5" VerticalAlignment="Center" Margin="10,0,15,5" Height="35">
<Border.Resources>
<Style TargetType="ico:AdaptableIcon">
<Setter Property="PrimaryIconColor" Value="{DynamicResource color3D3C3C}"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="PrimaryIconColor" Value="{DynamicResource color1F92EE}"/>
</Trigger>
</Style.Triggers>
</Style>
</Border.Resources>
<Grid VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<ico:AdaptableIcon Grid.Column="1" x:Name="SearchIcon" BorderPadding="0" IconHeight="20" IconWidth="20" SelectedInternIcon="menuBar_search">
</ico:AdaptableIcon>
<TextBlock Grid.Column="2" Name="previewTextBlock" Foreground="{DynamicResource color3D3C3C}" Background="Transparent" VerticalAlignment="Center" Margin="10,0,0,0">
Suchbegriff eingeben...
</TextBlock>
<TextBox Name="bindingTextBox" Grid.Column="2" Foreground="{DynamicResource color3D3C3C}" Background="Transparent" BorderThickness="0" VerticalAlignment="Center" GotFocus="TextBoxGotFocus" LostFocus="TextBoxLostFocus" Margin="10,0,0,0"
Text = "{Binding SearchValue, Mode = OneWayToSource, UpdateSourceTrigger = PropertyChanged}" Grid.ColumnSpan="2">
</TextBox>
<ico:AdaptableIcon Grid.Column="3" x:Name="clearSearchIcon" BorderPadding="0" IconHeight="12" IconWidth="12" MouseLeftButtonUp="ClearSearchButtonUp" Cursor="Hand" ToolTip="Eingabe löschen" SelectedInternIcon="window_close">
</ico:AdaptableIcon>
</Grid>
</Border>
</UserControl>

View File

@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace F4SDicons.User_Controls
{
public partial class SearchBar : UserControl
{
public SearchBar()
{
InitializeComponent();
}
#region Default Suchtext
private void TextBoxGotFocus(object sender, EventArgs e)
{
//previewTextBlock.Text = "";
previewTextBlock.Visibility = Visibility.Hidden;
}
private void TextBoxLostFocus(object sender, EventArgs e)
{
if (bindingTextBox.Text == "")
{
//previewTextBlock.Text = "Suchbegriff eingeben...";
previewTextBlock.Visibility = Visibility.Visible;
}
}
#endregion
#region TextBox
private void ClearSearchButtonUp(object sender, MouseButtonEventArgs e)
{
bindingTextBox.Text = String.Empty;
FocusManager.SetFocusedElement(FocusManager.GetFocusScope(bindingTextBox), null);
Keyboard.ClearFocus();
TextBoxLostFocus(null, null);
}
#endregion
}
}

View File

@@ -0,0 +1,80 @@
<UserControl x:Class="F4SDicons.User_Controls.WindowStateBar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:F4SDicons.User_Controls"
xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
mc:Ignorable="d"
d:DesignHeight="60" d:DesignWidth="215"
Name="StateBar">
<!-- TODO: WindowChrome-->
<Grid Grid.Row="0" Name="StateGrid" Margin="0,10,0,0" Background="{DynamicResource colorE9E9E9}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
<Grid.Resources>
<Style TargetType="Border">
<Setter Property="Background" Value="{DynamicResource colorE9E9E9}"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="CornerRadius" Value="5"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource colorF2F2F2}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="ico:AdaptableIcon">
<Setter Property="PrimaryIconColor" Value="{DynamicResource color3D3C3C}"/>
<Setter Property="IconHeight" Value="35"/>
<Setter Property="IconWidth" Value="35"/>
<Setter Property="BorderPadding" Value="5"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="PrimaryIconColor" Value="{DynamicResource color1F92EE}"/>
<Setter Property="IconBackgroundColor" Value="{DynamicResource colorF2F2F2}"/>
<Setter Property="Cursor" Value="Hand"/>
</Trigger>
</Style.Triggers>
</Style>
</Grid.Resources>
<ico:AdaptableIcon MouseLeftButtonUp="WindowToTopLeftCorner" Grid.Column="0" ToolTip="Fenster links anheften" SelectedInternIcon="window_dock_left">
</ico:AdaptableIcon>
<ico:AdaptableIcon MouseLeftButtonUp="WindowToTopRightCorner" Grid.Column="1" ToolTip="Fenster rechts anheften" SelectedInternIcon="window_dock_right">
</ico:AdaptableIcon>
<ico:AdaptableIcon x:Name="minimizeIcon" Grid.Column="2" MouseLeftButtonUp="minimizeWindow_ButtonUp" ToolTip="Anwendung minimieren" SelectedInternIcon="window_minimize">
</ico:AdaptableIcon>
<ico:AdaptableIcon x:Name="resizeIcon" Grid.Column="3" ToolTip="Anwendung ist bereits im Fenster-Modus" PrimaryIconColor="{DynamicResource color9A9B9B}" SelectedInternIcon="window_fullscreenExit">
</ico:AdaptableIcon>
<ico:AdaptableIcon x:Name="resizeIcon2" Grid.Column="3" Visibility="Collapsed" MouseLeftButtonUp="resizeWindow2_ButtonUp" ToolTip="Fenster verkleinern" SelectedInternIcon="window_fullscreenExit">
</ico:AdaptableIcon>
<ico:AdaptableIcon x:Name="closeIcon" Grid.Column="4" MouseLeftButtonUp="closeWindow_ButtonUp" ToolTip="Anwendung beenden" SelectedInternIcon="window_close">
</ico:AdaptableIcon>
</Grid>
</UserControl>

View File

@@ -0,0 +1,166 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace F4SDicons.User_Controls
{
public partial class WindowStateBar : UserControl
{
public WindowStateBar()
{
InitializeComponent();
}
public bool isWindowRight = false;
#region DockWindow
//TopLeft Position of Screen
public static void TopLeftCorner(System.Windows.Window window)
{
var screen = System.Windows.Forms.Screen.FromPoint(new System.Drawing.Point((int)window.Left, (int)window.Top));
window.Top = screen.WorkingArea.Top;
window.Left = screen.WorkingArea.Left;
}
//TopRight Position of Screen
public static void TopRightCorner(System.Windows.Window window)
{
var screen = System.Windows.Forms.Screen.FromPoint(new System.Drawing.Point((int)window.Left, (int)window.Top));
window.Top = screen.WorkingArea.Top;
window.Left = screen.WorkingArea.Left + window.ActualWidth + window.ActualWidth;
}
public static void TopRightCorner2(System.Windows.Window window)
{
var screen = System.Windows.Forms.Screen.FromPoint(new System.Drawing.Point((int)window.Left, (int)window.Top));
window.Top = screen.WorkingArea.Top;
window.Left = screen.WorkingArea.Right - window.ActualWidth;
}
private void WindowToTopLeftCorner(object sender, MouseButtonEventArgs e)
{
resizeWindow();
TopLeftCorner(Window.GetWindow(this));
isWindowRight = false;
}
private void WindowToTopRightCorner(object sender, MouseButtonEventArgs e)
{
resizeWindow();
TopLeftCorner(Window.GetWindow(this));
isWindowRight = false;
TopRightCorner(Window.GetWindow(this));
isWindowRight = true;
}
#endregion
#region Minimize
//Minimize Window
private void minimizeWindow_ButtonUp(object sender, MouseButtonEventArgs e)
{
Window.GetWindow(this).WindowState = WindowState.Minimized;
}
#endregion
#region Resize
//Resize Window
private void resizeWindow2_ButtonUp(object sender, MouseButtonEventArgs e)
{
resizeWindow2();
if (isWindowRight == false)
{
TopLeftCorner(Window.GetWindow(this));
}
else
{
TopRightCorner2(Window.GetWindow(this));
}
resizeIcon.Visibility = Visibility.Visible;
resizeIcon2.Visibility = Visibility.Collapsed;
}
private void resizeWindow()
{
Rect rectangle = GetCurrentScreenWorkArea(Window.GetWindow(this));
double wHeight = rectangle.Height;
double wWidth = rectangle.Width;
wWidth = wWidth / 3;
Window.GetWindow(this).Height = wHeight;
Window.GetWindow(this).Width = wWidth;
resizeIcon2.Visibility = Visibility.Visible;
resizeIcon.Visibility = Visibility.Collapsed;
}
private void resizeWindow2()
{
Window.GetWindow(this).Height = 600;
Window.GetWindow(this).Width = 880;
}
#endregion
#region Display
public static Rect GetCurrentScreenWorkArea(System.Windows.Window window)
{
var screen = System.Windows.Forms.Screen.FromPoint(new System.Drawing.Point((int)window.Left, (int)window.Top));
var dpiScale = VisualTreeHelper.GetDpi(window);
return new Rect { Width = screen.WorkingArea.Width / dpiScale.DpiScaleX, Height = screen.WorkingArea.Height / dpiScale.DpiScaleY };
}
#endregion
#region Close Window
private void closeWindow_ButtonUp(object sender, MouseButtonEventArgs e)
{
Window.GetWindow(this).Close();
}
#endregion
#region Drag Move
private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Window.GetWindow(this).DragMove();
}
#endregion
}
}

View File

@@ -0,0 +1,29 @@
<UserControl x:Class="F4SDicons.User_Controls.ZoomViewer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:F4SDicons.User_Controls"
xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="450">
<Grid Name="currentIconGrid" Background="{DynamicResource colorE9E9E9}">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<ico:AdaptableIcon Grid.Row="0" x:Name="currentIcon" PrimaryIconColor="{DynamicResource color3D3C3C}" SecondaryIconColor="{DynamicResource colorF7FAFA}" IconHeight="100" IconWidth="100" Grid.RowSpan="2" RenderTransformOrigin="0.5, 0.5" VerticalAlignment="Center" HorizontalAlignment="Center">
<ico:AdaptableIcon.RenderTransform>
<RotateTransform/>
</ico:AdaptableIcon.RenderTransform>
</ico:AdaptableIcon>
<Slider Name="ZoomSlider" Grid.Row="1" Width="250" Minimum="50" Maximum="200" PreviewMouseLeftButtonUp="ZoomSlider_ButtonUp" PreviewMouseLeftButtonDown="ZoomSlider_ButtonUp" ValueChanged="Slider_ValueChanged" Value="100">
</Slider>
</Grid>
</UserControl>

View File

@@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace F4SDicons.User_Controls
{
public partial class ZoomViewer : UserControl
{
public ZoomViewer()
{
InitializeComponent();
}
#region Variables
bool zoomReachedMinimum = false;
#endregion
#region Value
private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
double iconZoom = e.NewValue / 100;
currentIcon.IconHeight = 100 * iconZoom;
currentIcon.IconWidth = 100 * iconZoom;
if (iconZoom == 0.5)
{
zoomReachedMinimum = true;
}
if (zoomReachedMinimum == true && iconZoom == 2.0)
{
RotateEasterEgg();
zoomReachedMinimum = false;
}
}
#endregion
#region RotateIcon
private void RotateEasterEgg()
{
Storyboard storyboard = new Storyboard();
DoubleAnimation animation = new DoubleAnimation();
animation.From = 0;
animation.To = 360;
animation.Duration = new Duration(TimeSpan.FromSeconds(1));
storyboard.Children.Add(animation);
Storyboard.SetTarget(animation, currentIcon);
Storyboard.SetTargetProperty(animation, new PropertyPath("(Control.RenderTransform).(RotateTransform.Angle)"));
storyboard.Begin();
}
internal void ZoomSlider_ButtonUp(object sender, MouseButtonEventArgs e)
{
zoomReachedMinimum = false;
}
#endregion
}
}