private static DialogResult ShowInputDialog(ref string input)
{
System.Drawing.Size size = new System.Drawing.Size(200, 70);
Form inputBox = new Form
{
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog,
MaximizeBox = false,
MinimizeBox = false,
StartPosition = FormStartPosition.CenterScreen,
ClientSize = size,
Text = Interface.GetInterfaceString("packages_list_website")
};
System.Windows.Forms.TextBox textBox = new TextBox
{
Size = new System.Drawing.Size(size.Width - 10, 23),
Location = new System.Drawing.Point(5, 5),
Text = input
};
inputBox.Controls.Add(textBox);
Button okButton = new Button
{
DialogResult = System.Windows.Forms.DialogResult.OK,
Name = "okButton",
Size = new System.Drawing.Size(75, 23),
Text = Interface.GetInterfaceString("packages_button_ok"),
Location = new System.Drawing.Point(size.Width - 80 - 80, 39)
};
inputBox.Controls.Add(okButton);
Button cancelButton = new Button
{
DialogResult = System.Windows.Forms.DialogResult.Cancel,
Name = "cancelButton",
Size = new System.Drawing.Size(75, 23),
Text = Interface.GetInterfaceString("packages_button_cancel"),
Location = new System.Drawing.Point(size.Width - 80, 39)
};
inputBox.Controls.Add(cancelButton);
inputBox.AcceptButton = okButton;
inputBox.CancelButton = cancelButton;
inputBox.AcceptButton = okButton;
inputBox.CancelButton = cancelButton;
DialogResult result = inputBox.ShowDialog();
input = textBox.Text;
return result;
}