59 lines
1.6 KiB
C#
59 lines
1.6 KiB
C#
// Copyright (c) 2017 schick Informatik
|
|
// Description: Info-Dialog wenn eine Id erhalten wird
|
|
//
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace ENI2.EditControls
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for ShowIdDialog.xaml
|
|
/// </summary>
|
|
public partial class ShowIdDialog : Window
|
|
{
|
|
public ShowIdDialog()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public string DisplayId
|
|
{
|
|
set { this.textBoxId.Text = value; }
|
|
get { return this.textBoxId.Text; }
|
|
}
|
|
|
|
public void UpdateId(string id)
|
|
{
|
|
this.Dispatcher.Invoke(new Action(() =>
|
|
{
|
|
this.DisplayId = id;
|
|
this.statusLabel.Content = Properties.Resources.textIdReceived;
|
|
this.statusLabel.Background = Brushes.LightGreen;
|
|
this.clickToCopyLabel.Visibility = Visibility.Visible;
|
|
}));
|
|
}
|
|
|
|
private void textBoxId_MouseDown(object sender, MouseButtonEventArgs e)
|
|
{
|
|
Clipboard.SetText(this.textBoxId.Text);
|
|
}
|
|
|
|
private void Button_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|