Projekt neu angelegt.
32
.gitignore
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
#Ignore thumbnails created by Windows
|
||||||
|
Thumbs.db
|
||||||
|
#Ignore files built by Visual Studio
|
||||||
|
*.obj
|
||||||
|
*.exe
|
||||||
|
*.pdb
|
||||||
|
*.user
|
||||||
|
*.aps
|
||||||
|
*.pch
|
||||||
|
*.vspscc
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*.ncb
|
||||||
|
*.suo
|
||||||
|
*.tlb
|
||||||
|
*.tlh
|
||||||
|
*.bak
|
||||||
|
*.cache
|
||||||
|
*.ilk
|
||||||
|
*.log
|
||||||
|
[Bb]in
|
||||||
|
[Dd]ebug*/
|
||||||
|
*.lib
|
||||||
|
*.sbr
|
||||||
|
obj/
|
||||||
|
[Rr]elease*/
|
||||||
|
_ReSharper*/
|
||||||
|
[Tt]est[Rr]esult*
|
||||||
|
.vs/
|
||||||
|
#Nuget packages folder
|
||||||
|
packages/
|
||||||
BIN
Daten/Construction.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
Daten/Email.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
Daten/Error.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
Daten/FatalError.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
Daten/Information.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
Daten/Instruction.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
Daten/Question.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
Daten/Telephone.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
Daten/Tips.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
Daten/Warning.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
31
OwnMessageBox.sln
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.28307.136
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OwnMessageBox", "OwnMessageBox\OwnMessageBox.csproj", "{F421906F-D2C3-4AD2-9C1F-17150AC80E17}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_OwnMessageBox", "Test_OwnMessageBox\Test_OwnMessageBox\Test_OwnMessageBox.csproj", "{283AB9AE-B155-4143-8661-8F53021AF906}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{F421906F-D2C3-4AD2-9C1F-17150AC80E17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{F421906F-D2C3-4AD2-9C1F-17150AC80E17}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{F421906F-D2C3-4AD2-9C1F-17150AC80E17}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{F421906F-D2C3-4AD2-9C1F-17150AC80E17}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{283AB9AE-B155-4143-8661-8F53021AF906}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{283AB9AE-B155-4143-8661-8F53021AF906}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{283AB9AE-B155-4143-8661-8F53021AF906}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{283AB9AE-B155-4143-8661-8F53021AF906}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {4914E6F3-31D2-44BC-99DA-6B95E968B932}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
6
OwnMessageBox/App.config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
100
OwnMessageBox/Icons.cs
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EOwnMessageBox
|
||||||
|
{
|
||||||
|
public class Icons
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Control the possible icons.
|
||||||
|
/// </summary>
|
||||||
|
public Icons()
|
||||||
|
{
|
||||||
|
SetIcon(Icon.Information); //Initialisiere ein Icon
|
||||||
|
}
|
||||||
|
|
||||||
|
//Die vorhandenen Icons
|
||||||
|
public enum Icon
|
||||||
|
{
|
||||||
|
Construction,
|
||||||
|
Email,
|
||||||
|
Error,
|
||||||
|
FatalError,
|
||||||
|
Information,
|
||||||
|
Instruction,
|
||||||
|
NoIcon,
|
||||||
|
Question,
|
||||||
|
Telephon,
|
||||||
|
Tips,
|
||||||
|
Warning
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the current icon.
|
||||||
|
/// </summary>
|
||||||
|
public Icon CurrentIcon { private set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the current icon image.
|
||||||
|
/// </summary>
|
||||||
|
public Bitmap CurrentIconImage { private set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the used icon.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="icon">A valid icon. Possible options are: 'Construction', 'Email', 'Error', 'FatalError', 'Information', 'Instruction', 'Question', 'Telephone', 'Tips', 'Warning'.</param>
|
||||||
|
/// <returns>Returns the image name.</returns>
|
||||||
|
public Bitmap SetIcon(Icon icon)
|
||||||
|
{
|
||||||
|
switch (icon)
|
||||||
|
{
|
||||||
|
case Icon.Construction:
|
||||||
|
CurrentIconImage = GetIconImage("Test_Form.Resources.Construction.png");
|
||||||
|
break;
|
||||||
|
case Icon.Email:
|
||||||
|
CurrentIconImage = GetIconImage("Test_Form.Resources.Email.png");
|
||||||
|
break;
|
||||||
|
case Icon.Error:
|
||||||
|
CurrentIconImage = GetIconImage("Test_Form.Resources.Error.png");
|
||||||
|
break;
|
||||||
|
case Icon.FatalError:
|
||||||
|
CurrentIconImage = GetIconImage("Test_Form.Resources.FatalError.png");
|
||||||
|
break;
|
||||||
|
case Icon.Instruction:
|
||||||
|
CurrentIconImage = GetIconImage("Test_Form.Resources.Instruction.png");
|
||||||
|
break;
|
||||||
|
case Icon.Question:
|
||||||
|
CurrentIconImage = GetIconImage("Test_Form.Resources.Question.png");
|
||||||
|
break;
|
||||||
|
case Icon.Telephon:
|
||||||
|
CurrentIconImage = GetIconImage("Test_Form.Resources.Telephon.png");
|
||||||
|
break;
|
||||||
|
case Icon.Tips:
|
||||||
|
CurrentIconImage = GetIconImage("Test_Form.Resources.Tips.png");
|
||||||
|
break;
|
||||||
|
case Icon.Warning:
|
||||||
|
CurrentIconImage = GetIconImage("Test_Form.Resources.Warning.png");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
CurrentIconImage = GetIconImage("Test_Form.Resources.Information.png");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
CurrentIcon = icon;
|
||||||
|
return CurrentIconImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Bitmap GetIconImage(string icon)
|
||||||
|
{
|
||||||
|
Assembly myAssembly = Assembly.GetExecutingAssembly();
|
||||||
|
Stream myStream = myAssembly.GetManifestResourceStream(icon);
|
||||||
|
Bitmap bmp = new Bitmap(myStream);
|
||||||
|
return bmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
OwnMessageBox/OwnMessageBox.Designer.cs
generated
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
namespace EOwnMessageBox
|
||||||
|
{
|
||||||
|
partial class OwnMessageBox
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Designervariable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verwendete Ressourcen bereinigen.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Vom Windows Form-Designer generierter Code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Methode für die Designerunterstützung.
|
||||||
|
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.buttonLeft = new System.Windows.Forms.Button();
|
||||||
|
this.buttonCenter = new System.Windows.Forms.Button();
|
||||||
|
this.buttonRight = new System.Windows.Forms.Button();
|
||||||
|
this.labelText = new System.Windows.Forms.Label();
|
||||||
|
this.pictureBoxIcon = new System.Windows.Forms.PictureBox();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxIcon)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// buttonLeft
|
||||||
|
//
|
||||||
|
this.buttonLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.buttonLeft.Location = new System.Drawing.Point(13, 415);
|
||||||
|
this.buttonLeft.Name = "buttonLeft";
|
||||||
|
this.buttonLeft.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.buttonLeft.TabIndex = 0;
|
||||||
|
this.buttonLeft.Text = "Left";
|
||||||
|
this.buttonLeft.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonLeft.Click += new System.EventHandler(this.buttonLeft_Click);
|
||||||
|
//
|
||||||
|
// buttonCenter
|
||||||
|
//
|
||||||
|
this.buttonCenter.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||||
|
this.buttonCenter.Location = new System.Drawing.Point(363, 415);
|
||||||
|
this.buttonCenter.Name = "buttonCenter";
|
||||||
|
this.buttonCenter.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.buttonCenter.TabIndex = 1;
|
||||||
|
this.buttonCenter.Text = "Center";
|
||||||
|
this.buttonCenter.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonCenter.Click += new System.EventHandler(this.buttonCenter_Click);
|
||||||
|
//
|
||||||
|
// buttonRight
|
||||||
|
//
|
||||||
|
this.buttonRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.buttonRight.Location = new System.Drawing.Point(713, 415);
|
||||||
|
this.buttonRight.Name = "buttonRight";
|
||||||
|
this.buttonRight.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.buttonRight.TabIndex = 2;
|
||||||
|
this.buttonRight.Text = "Right";
|
||||||
|
this.buttonRight.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonRight.Click += new System.EventHandler(this.buttonRight_Click);
|
||||||
|
//
|
||||||
|
// labelText
|
||||||
|
//
|
||||||
|
this.labelText.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.labelText.Location = new System.Drawing.Point(13, 13);
|
||||||
|
this.labelText.Name = "labelText";
|
||||||
|
this.labelText.Size = new System.Drawing.Size(775, 399);
|
||||||
|
this.labelText.TabIndex = 3;
|
||||||
|
this.labelText.Text = "...";
|
||||||
|
//
|
||||||
|
// pictureBoxIcon
|
||||||
|
//
|
||||||
|
this.pictureBoxIcon.BackgroundImage = global::OwnMessageBox.Properties.Resources.Information;
|
||||||
|
this.pictureBoxIcon.Enabled = false;
|
||||||
|
this.pictureBoxIcon.Location = new System.Drawing.Point(12, 12);
|
||||||
|
this.pictureBoxIcon.Name = "pictureBoxIcon";
|
||||||
|
this.pictureBoxIcon.Size = new System.Drawing.Size(32, 32);
|
||||||
|
this.pictureBoxIcon.TabIndex = 4;
|
||||||
|
this.pictureBoxIcon.TabStop = false;
|
||||||
|
this.pictureBoxIcon.Visible = false;
|
||||||
|
//
|
||||||
|
// OwnMessageBox
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||||
|
this.Controls.Add(this.pictureBoxIcon);
|
||||||
|
this.Controls.Add(this.labelText);
|
||||||
|
this.Controls.Add(this.buttonRight);
|
||||||
|
this.Controls.Add(this.buttonCenter);
|
||||||
|
this.Controls.Add(this.buttonLeft);
|
||||||
|
this.Name = "OwnMessageBox";
|
||||||
|
this.Text = "OwnMessageBox";
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxIcon)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button buttonLeft;
|
||||||
|
private System.Windows.Forms.Button buttonCenter;
|
||||||
|
private System.Windows.Forms.Button buttonRight;
|
||||||
|
private System.Windows.Forms.Label labelText;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBoxIcon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
437
OwnMessageBox/OwnMessageBox.cs
Normal file
@ -0,0 +1,437 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace EOwnMessageBox
|
||||||
|
{
|
||||||
|
public partial class OwnMessageBox : Form
|
||||||
|
{
|
||||||
|
#region Version und Copyright
|
||||||
|
// Version und Copyright
|
||||||
|
string programName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen
|
||||||
|
string programVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||||
|
static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
||||||
|
string copyright = ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
||||||
|
string icon = Application.StartupPath + "\\Info.bmp";
|
||||||
|
//Assembly Datum und Zeit
|
||||||
|
static DateTime value = AssemblyDateTime();
|
||||||
|
string date = value.ToShortDateString();
|
||||||
|
string time = value.ToLongTimeString();
|
||||||
|
private static DateTime AssemblyDateTime()
|
||||||
|
{
|
||||||
|
var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
|
var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision));
|
||||||
|
//Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original)
|
||||||
|
return buildDateTime;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Programm-Info
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the name of the program file
|
||||||
|
/// </summary>
|
||||||
|
public static string ProgramName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the version of the program file
|
||||||
|
/// </summary>
|
||||||
|
public static string ProgramVersion { set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the copyright notice
|
||||||
|
/// </summary>
|
||||||
|
public static string Copyright { set; get; }
|
||||||
|
|
||||||
|
private void SetProgramInfo()
|
||||||
|
{
|
||||||
|
//Name, Version und Copyright setzen
|
||||||
|
ProgramName = programName;
|
||||||
|
ProgramVersion = programVersion;
|
||||||
|
Copyright = copyright;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set or Get the pressed button text
|
||||||
|
/// </summary>
|
||||||
|
public string Result { set; get; }
|
||||||
|
|
||||||
|
public OwnMessageBox()
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = "";
|
||||||
|
HideButton("Left");
|
||||||
|
HideButton("Center");
|
||||||
|
HideButton("Right");
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, string lblText)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
this.labelText.Text = lblText;
|
||||||
|
HideButton("Left");
|
||||||
|
HideButton("Center");
|
||||||
|
HideButton("Right");
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, string lblText, string btnCenter)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
this.labelText.Text = lblText;
|
||||||
|
HideButton("Left");
|
||||||
|
this.buttonCenter.Text = btnCenter;
|
||||||
|
HideButton("Right");
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, string lblText, string btnLeft, string btnRight)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
this.labelText.Text = lblText;
|
||||||
|
this.buttonLeft.Text = btnLeft;
|
||||||
|
HideButton("Center");
|
||||||
|
this.buttonRight.Text = btnRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, string lblText, string btnLeft, string btnCenter, string btnRight)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
this.labelText.Text = lblText;
|
||||||
|
this.buttonLeft.Text = btnLeft;
|
||||||
|
this.buttonCenter.Text = btnCenter;
|
||||||
|
this.buttonRight.Text = btnRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, Window.ControlBox ctrlBox, string lblText, string btnCenter)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
if (ctrlBox == Window.ControlBox.Off)
|
||||||
|
{
|
||||||
|
this.ControlBox = false;
|
||||||
|
}
|
||||||
|
HideButton("Left");
|
||||||
|
this.buttonCenter.Text = btnCenter;
|
||||||
|
HideButton("Right");
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, Window.ControlBox ctrlBox, string lblText, string btnLeft, string btnRight)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
if (ctrlBox == Window.ControlBox.Off)
|
||||||
|
{
|
||||||
|
this.ControlBox = false;
|
||||||
|
}
|
||||||
|
this.labelText.Text = lblText;
|
||||||
|
this.buttonLeft.Text = btnLeft;
|
||||||
|
HideButton("Center");
|
||||||
|
this.buttonRight.Text = btnRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, Window.ControlBox ctrlBox, string lblText, string btnLeft, string btnCenter, string btnRight)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
if (ctrlBox == Window.ControlBox.Off)
|
||||||
|
{
|
||||||
|
this.ControlBox = false;
|
||||||
|
}
|
||||||
|
this.labelText.Text = lblText;
|
||||||
|
this.buttonLeft.Text = btnLeft;
|
||||||
|
this.buttonCenter.Text = btnCenter;
|
||||||
|
this.buttonRight.Text = btnRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, Icons.Icon icon, string lblText)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
if (icon != Icons.Icon.NoIcon)
|
||||||
|
{
|
||||||
|
DrawIcon(icon);
|
||||||
|
ResizeLabel();
|
||||||
|
}
|
||||||
|
this.labelText.Text = lblText;
|
||||||
|
HideButton("Left");
|
||||||
|
HideButton("Center");
|
||||||
|
HideButton("Right");
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, Icons.Icon icon, string lblText, string btnCenter)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
if (icon != Icons.Icon.NoIcon)
|
||||||
|
{
|
||||||
|
DrawIcon(icon);
|
||||||
|
ResizeLabel();
|
||||||
|
}
|
||||||
|
this.labelText.Text = lblText;
|
||||||
|
HideButton("Left");
|
||||||
|
this.buttonCenter.Text = btnCenter;
|
||||||
|
HideButton("Right");
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, Icons.Icon icon, string lblText, string btnLeft, string btnRight)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
if (icon != Icons.Icon.NoIcon)
|
||||||
|
{
|
||||||
|
DrawIcon(icon);
|
||||||
|
ResizeLabel();
|
||||||
|
}
|
||||||
|
this.labelText.Text = lblText;
|
||||||
|
this.buttonLeft.Text = btnLeft;
|
||||||
|
HideButton("Center");
|
||||||
|
this.buttonRight.Text = btnRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, Icons.Icon icon, string lblText, string btnLeft, string btnCenter, string btnRight)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
if (icon != Icons.Icon.NoIcon)
|
||||||
|
{
|
||||||
|
DrawIcon(icon);
|
||||||
|
ResizeLabel();
|
||||||
|
}
|
||||||
|
this.labelText.Text = lblText;
|
||||||
|
this.buttonLeft.Text = btnLeft;
|
||||||
|
this.buttonCenter.Text = btnCenter;
|
||||||
|
this.buttonRight.Text = btnRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, Window.ControlBox ctrlBox, Icons.Icon icon, string lblText, string btnCenter)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
if (ctrlBox == Window.ControlBox.Off)
|
||||||
|
{
|
||||||
|
this.ControlBox = false;
|
||||||
|
}
|
||||||
|
if (icon != Icons.Icon.NoIcon)
|
||||||
|
{
|
||||||
|
DrawIcon(icon);
|
||||||
|
ResizeLabel();
|
||||||
|
}
|
||||||
|
HideButton("Left");
|
||||||
|
this.buttonCenter.Text = btnCenter;
|
||||||
|
HideButton("Right");
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, Window.ControlBox ctrlBox, Icons.Icon icon, string lblText, string btnLeft, string btnRight)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
if (ctrlBox == Window.ControlBox.Off)
|
||||||
|
{
|
||||||
|
this.ControlBox = false;
|
||||||
|
}
|
||||||
|
if (icon != Icons.Icon.NoIcon)
|
||||||
|
{
|
||||||
|
DrawIcon(icon);
|
||||||
|
ResizeLabel();
|
||||||
|
}
|
||||||
|
this.labelText.Text = lblText;
|
||||||
|
this.buttonLeft.Text = btnLeft;
|
||||||
|
HideButton("Center");
|
||||||
|
this.buttonRight.Text = btnRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OwnMessageBox(Window.Size size, string name, Window.ControlBox ctrlBox, Icons.Icon icon, string lblText, string btnLeft, string btnCenter, string btnRight)
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.MinimumSize = new System.Drawing.Size(Window.XSize(Window.Size.Nano), Window.YSize(Window.Size.Nano));
|
||||||
|
this.ClientSize = new System.Drawing.Size(Window.XSize(size), Window.YSize(size));
|
||||||
|
this.Text = name;
|
||||||
|
if (ctrlBox == Window.ControlBox.Off)
|
||||||
|
{
|
||||||
|
this.ControlBox = false;
|
||||||
|
}
|
||||||
|
if (icon != Icons.Icon.NoIcon)
|
||||||
|
{
|
||||||
|
DrawIcon(icon);
|
||||||
|
ResizeLabel();
|
||||||
|
}
|
||||||
|
this.labelText.Text = lblText;
|
||||||
|
this.buttonLeft.Text = btnLeft;
|
||||||
|
this.buttonCenter.Text = btnCenter;
|
||||||
|
this.buttonRight.Text = btnRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
private System.Drawing.Image SetIcon(Icons.Icon icon)
|
||||||
|
{
|
||||||
|
this.pictureBoxIcon.BackgroundImage = global::OwnMessageBox.Properties.Resources.Information;
|
||||||
|
System.Drawing.Image image = null;
|
||||||
|
|
||||||
|
switch (icon)
|
||||||
|
{
|
||||||
|
case Icons.Icon.Construction:
|
||||||
|
image = global::OwnMessageBox.Properties.Resources.Construction;
|
||||||
|
break;
|
||||||
|
case Icons.Icon.Email:
|
||||||
|
image = global::OwnMessageBox.Properties.Resources.Email;
|
||||||
|
break;
|
||||||
|
case Icons.Icon.Error:
|
||||||
|
image = global::OwnMessageBox.Properties.Resources.Error;
|
||||||
|
break;
|
||||||
|
case Icons.Icon.FatalError:
|
||||||
|
image = global::OwnMessageBox.Properties.Resources.FatalError;
|
||||||
|
break;
|
||||||
|
case Icons.Icon.Instruction:
|
||||||
|
image = global::OwnMessageBox.Properties.Resources.Instruction;
|
||||||
|
break;
|
||||||
|
case Icons.Icon.Question:
|
||||||
|
image = global::OwnMessageBox.Properties.Resources.Question;
|
||||||
|
break;
|
||||||
|
case Icons.Icon.Telephon:
|
||||||
|
image = global::OwnMessageBox.Properties.Resources.Telephone;
|
||||||
|
break;
|
||||||
|
case Icons.Icon.Tips:
|
||||||
|
image = global::OwnMessageBox.Properties.Resources.Tips;
|
||||||
|
break;
|
||||||
|
case Icons.Icon.Warning:
|
||||||
|
image = global::OwnMessageBox.Properties.Resources.Warning;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
image = global::OwnMessageBox.Properties.Resources.Information;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawIcon(Icons.Icon icon)
|
||||||
|
{
|
||||||
|
this.pictureBoxIcon.BackgroundImage = SetIcon(icon);
|
||||||
|
this.pictureBoxIcon.Enabled = true;
|
||||||
|
this.pictureBoxIcon.Visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ResizeLabel()
|
||||||
|
{
|
||||||
|
this.labelText.Size = new System.Drawing.Size(this.labelText.Size.Width - 50, 399);
|
||||||
|
this.labelText.Location = new System.Drawing.Point(63, 13);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HideButton(string pos)
|
||||||
|
{
|
||||||
|
switch (pos.ToLower())
|
||||||
|
{
|
||||||
|
case "left":
|
||||||
|
this.buttonLeft.Enabled = false;
|
||||||
|
this.buttonLeft.Visible = false;
|
||||||
|
break;
|
||||||
|
case "center":
|
||||||
|
this.buttonCenter.Enabled = false;
|
||||||
|
this.buttonCenter.Visible = false;
|
||||||
|
break;
|
||||||
|
case "right":
|
||||||
|
this.buttonRight.Enabled = false;
|
||||||
|
this.buttonRight.Visible = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Button
|
||||||
|
private void buttonLeft_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//Den Text des Button zurückgeben
|
||||||
|
Result = sender.ToString().Remove(0, sender.ToString().LastIndexOf(":") + 2);
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonCenter_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//Den Text des Button zurückgeben
|
||||||
|
Result = sender.ToString().Remove(0, sender.ToString().LastIndexOf(":") + 2);
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonRight_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//Den Text des Button zurückgeben
|
||||||
|
Result = sender.ToString().Remove(0, sender.ToString().LastIndexOf(":") + 2);
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
116
OwnMessageBox/OwnMessageBox.csproj
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<?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>{F421906F-D2C3-4AD2-9C1F-17150AC80E17}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>OwnMessageBox</RootNamespace>
|
||||||
|
<AssemblyName>OwnMessageBox</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>false</Deterministic>
|
||||||
|
</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>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Icons.cs" />
|
||||||
|
<Compile Include="OwnMessageBox.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="OwnMessageBox.Designer.cs">
|
||||||
|
<DependentUpon>OwnMessageBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Window.cs" />
|
||||||
|
<EmbeddedResource Include="OwnMessageBox.resx">
|
||||||
|
<DependentUpon>OwnMessageBox.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
</Compile>
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\Construction.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\Email.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\Error.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\FatalError.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\Information.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\Instruction.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\Question.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\Telephone.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\Tips.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\Warning.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
120
OwnMessageBox/OwnMessageBox.resx
Normal file
@ -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>
|
||||||
22
OwnMessageBox/Program.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace EOwnMessageBox
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Der Haupteinstiegspunkt für die Anwendung.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new OwnMessageBox());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
36
OwnMessageBox/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
// die einer Assembly zugeordnet sind.
|
||||||
|
[assembly: AssemblyTitle("OwnMessageBox")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("OwnMessageBox")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2018 ")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||||
|
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||||
|
[assembly: Guid("f421906f-d2c3-4ad2-9c1f-17150ac80e17")]
|
||||||
|
|
||||||
|
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
//
|
||||||
|
// Hauptversion
|
||||||
|
// Nebenversion
|
||||||
|
// Buildnummer
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
163
OwnMessageBox/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace OwnMessageBox.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
/// </summary>
|
||||||
|
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||||
|
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||||
|
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||||
|
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.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>
|
||||||
|
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OwnMessageBox.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Construction {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Construction", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Email {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Email", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Error {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Error", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap FatalError {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("FatalError", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Information {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Information", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Instruction {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Instruction", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Question {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Question", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Telephone {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Telephone", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Tips {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Tips", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Warning {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Warning", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
151
OwnMessageBox/Properties/Resources.resx
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
<?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>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="Construction" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Construction.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Email" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Email.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Error" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Error.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="FatalError" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\FatalError.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Information" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Information.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Instruction" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Instruction.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Question" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Question.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Telephone" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Telephone.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Tips" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Tips.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Warning" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Warning.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
30
OwnMessageBox/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 OwnMessageBox.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
OwnMessageBox/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
BIN
OwnMessageBox/Resources/Construction.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
OwnMessageBox/Resources/Email.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
OwnMessageBox/Resources/Error.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
OwnMessageBox/Resources/FatalError.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
OwnMessageBox/Resources/Information.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
OwnMessageBox/Resources/Instruction.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
OwnMessageBox/Resources/Question.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
OwnMessageBox/Resources/Telephone.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
OwnMessageBox/Resources/Tips.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
OwnMessageBox/Resources/Warning.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
171
OwnMessageBox/Window.cs
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EOwnMessageBox
|
||||||
|
{
|
||||||
|
public class Window
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Controls the appearance of a window.
|
||||||
|
/// </summary>
|
||||||
|
public Window()
|
||||||
|
{
|
||||||
|
SetWindowSize(Size.Micro); //Initialisiere ein Fenster
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Size
|
||||||
|
{
|
||||||
|
Nano,
|
||||||
|
Micro,
|
||||||
|
Mini,
|
||||||
|
Midi,
|
||||||
|
Maxi,
|
||||||
|
Magnum
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ControlBox
|
||||||
|
{
|
||||||
|
Off,
|
||||||
|
On
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum BorderStyle
|
||||||
|
{
|
||||||
|
Fix,
|
||||||
|
Sizeable
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum TopMost
|
||||||
|
{
|
||||||
|
Off,
|
||||||
|
On
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the current window size.
|
||||||
|
/// </summary>
|
||||||
|
public Size CurrentWindowSize { private set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the size values of the current window.
|
||||||
|
/// </summary>
|
||||||
|
public int[] CurrentWindowSizeValue { private set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the current control box setting.
|
||||||
|
/// </summary>
|
||||||
|
public ControlBox CurrentControlBox { private set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the border sizeable setting.
|
||||||
|
/// </summary>
|
||||||
|
public BorderStyle CurrentBorderStyle { private set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the window most on top setting.
|
||||||
|
/// </summary>
|
||||||
|
public TopMost CurrentTopMostStatus { private set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the widht and height size of a window.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="size">A valid window size. Possible options are: 'Nano' (360x270), 'Micro' (480x360), 'Mini' (640x480), 'Midi' (850x640), 'Maxi' (1020x770) und 'Magnum' (1360x1020).</param>
|
||||||
|
/// <returns>Returns the widht and height value of the window.</returns>
|
||||||
|
public int[] SetWindowSize(Size size)
|
||||||
|
{
|
||||||
|
int[] windowsSize = new int[2];
|
||||||
|
switch (size)
|
||||||
|
{
|
||||||
|
case Size.Nano:
|
||||||
|
windowsSize[0] = 360;
|
||||||
|
windowsSize[1] = 270;
|
||||||
|
break;
|
||||||
|
case Size.Mini:
|
||||||
|
windowsSize[0] = 640;
|
||||||
|
windowsSize[1] = 480;
|
||||||
|
break;
|
||||||
|
case Size.Midi:
|
||||||
|
windowsSize[0] = 850;
|
||||||
|
windowsSize[1] = 640;
|
||||||
|
break;
|
||||||
|
case Size.Maxi:
|
||||||
|
windowsSize[0] = 1020;
|
||||||
|
windowsSize[1] = 770;
|
||||||
|
break;
|
||||||
|
case Size.Magnum:
|
||||||
|
windowsSize[0] = 1360;
|
||||||
|
windowsSize[1] = 1020;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
windowsSize[0] = 480;
|
||||||
|
windowsSize[1] = 360;
|
||||||
|
break; //Size.Micro
|
||||||
|
}
|
||||||
|
CurrentWindowSize = size;
|
||||||
|
CurrentWindowSizeValue = windowsSize;
|
||||||
|
|
||||||
|
return CurrentWindowSizeValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the controlbox of a window.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="controlBox">A valid option. Possible options are 'Off' and 'On'.</param>
|
||||||
|
/// <returns>Returns the control box status.</returns>
|
||||||
|
public Window.ControlBox SetControlBox(ControlBox controlBox)
|
||||||
|
{
|
||||||
|
CurrentControlBox = controlBox;
|
||||||
|
|
||||||
|
return controlBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the border style of a window.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="borderStyle">A valid option. Possible options are 'Fix' and 'Sizeable'.</param>
|
||||||
|
/// <returns>Returns the control box status.</returns>
|
||||||
|
public Window.BorderStyle SetBorderStyle(BorderStyle borderStyle)
|
||||||
|
{
|
||||||
|
CurrentBorderStyle = borderStyle;
|
||||||
|
|
||||||
|
return borderStyle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets whether the window is most on top.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="topMost">A valid option. Possible options are 'Off' and 'On'.</param>
|
||||||
|
/// <returns>Returns the most on top status.</returns>
|
||||||
|
public Window.TopMost SetTopMost(TopMost topMost)
|
||||||
|
{
|
||||||
|
CurrentTopMostStatus = topMost;
|
||||||
|
|
||||||
|
return topMost;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the Window X-Size
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="winSize">A valid window size. E.g.: 'Window.Size.Mini'</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static int XSize(Window.Size winSize)
|
||||||
|
{
|
||||||
|
var win = new Window();
|
||||||
|
return win.SetWindowSize(winSize)[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the Window Y-Size
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="winSize">A valid window size. E.g.: 'Window.Size.Mini'</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static int YSize(Window.Size winSize)
|
||||||
|
{
|
||||||
|
var win = new Window();
|
||||||
|
return win.SetWindowSize(winSize)[1]; ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6
Test_OwnMessageBox/Test_OwnMessageBox/App.config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
61
Test_OwnMessageBox/Test_OwnMessageBox/Form1.Designer.cs
generated
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
namespace Test_OwnMessageBox
|
||||||
|
{
|
||||||
|
partial class Form1
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Designervariable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verwendete Ressourcen bereinigen.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Vom Windows Form-Designer generierter Code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Methode für die Designerunterstützung.
|
||||||
|
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.buttonStart = new System.Windows.Forms.Button();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// buttonStart
|
||||||
|
//
|
||||||
|
this.buttonStart.Location = new System.Drawing.Point(13, 156);
|
||||||
|
this.buttonStart.Name = "buttonStart";
|
||||||
|
this.buttonStart.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.buttonStart.TabIndex = 0;
|
||||||
|
this.buttonStart.Text = "Start";
|
||||||
|
this.buttonStart.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonStart.Click += new System.EventHandler(this.buttonStart_Click);
|
||||||
|
//
|
||||||
|
// Form1
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(329, 191);
|
||||||
|
this.Controls.Add(this.buttonStart);
|
||||||
|
this.Name = "Form1";
|
||||||
|
this.Text = "MyForm";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button buttonStart;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
119
Test_OwnMessageBox/Test_OwnMessageBox/Form1.cs
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using EOwnMessageBox;
|
||||||
|
|
||||||
|
namespace Test_OwnMessageBox
|
||||||
|
{
|
||||||
|
public partial class Form1 : Form
|
||||||
|
{
|
||||||
|
#region Version und Copyright
|
||||||
|
// Version und Copyright
|
||||||
|
string programName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen
|
||||||
|
string programVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||||
|
static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
||||||
|
string copyright = ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
||||||
|
string icon = Application.StartupPath + "\\Info.bmp";
|
||||||
|
//Assembly Datum und Zeit
|
||||||
|
static DateTime value = AssemblyDateTime();
|
||||||
|
string date = value.ToShortDateString();
|
||||||
|
string time = value.ToLongTimeString();
|
||||||
|
private static DateTime AssemblyDateTime()
|
||||||
|
{
|
||||||
|
var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
|
var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision));
|
||||||
|
//Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original)
|
||||||
|
return buildDateTime;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Programm-Info
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the name of the program file
|
||||||
|
/// </summary>
|
||||||
|
public static string ProgramName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the version of the program file
|
||||||
|
/// </summary>
|
||||||
|
public static string ProgramVersion { set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the copyright notice
|
||||||
|
/// </summary>
|
||||||
|
public static string Copyright { set; get; }
|
||||||
|
|
||||||
|
private void SetProgramInfo()
|
||||||
|
{
|
||||||
|
//Name, Version und Copyright setzen
|
||||||
|
ProgramName = programName;
|
||||||
|
ProgramVersion = programVersion;
|
||||||
|
Copyright = copyright;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public Form1()
|
||||||
|
{
|
||||||
|
SetProgramInfo(); //Name, Version und Copyright setzen
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonStart_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var omb = new EOwnMessageBox.OwnMessageBox(Window.Size.Mini);
|
||||||
|
omb.ShowDialog();
|
||||||
|
|
||||||
|
var omb1 = new EOwnMessageBox.OwnMessageBox(Window.Size.Nano, "MyMessageBox", "MyMessageBox\nWithout Buttons");
|
||||||
|
omb1.ShowDialog();
|
||||||
|
|
||||||
|
var omb2 = new EOwnMessageBox.OwnMessageBox(Window.Size.Mini, "MyMessageBox", "MyMessageBox\nWith one Buttons", "Center");
|
||||||
|
omb2.ShowDialog();
|
||||||
|
string buttonPressed = omb2.Result; //Dieser Wert liefert den Beschriftungstext der gedrückten Taste zurück
|
||||||
|
MessageBox.Show(buttonPressed); //Zeigt welche Taste gedrückt wurde
|
||||||
|
|
||||||
|
var omb3 = new EOwnMessageBox.OwnMessageBox(Window.Size.Midi, "MyMessageBox", "MyMessageBox\nWith two Buttons", "Left", "Right");
|
||||||
|
omb3.ShowDialog();
|
||||||
|
|
||||||
|
var omb4 = new EOwnMessageBox.OwnMessageBox(Window.Size.Micro, "MyMessageBox", "MyMessageBox\nWith three Buttons", "Left", "Center", "Right");
|
||||||
|
omb4.ShowDialog();
|
||||||
|
|
||||||
|
var omb5 = new EOwnMessageBox.OwnMessageBox(Window.Size.Maxi, "MyMessageBox", Window.ControlBox.Off, "MyMessageBox\nWithoutControlBox\nWith one Buttons", "Center");
|
||||||
|
omb5.ShowDialog();
|
||||||
|
|
||||||
|
var omb6 = new EOwnMessageBox.OwnMessageBox(Window.Size.Magnum, "MyMessageBox", Window.ControlBox.Off, "MyMessageBox\nWithoutControlBox\nWith two Buttons", "OK", "Cancel");
|
||||||
|
omb6.ShowDialog();
|
||||||
|
|
||||||
|
var omb7 = new EOwnMessageBox.OwnMessageBox(Window.Size.Mini, "MyMessageBox", Window.ControlBox.Off, "MyMessageBox\nWithoutControlBox\nWith three Buttons", "OK", "Reply", "Cancel");
|
||||||
|
omb7.ShowDialog();
|
||||||
|
|
||||||
|
var omb8 = new EOwnMessageBox.OwnMessageBox(Window.Size.Nano, "MyMessageBox", Icons.Icon.Construction, "MyMessageBox\nWith Icon\nWithout Buttons");
|
||||||
|
omb8.ShowDialog();
|
||||||
|
|
||||||
|
var omb9 = new EOwnMessageBox.OwnMessageBox(Window.Size.Mini, "MyMessageBox", Icons.Icon.Email, "MyMessageBox\nWith Icon\nWith one Buttons", "Center");
|
||||||
|
omb9.ShowDialog();
|
||||||
|
|
||||||
|
var omb10 = new EOwnMessageBox.OwnMessageBox(Window.Size.Midi, "MyMessageBox", Icons.Icon.Error, "MyMessageBox\nWith Icon\nWith two Buttons", "Left", "Right");
|
||||||
|
omb10.ShowDialog();
|
||||||
|
|
||||||
|
var omb11 = new EOwnMessageBox.OwnMessageBox(Window.Size.Micro, "MyMessageBox", Icons.Icon.FatalError, "MyMessageBox\nWith Icon\nWith three Buttons", "Left", "Center", "Right");
|
||||||
|
omb11.ShowDialog();
|
||||||
|
|
||||||
|
var omb12 = new EOwnMessageBox.OwnMessageBox(Window.Size.Maxi, "MyMessageBox", Window.ControlBox.Off, Icons.Icon.Information, "MyMessageBox\nWithoutControlBox\nWith Icon\nWith one Buttons", "Center");
|
||||||
|
omb12.ShowDialog();
|
||||||
|
|
||||||
|
var omb13 = new EOwnMessageBox.OwnMessageBox(Window.Size.Magnum, "MyMessageBox", Window.ControlBox.Off, Icons.Icon.Instruction, "MyMessageBox\nWithoutControlBox\nWith Icon\nWith two Buttons", "OK", "Cancel");
|
||||||
|
omb13.ShowDialog();
|
||||||
|
|
||||||
|
var omb14 = new EOwnMessageBox.OwnMessageBox(Window.Size.Mini, "MyMessageBox", Window.ControlBox.Off, Icons.Icon.Question, "MyMessageBox\nWithoutControlBox\nWith Icon\nWith three Buttons", "OK", "Reply", "Cancel");
|
||||||
|
omb14.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Test_OwnMessageBox/Test_OwnMessageBox/Form1.resx
Normal file
@ -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>
|
||||||
22
Test_OwnMessageBox/Test_OwnMessageBox/Program.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Test_OwnMessageBox
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Der Haupteinstiegspunkt für die Anwendung.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new Form1());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
// die einer Assembly zugeordnet sind.
|
||||||
|
[assembly: AssemblyTitle("Test_OwnMessageBox")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("Test_OwnMessageBox")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2018 ")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||||
|
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||||
|
[assembly: Guid("283ab9ae-b155-4143-8661-8f53021af906")]
|
||||||
|
|
||||||
|
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
//
|
||||||
|
// Hauptversion
|
||||||
|
// Nebenversion
|
||||||
|
// Buildnummer
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
71
Test_OwnMessageBox/Test_OwnMessageBox/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion: 4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code neu generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Test_OwnMessageBox.Properties
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
/// </summary>
|
||||||
|
// Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
|
||||||
|
// über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||||
|
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||||
|
// mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
|
||||||
|
[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>
|
||||||
|
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||||
|
/// </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("Test_OwnMessageBox.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
/// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
117
Test_OwnMessageBox/Test_OwnMessageBox/Properties/Resources.resx
Normal 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>
|
||||||
30
Test_OwnMessageBox/Test_OwnMessageBox/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 Test_OwnMessageBox.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
@ -0,0 +1,89 @@
|
|||||||
|
<?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>{283AB9AE-B155-4143-8661-8F53021AF906}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>Test_OwnMessageBox</RootNamespace>
|
||||||
|
<AssemblyName>Test_OwnMessageBox</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>false</Deterministic>
|
||||||
|
</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>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Form1.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form1.Designer.cs">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<EmbeddedResource Include="Form1.resx">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\OwnMessageBox\OwnMessageBox.csproj">
|
||||||
|
<Project>{f421906f-d2c3-4ad2-9c1f-17150ac80e17}</Project>
|
||||||
|
<Name>OwnMessageBox</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||