Skip to content

Commit

Permalink
- Add in new KryptonMessageBoxButtons type that emualtes the .net6 …
Browse files Browse the repository at this point in the history
…`MessageBoxButtons`

- Fix fallout for the new dialogResult type
- Fix Help button not being shown
- Add missing `private` monikers
- Fix usage of controls in the KryptonMessageBox demo
- Remove some usages of .net 5
- Remove some compile warnings / messages from Example projects

#Krypton-Suite/Standard-Toolkit#867
#Krypton-Suite/Standard-Toolkit#728)
  • Loading branch information
Smurf-IV committed Dec 11, 2022
1 parent 942797a commit 022b43f
Show file tree
Hide file tree
Showing 84 changed files with 347 additions and 519 deletions.
Expand Up @@ -15,13 +15,13 @@

namespace ButtonSpecPlayground
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace ChildControlStack
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace CustomControlUsingPalettes
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace CustomControlUsingRenderers
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace ExpandingHeaderGroupsDockStyle
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace ExpandingHeaderGroupsSplitters
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace ExpandingHeaderGroupsStack
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
4 changes: 2 additions & 2 deletions Source/Krypton Toolkit Examples/Input Form/Program.cs
Expand Up @@ -15,13 +15,13 @@

namespace InputForm
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
4 changes: 2 additions & 2 deletions Source/Krypton Toolkit Examples/Krypton Scrollbars/Program.cs
Expand Up @@ -3,13 +3,13 @@

namespace KryptonScrollBars
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -13,9 +13,6 @@ private void Form1_Load(object sender, EventArgs e)

}

private void kryptonCheckedListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
kpg.SelectedObject = kryptonCheckedListBox1;
}
private void kryptonCheckedListBox1_SelectedIndexChanged(object sender, EventArgs e) => kpg.SelectedObject = kryptonCheckedListBox1;
}
}
Expand Up @@ -3,13 +3,13 @@

namespace KryptonThemePlayground
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -4,9 +4,6 @@ namespace KryptonThemeSelector
{
public partial class Form1 : KryptonForm
{
public Form1()
{
InitializeComponent();
}
public Form1() => InitializeComponent();
}
}
Expand Up @@ -9,7 +9,7 @@ internal static class Program
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 4 additions & 14 deletions Source/Krypton Toolkit Examples/Krypton UAC Button/Form1.cs
@@ -1,5 +1,4 @@
using System;
using System.Windows.Forms;

using Krypton.Toolkit;

Expand All @@ -9,19 +8,10 @@ public partial class Form1 : KryptonForm
{
public Form1() => InitializeComponent();

private void Form1_Load(object sender, EventArgs e)
{
private void kchkShowUACShield_CheckedChanged(object sender, EventArgs e) => kbtnTest.UseAsUACElevationButton = kchkShowUACShield.Checked;

}

private void kchkShowUACShield_CheckedChanged(object sender, EventArgs e)
{
kbtnTest.UseAsUACElevationButton = kchkShowUACShield.Checked;
}

private void kbtnTest_Click(object sender, EventArgs e)
{
KryptonMessageBox.Show("UAC elevation requires developer input.", "UAC Button Example", MessageBoxButtons.OK, KryptonMessageBoxIcon.Shield);
}
private void kbtnTest_Click(object sender, EventArgs e) =>
KryptonMessageBox.Show("UAC elevation requires developer input.", "UAC Button Example",
KryptonMessageBoxButtons.OK, KryptonMessageBoxIcon.Shield);
}
}
4 changes: 2 additions & 2 deletions Source/Krypton Toolkit Examples/Krypton UAC Button/Program.cs
Expand Up @@ -3,13 +3,13 @@

namespace KryptonUACButton
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace KryptonBorderEdgeExamples
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace KryptonBreadCrumbExamples
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!--<TargetFrameworks>net48;net6.0-windows;net7.0-windows</TargetFrameworks>-->
<TargetFrameworks>net5.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0-windows</TargetFrameworks>
<OutputType>WinExe</OutputType>
<RootNamespace>KryptonButtonExamples</RootNamespace>
<AssemblyName>Krypton Button Examples</AssemblyName>
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace KryptonButtonExamples
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace KryptonCheckBoxExamples
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace KryptonCheckButtonExamples
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace KryptonCheckSetExamples
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace KryptonCheckedListBoxExamples
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
Expand Up @@ -38,7 +38,7 @@ private void KryptonColorButton5_Click(object sender, EventArgs e)
if (KryptonMessageBox.Show(this,
@"Do you want to perform the normal colourButtonAction ?",
@"Launch what you want",
MessageBoxButtons.YesNo, KryptonMessageBoxIcon.Question) == DialogResult.Yes)
KryptonMessageBoxButtons.YesNo, KryptonMessageBoxIcon.Question) == DialogResult.Yes)
{
kryptonColorButton5.PerformDropDown();
}
Expand Down
Expand Up @@ -15,13 +15,13 @@

namespace KryptonColorButtonExamples
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down

0 comments on commit 022b43f

Please sign in to comment.