You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.8 KiB
68 lines
1.8 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using OnDoc.Klassen;
|
|
using Syncfusion.Windows.Forms;
|
|
using Syncfusion.Windows.Forms.Tools;
|
|
using Syncfusion.WinForms.Controls;
|
|
namespace OnDoc.Diverses
|
|
{
|
|
public partial class InputDialog : SfForm
|
|
{
|
|
public string result = "";
|
|
public InputDialog()
|
|
{
|
|
InitializeComponent();
|
|
this.Style.TitleBar.BackColor = Theaming.Titelbar();
|
|
this.Style.TitleBar.ForeColor = Theaming.TitelFontColor();
|
|
}
|
|
|
|
public InputDialog(string caption, string description, string defaultvalue)
|
|
{
|
|
InitializeComponent();
|
|
this.Style.TitleBar.BackColor = Theaming.Titelbar();
|
|
this.Style.TitleBar.ForeColor = Theaming.TitelFontColor();
|
|
textBox1.Text = defaultvalue;
|
|
this.Text= caption;
|
|
this.label1.Text=description;
|
|
|
|
}
|
|
|
|
private void btnok_Click(object sender, EventArgs e)
|
|
{
|
|
if (textBox1.Text.Trim() != "")
|
|
{
|
|
result = textBox1.Text;
|
|
DialogResult = DialogResult.OK;
|
|
}
|
|
|
|
}
|
|
|
|
private void btncancel_Click(object sender, EventArgs e)
|
|
{
|
|
DialogResult= DialogResult.Cancel;
|
|
}
|
|
|
|
private void textBox1_KeyDown(object sender, KeyEventArgs e)
|
|
{
|
|
if (e.KeyCode == Keys.Enter)
|
|
{
|
|
btnok_Click(sender, e);
|
|
}
|
|
}
|
|
|
|
private void InputDialog_Load(object sender, EventArgs e)
|
|
{
|
|
textBox1.SelectionStart = 0;
|
|
textBox1.SelectionLength = textBox1.Text.Length;
|
|
|
|
}
|
|
}
|
|
}
|