CreamInstaller/CreamInstaller/DialogForm.cs

25 lines
709 B
C#
Raw Normal View History

using System.Drawing;
using System.Windows.Forms;
namespace CreamInstaller
{
public partial class DialogForm : Form
{
2021-07-30 13:19:46 +05:00
public DialogForm(IWin32Window owner)
{
2021-07-30 13:19:46 +05:00
Owner = owner as Form;
InitializeComponent();
}
public DialogResult Show(string formName, Icon descriptionIcon, string descriptionText, string acceptButtonText, string cancelButtonText)
{
icon.Image = descriptionIcon.ToBitmap();
Text = formName;
descriptionLabel.Text = descriptionText;
acceptButton.Text = acceptButtonText;
cancelButton.Text = cancelButtonText;
return ShowDialog();
}
}
}