Label durch Button ersetzt für bessere Benutzerrückmeldung
This commit is contained in:
parent
c29a936fa2
commit
ad5f873d04
@ -29,7 +29,7 @@
|
||||
<Label Name="labelIMO" Grid.Column="1" Grid.Row="2"/>
|
||||
<Label Name="statusLabel" HorizontalAlignment="Center" Content="{x:Static p:Resources.textWaitForId}" Background="LemonChiffon" Grid.Row="3" Grid.ColumnSpan="2"/>
|
||||
<TextBox IsReadOnly="True" Name="textBoxId" MouseDown="textBoxId_MouseDown" FontWeight="Bold" HorizontalAlignment="Center" VerticalContentAlignment="Center" Margin="2" Grid.Row="4" Grid.ColumnSpan="2"/>
|
||||
<Label Name="clickToCopyLabel" Content=" -> click to copy" HorizontalAlignment="Center" Grid.Row="5" Grid.ColumnSpan="2" MouseDown="textBoxId_MouseDown" Visibility="Hidden"/>
|
||||
<Button Name="clickToCopyButton" Content=" -> click to copy <- " HorizontalAlignment="Center" Grid.Row="5" Grid.ColumnSpan="2" Click="clickToCopyButton_Click" Visibility="Hidden" Margin="2"/>
|
||||
<Button Grid.Row="6" Grid.Column="0" HorizontalAlignment="Left" Content="Close and open Id" Margin="2" Width="100" Click="Button_Click_1" />
|
||||
<Button Grid.Row="6" Grid.Column="1" HorizontalAlignment="Right" Content="Close" Margin="2" Width="100" Click="Button_Click" />
|
||||
</Grid>
|
||||
|
||||
@ -38,15 +38,10 @@ namespace ENI2.EditControls
|
||||
this.DisplayId = id;
|
||||
this.statusLabel.Content = Properties.Resources.textIdReceived;
|
||||
this.statusLabel.Background = Brushes.LightGreen;
|
||||
this.clickToCopyLabel.Visibility = Visibility.Visible;
|
||||
this.clickToCopyButton.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();
|
||||
@ -67,5 +62,16 @@ namespace ENI2.EditControls
|
||||
this.labelIMO.Content = this.Core.IMO.IsNullOrEmpty() ? this.Core.ENI : this.Core.IMO;
|
||||
}
|
||||
}
|
||||
|
||||
private void clickToCopyButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Clipboard.SetText(this.textBoxId.Text);
|
||||
this.clickToCopyButton.Background = Brushes.LightGreen;
|
||||
}
|
||||
|
||||
private void textBoxId_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
Clipboard.SetText(this.textBoxId.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user