update vor anpassungen vorlagenauswahl fravoriten
This commit is contained in:
67
Client/Diverses/InputDialog.cs
Normal file
67
Client/Diverses/InputDialog.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user