Skip to content

Commit

Permalink
Merge pull request #33 from Krypton-Suite/alpha-265-ColorDialog
Browse files Browse the repository at this point in the history
- Add the KryptonColorDialog example
  • Loading branch information
Wagnerp committed Aug 14, 2021
2 parents 477e2ac + 6e5db40 commit 03eaef8
Show file tree
Hide file tree
Showing 43 changed files with 3,900 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KryptonListView Examples 20
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KryptonFontDialog Example 2019", "KryptonFontDialog Example\KryptonFontDialog Example 2019.csproj", "{BD46345C-333F-4DA6-8145-274883F5388A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KryptonColorDialog Example 2019", "KryptonColorDialog Example\KryptonColorDialog Example 2019.csproj", "{8A3E3D87-FD92-4CD4-9C22-1E61057BEBA8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KryptonFileDialog Example 2019", "KryptonFileDialog Example\KryptonFileDialog Example 2019.csproj", "{36981AB6-41A4-494B-AB7C-DF01030DC292}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KryptonFolderBrowserDialog Example 2019", "KryptonFolderBrowserDialog Example\KryptonFolderBrowserDialog Example 2019.csproj", "{2B590E4B-25D2-4AE9-B5A5-F198E5C6AACD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KryptonPageSetupDialog Example 2019", "KryptonPageSetupDialog Example\KryptonPageSetupDialog Example 2019.csproj", "{DE60E7E3-B86C-47CA-BA45-11386BC6FFC0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KryptonPrintDialog Example 2019", "KryptonPrintDialog Example\KryptonPrintDialog Example 2019.csproj", "{27C591CF-E471-4170-B65B-8C2E985ECACC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -369,6 +379,26 @@ Global
{BD46345C-333F-4DA6-8145-274883F5388A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD46345C-333F-4DA6-8145-274883F5388A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD46345C-333F-4DA6-8145-274883F5388A}.Release|Any CPU.Build.0 = Release|Any CPU
{8A3E3D87-FD92-4CD4-9C22-1E61057BEBA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A3E3D87-FD92-4CD4-9C22-1E61057BEBA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A3E3D87-FD92-4CD4-9C22-1E61057BEBA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A3E3D87-FD92-4CD4-9C22-1E61057BEBA8}.Release|Any CPU.Build.0 = Release|Any CPU
{36981AB6-41A4-494B-AB7C-DF01030DC292}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36981AB6-41A4-494B-AB7C-DF01030DC292}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36981AB6-41A4-494B-AB7C-DF01030DC292}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36981AB6-41A4-494B-AB7C-DF01030DC292}.Release|Any CPU.Build.0 = Release|Any CPU
{2B590E4B-25D2-4AE9-B5A5-F198E5C6AACD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B590E4B-25D2-4AE9-B5A5-F198E5C6AACD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B590E4B-25D2-4AE9-B5A5-F198E5C6AACD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B590E4B-25D2-4AE9-B5A5-F198E5C6AACD}.Release|Any CPU.Build.0 = Release|Any CPU
{DE60E7E3-B86C-47CA-BA45-11386BC6FFC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE60E7E3-B86C-47CA-BA45-11386BC6FFC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE60E7E3-B86C-47CA-BA45-11386BC6FFC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE60E7E3-B86C-47CA-BA45-11386BC6FFC0}.Release|Any CPU.Build.0 = Release|Any CPU
{27C591CF-E471-4170-B65B-8C2E985ECACC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27C591CF-E471-4170-B65B-8C2E985ECACC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27C591CF-E471-4170-B65B-8C2E985ECACC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27C591CF-E471-4170-B65B-8C2E985ECACC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using System;
using System.Windows.Forms;

using Krypton.Toolkit;

namespace KryptonFontDialog_Example_2019
{
public partial class Form1 : KryptonForm
{
public Form1()
{
InitializeComponent();
}

private void Palette2010Blue_CheckedChanged(object sender, EventArgs e)
{
KryptonManager.GlobalPaletteMode = PaletteModeManager.Office2010Blue;
}

private void Palette2010Silver_CheckedChanged(object sender, EventArgs e)
{
KryptonManager.GlobalPaletteMode = PaletteModeManager.Office2010Silver;
}

private void Palette2010Black_CheckedChanged(object sender, EventArgs e)
{
KryptonManager.GlobalPaletteMode = PaletteModeManager.Office2010Black;
}

private void Palette2007Blue_CheckedChanged(object sender, EventArgs e)
{
KryptonManager.GlobalPaletteMode = PaletteModeManager.Office2007Blue;
}

private void PaletteSparkleOrange_CheckedChanged(object sender, EventArgs e)
{
KryptonManager.GlobalPaletteMode = PaletteModeManager.SparkleOrange;
}

private void PaletteProfessional_CheckedChanged(object sender, EventArgs e)
{
KryptonManager.GlobalPaletteMode = PaletteModeManager.ProfessionalSystem;
}

private void ButtonShowFontDialog_Click(object sender, EventArgs e)
{
var kfd = new KryptonColorDialog {
AllowFullOpen = chkAllowFullOpen.Checked,
ShowHelp = chkShowHelp.Checked,
AnyColor = chkAnyColor.Checked,
FullOpen = chkFullOPen.Checked,
SolidColorOnly = chkSolidColorOnly.Checked,
};
if (kfd.ShowDialog(this) == DialogResult.OK)
{
KryptonMessageBox.Show(this, kfd.Color.ToString(), @"Color chosen is");
}
}
}
}
120 changes: 120 additions & 0 deletions Source/Krypton Toolkit Examples/KryptonColorDialog Example/Form1.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<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" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net48;net5.0-windows</TargetFrameworks>
<OutputType>WinExe</OutputType>
<RootNamespace>KryptonColorDialog</RootNamespace>
<AssemblyName>KryptonColorDialog Example</AssemblyName>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
<Choose>
<When Condition="'$(SolutionName.Endswith(`Nuget`))'">
<ItemGroup>
<PackageReference Include="Krypton.Toolkit.Canary.Lite" Version="6.0.2106" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Standard-Toolkit\Source\Krypton Components\Krypton.Toolkit\Krypton.Toolkit 2019.csproj" />
</ItemGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<OutputPath>..\..\..\Binaries\Krypton Demos\$(Configuration)\</OutputPath>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Windows.Forms;

namespace KryptonFontDialog_Example_2019
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->

<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->

<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />

<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />

<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />

<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />

</application>
</compatibility>

<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config.
Makes the application long-path aware. See https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>


<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>

</assembly>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 03eaef8

Please sign in to comment.