Show MessageBox
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -80,7 +80,7 @@
|
||||
>
|
||||
<Grid Margin="15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="135"/>
|
||||
<ColumnDefinition Width="116"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -100,11 +100,11 @@
|
||||
FontSize="14"
|
||||
FontWeight="Bold"
|
||||
HorizontalAlignment="Left"
|
||||
Width="150"
|
||||
BorderBrush="#FF157315"
|
||||
BorderThickness="3"
|
||||
Background="Transparent"
|
||||
Style="{StaticResource ModernTextbox}" />
|
||||
BorderBrush="#FF157315"
|
||||
BorderThickness="3"
|
||||
Background="Transparent"
|
||||
Style="{StaticResource ModernTextbox}"
|
||||
/>
|
||||
|
||||
<TextBlock Grid.Row="1"
|
||||
Margin="0,20"
|
||||
@@ -113,6 +113,7 @@
|
||||
FontWeight="Bold"
|
||||
FontFamily="MV Boli"
|
||||
Foreground="#FF157315"/>
|
||||
|
||||
<TextBox x:Name="LastTicket"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="0,20" Grid.Row="1"
|
||||
@@ -120,14 +121,12 @@
|
||||
Foreground="#FF157315"
|
||||
FontSize="14"
|
||||
FontWeight="Bold"
|
||||
Width="150"
|
||||
BorderBrush="#FF157315"
|
||||
BorderThickness="3"
|
||||
Background="Transparent"
|
||||
Style="{StaticResource ModernTextbox}" />
|
||||
BorderBrush="#FF157315"
|
||||
BorderThickness="3"
|
||||
Background="Transparent"
|
||||
Style="{StaticResource ModernTextbox}" />
|
||||
</Grid>
|
||||
|
||||
|
||||
<Button Style="{StaticResource ModernButton}"
|
||||
Height="45"
|
||||
Width="140"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
@@ -28,16 +29,23 @@ namespace LotteryApplication
|
||||
|
||||
private void BtnRaffleClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (FirstTicket.Text != "" && LastTicket.Text != "")
|
||||
{
|
||||
int num1 = int.Parse(FirstTicket.Text);
|
||||
int num2 = int.Parse(LastTicket.Text);
|
||||
|
||||
int num1 = int.Parse(FirstTicket.Text);
|
||||
int num2 = int.Parse(LastTicket.Text);
|
||||
TicketList.Items.Clear();
|
||||
|
||||
TicketList.Items.Clear();
|
||||
Random rnd = new Random();
|
||||
for (int i = 0; i <= 99; i++)
|
||||
|
||||
Random rnd = new Random();
|
||||
for (int i = 0; i <= 99; i++)
|
||||
|
||||
TicketList.Items.Add(rnd.Next(num1, num2));
|
||||
TicketList.Items.Add(rnd.Next(num1, num2));
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("no valid Ticketnumber!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,5 +64,15 @@ namespace LotteryApplication
|
||||
{
|
||||
this.WindowState = WindowState.Minimized;
|
||||
}
|
||||
|
||||
//private void FirstTicket_previewtextinput(object sender, TextCompositionEventArgs e)
|
||||
//{
|
||||
// e.Handled = new Regex("[^0-9]+").IsMatch(e.Text);
|
||||
//}
|
||||
|
||||
//private void LastTicket_previewtextinput(object sender, TextCompositionEventArgs e)
|
||||
//{
|
||||
// //e.Handled = new Regex("[^0-9]+").IsMatch(e.Text);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="White"/>
|
||||
<Setter Property="Background" Value="#FF489448"/>
|
||||
<Setter Property="Opacity" Value="0.8"/>
|
||||
<Setter Property="Foreground" Value="#FFAF9BB7"/>
|
||||
</Trigger>
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
<Grid>
|
||||
<Rectangle StrokeThickness="1"/>
|
||||
<TextBox Margin="1"
|
||||
Text="{TemplateBinding Text}"
|
||||
Text="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent},
|
||||
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
BorderThickness="0"
|
||||
Background="Transparent"
|
||||
VerticalContentAlignment="Center"
|
||||
@@ -27,7 +28,7 @@
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Padding="5"
|
||||
Margin="10,0,0,0"
|
||||
Margin="5,0,0,0"
|
||||
Foreground="#FF73C373">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -16,5 +16,5 @@ C:\Nathalie\Programmieren\Projekte\LotteryApplication\LotteryApplication\App.xam
|
||||
193-1891726104
|
||||
MainWindow.xaml;Theme\ModernButtonTheme.xaml;Theme\ModernTextBoxTheme.xaml;
|
||||
|
||||
False
|
||||
True
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "78002E44A7F27DECE1537F2570F60833B1B8DA6A"
|
||||
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DC00031C45A17A4CF23733A38F48550DA65D1C39"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
@@ -50,7 +50,7 @@ namespace LotteryApplication {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 116 "..\..\..\MainWindow.xaml"
|
||||
#line 117 "..\..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox LastTicket;
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace LotteryApplication {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 154 "..\..\..\MainWindow.xaml"
|
||||
#line 153 "..\..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.ListBox TicketList;
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace LotteryApplication {
|
||||
return;
|
||||
case 6:
|
||||
|
||||
#line 136 "..\..\..\MainWindow.xaml"
|
||||
#line 135 "..\..\..\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnRaffleClick);
|
||||
|
||||
#line default
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "78002E44A7F27DECE1537F2570F60833B1B8DA6A"
|
||||
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DC00031C45A17A4CF23733A38F48550DA65D1C39"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
@@ -50,7 +50,7 @@ namespace LotteryApplication {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 116 "..\..\..\MainWindow.xaml"
|
||||
#line 117 "..\..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox LastTicket;
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace LotteryApplication {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 154 "..\..\..\MainWindow.xaml"
|
||||
#line 153 "..\..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.ListBox TicketList;
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace LotteryApplication {
|
||||
return;
|
||||
case 6:
|
||||
|
||||
#line 136 "..\..\..\MainWindow.xaml"
|
||||
#line 135 "..\..\..\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnRaffleClick);
|
||||
|
||||
#line default
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user