Zusätzliche Optionen
- Fenstergröße kann bei allen Aufrufoptionen definiert werden.
This commit is contained in:
parent
7b78220c48
commit
95482df36c
@ -123,7 +123,6 @@ namespace Eugen.ESystem.Windows.Forms
|
||||
/// <param name="programName">A valid Program name.</param>
|
||||
/// <param name="programVersion">A valid version number.</param>
|
||||
/// <param name="programCopyright">The copyrigth Information</param>
|
||||
/// <param name="showDllInfoButton">true = Button is displayed; false = Button is not displayed.</param>
|
||||
public AboutBox(string programName, string programVersion, string programCopyright)
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -131,6 +130,24 @@ namespace Eugen.ESystem.Windows.Forms
|
||||
SetContent(programName, programVersion, programCopyright); //Fensterinhalt setzen
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Displays a Program Information Box
|
||||
/// </summary>
|
||||
/// <param name="programName">A valid Program name.</param>
|
||||
/// <param name="programVersion">A valid version number.</param>
|
||||
/// <param name="programCopyright">The copyrigth Information</param>
|
||||
/// <param name="width">Window with: Min. 500, Max. 800.</param>
|
||||
/// <param name="hight">Window hight: Min. 400, Max. 600.</param>
|
||||
public AboutBox(string programName, string programVersion, string programCopyright, int width, int hight)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
//Fenstergröße einstellen
|
||||
SetWindow(width, hight);
|
||||
|
||||
SetContent(programName, programVersion, programCopyright); //Fensterinhalt setzen
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Displays a Program Information Box
|
||||
/// </summary>
|
||||
@ -156,6 +173,36 @@ namespace Eugen.ESystem.Windows.Forms
|
||||
SetContent(programName, programVersion, programCopyright); //Fensterinhalt setzen
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Displays a Program Information Box
|
||||
/// </summary>
|
||||
/// <param name="programName">A valid Program name.</param>
|
||||
/// <param name="programVersion">A valid version number.</param>
|
||||
/// <param name="programCopyright">The copyrigth Information</param>
|
||||
/// <param name="showDllInfoButton">true = Button is displayed; false = Button is not displayed.</param>
|
||||
/// <param name="width">Window with: Min. 500, Max. 800.</param>
|
||||
/// <param name="hight">Window hight: Min. 400, Max. 600.</param>
|
||||
public AboutBox(string programName, string programVersion, string programCopyright, bool showDllInfoButton, int width, int hight)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
//Fenstergröße einstellen
|
||||
SetWindow(width, hight);
|
||||
|
||||
if (showDllInfoButton)
|
||||
{
|
||||
buttonDllInfo.Enabled = true;
|
||||
buttonDllInfo.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
buttonDllInfo.Enabled = false;
|
||||
buttonDllInfo.Visible = false;
|
||||
}
|
||||
|
||||
SetContent(programName, programVersion, programCopyright); //Fensterinhalt setzen
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Displays a Program Information Box
|
||||
/// </summary>
|
||||
@ -199,27 +246,7 @@ namespace Eugen.ESystem.Windows.Forms
|
||||
InitializeComponent();
|
||||
|
||||
//Fenstergröße einstellen
|
||||
if (width < 500)
|
||||
{
|
||||
width = 500;
|
||||
}
|
||||
if (width > 800)
|
||||
{
|
||||
width = 800;
|
||||
}
|
||||
|
||||
if (hight < 400)
|
||||
{
|
||||
hight = 400;
|
||||
}
|
||||
if (hight > 600)
|
||||
{
|
||||
hight = 600;
|
||||
}
|
||||
|
||||
this.Size = new Size(width, hight);
|
||||
this.MaximumSize = new Size(width, hight);
|
||||
this.MinimumSize = new Size(width, hight);
|
||||
SetWindow(width, hight);
|
||||
|
||||
pictureBox.Image = Bitmap.FromHicon(new Icon(icon, new Size(32, 32)).Handle);
|
||||
|
||||
@ -410,5 +437,32 @@ namespace Eugen.ESystem.Windows.Forms
|
||||
|
||||
return dllInfos.Remove(dllInfos.LastIndexOf("\r\n\r\n"));
|
||||
}
|
||||
|
||||
private void SetWindow(int width, int hight)
|
||||
{
|
||||
//Maximalabmaße prüfen
|
||||
if (width < 500)
|
||||
{
|
||||
width = 500;
|
||||
}
|
||||
if (width > 800)
|
||||
{
|
||||
width = 800;
|
||||
}
|
||||
|
||||
if (hight < 400)
|
||||
{
|
||||
hight = 400;
|
||||
}
|
||||
if (hight > 600)
|
||||
{
|
||||
hight = 600;
|
||||
}
|
||||
|
||||
//Fenster setzen
|
||||
this.Size = new Size(width, hight);
|
||||
this.MaximumSize = new Size(width, hight);
|
||||
this.MinimumSize = new Size(width, hight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user