TextBox style set
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,20 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace LotteryApplication.Core
|
|
||||||
{
|
|
||||||
internal class ObservableObject : INotifyPropertyChanged
|
|
||||||
{
|
|
||||||
public event PropertyChangedEventHandler? PropertyChanged;
|
|
||||||
|
|
||||||
public void OnPropertychanged([CallerMemberName] string name = null)
|
|
||||||
{
|
|
||||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
|
||||||
|
|
||||||
namespace LotteryApplication.Core
|
|
||||||
{
|
|
||||||
internal class RelayCommand : ICommand
|
|
||||||
{
|
|
||||||
private Action<object> _execute;
|
|
||||||
private Func<object, bool> _canExecute;
|
|
||||||
|
|
||||||
public event EventHandler CanExecuteChanged
|
|
||||||
{
|
|
||||||
add { CommandManager.RequerySuggested += value; }
|
|
||||||
remove { CommandManager.RequerySuggested -= value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RelayCommand(Action<object> execute, Func<object, bool> canExecute = null)
|
|
||||||
{
|
|
||||||
_execute = execute;
|
|
||||||
_canExecute = canExecute;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool CanExecute(object parameter)
|
|
||||||
{
|
|
||||||
return _canExecute == null || _canExecute(parameter);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Execute(object parameter)
|
|
||||||
{
|
|
||||||
_execute(parameter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,13 +11,6 @@
|
|||||||
<None Remove="Images\Lottery.png" />
|
<None Remove="Images\Lottery.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="MVVM\ViewModel\" />
|
|
||||||
<Folder Include="MVVM\View\" />
|
|
||||||
<Folder Include="MVVM\Model\" />
|
|
||||||
<Folder Include="Fonts\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Images\Lottery.png" />
|
<Resource Include="Images\Lottery.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
</Border.Background>
|
</Border.Background>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="35"/>
|
<RowDefinition Height="35"/>
|
||||||
<RowDefinition Height="235"/>
|
<RowDefinition Height="235"/>
|
||||||
@@ -32,10 +31,12 @@
|
|||||||
<ColumnDefinition Width="350"/>
|
<ColumnDefinition Width="350"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Border Grid.Row="0"
|
<Border Grid.Row="0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
MouseDown="Border_MouseDown"/>
|
MouseDown="Border_MouseDown"/>
|
||||||
|
|
||||||
<Button Grid.Column="1"
|
<Button Grid.Column="1"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
@@ -44,8 +45,8 @@
|
|||||||
Margin="0,0,15,0"
|
Margin="0,0,15,0"
|
||||||
Height="25"
|
Height="25"
|
||||||
Width="25"
|
Width="25"
|
||||||
Content="✖" Click="BtnExit"
|
Content="✖" Click="BtnExit"/>
|
||||||
/>
|
|
||||||
<Button Grid.Column="1"
|
<Button Grid.Column="1"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
@@ -60,6 +61,7 @@
|
|||||||
<StackPanel Grid.Row="1"
|
<StackPanel Grid.Row="1"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
VerticalAlignment="Center">
|
VerticalAlignment="Center">
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Text="Lottery"
|
Text="Lottery"
|
||||||
@@ -90,11 +92,19 @@
|
|||||||
FontSize="18"
|
FontSize="18"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontFamily="MV Boli"
|
FontFamily="MV Boli"
|
||||||
Foreground="#FF157315"/>
|
Foreground="#FF157315"
|
||||||
<TextBox
|
/>
|
||||||
|
<TextBox x:Name="FirstTicket"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
Foreground="#FF157315"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Style="{StaticResource ModernTextbox}"/>
|
FontWeight="Bold"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Width="150"
|
||||||
|
BorderBrush="#FF157315"
|
||||||
|
BorderThickness="3"
|
||||||
|
Background="Transparent"
|
||||||
|
Style="{StaticResource ModernTextbox}" />
|
||||||
|
|
||||||
<TextBlock Grid.Row="1"
|
<TextBlock Grid.Row="1"
|
||||||
Margin="0,20"
|
Margin="0,20"
|
||||||
@@ -103,10 +113,18 @@
|
|||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontFamily="MV Boli"
|
FontFamily="MV Boli"
|
||||||
Foreground="#FF157315"/>
|
Foreground="#FF157315"/>
|
||||||
<TextBox Margin="0,20" Grid.Row="1"
|
<TextBox x:Name="LastTicket"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Margin="0,20" Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
Foreground="#FF157315"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Style="{StaticResource ModernTextbox}"/>
|
FontWeight="Bold"
|
||||||
|
Width="150"
|
||||||
|
BorderBrush="#FF157315"
|
||||||
|
BorderThickness="3"
|
||||||
|
Background="Transparent"
|
||||||
|
Style="{StaticResource ModernTextbox}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
@@ -117,10 +135,21 @@
|
|||||||
Content="Start Raffle"
|
Content="Start Raffle"
|
||||||
FontSize="20" Click="BtnRaffleClick"/>
|
FontSize="20" Click="BtnRaffleClick"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ListBox Grid.Row="1"
|
<StackPanel Margin="0,0,15,5"
|
||||||
|
Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2">
|
||||||
Margin="0,0,15,15"
|
<TextBlock Text="Winning Tickets"
|
||||||
|
FontFamily="MV Boli"
|
||||||
|
FontSize="18"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Foreground="White"
|
||||||
|
Margin="2">
|
||||||
|
<TextBlock.Effect>
|
||||||
|
<DropShadowEffect/>
|
||||||
|
</TextBlock.Effect>
|
||||||
|
</TextBlock>
|
||||||
|
<ListBox
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
x:Name="TicketList"
|
x:Name="TicketList"
|
||||||
Foreground="#FF157315"
|
Foreground="#FF157315"
|
||||||
@@ -133,6 +162,9 @@
|
|||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ListBox.ItemsPanel>
|
</ListBox.ItemsPanel>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -20,25 +20,25 @@ namespace LotteryApplication
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MainWindow : Window
|
public partial class MainWindow : Window
|
||||||
{
|
{
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartRaffel()
|
|
||||||
{
|
|
||||||
Random rnd = new Random();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BtnRaffleClick(object sender, RoutedEventArgs e)
|
private void BtnRaffleClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
TicketList.Items.Clear();
|
|
||||||
Random rnd = new Random();
|
|
||||||
for(int i = 0; i <= 99; i++)
|
|
||||||
|
|
||||||
TicketList.Items.Add(rnd.Next(10000));
|
int num1 = int.Parse(FirstTicket.Text);
|
||||||
|
int num2 = int.Parse(LastTicket.Text);
|
||||||
|
|
||||||
|
TicketList.Items.Clear();
|
||||||
|
|
||||||
|
Random rnd = new Random();
|
||||||
|
for (int i = 0; i <= 99; i++)
|
||||||
|
|
||||||
|
TicketList.Items.Add(rnd.Next(num1, num2));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnExit(object sender, RoutedEventArgs e)
|
private void BtnExit(object sender, RoutedEventArgs e)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
|||||||
0f20a831c00feea0a0583ea6285b35ab99c41884
|
4732b0e2a1138fb3ecad0b9cb69c286a25bbe38e
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,7 +12,7 @@ TRACE;DEBUG;NET;NET5_0;NETCOREAPP
|
|||||||
C:\Nathalie\Programmieren\Projekte\LotteryApplication\LotteryApplication\App.xaml
|
C:\Nathalie\Programmieren\Projekte\LotteryApplication\LotteryApplication\App.xaml
|
||||||
3-605903882
|
3-605903882
|
||||||
|
|
||||||
5-691000765
|
3-1233169557
|
||||||
193-1891726104
|
193-1891726104
|
||||||
MainWindow.xaml;Theme\ModernButtonTheme.xaml;Theme\ModernTextBoxTheme.xaml;
|
MainWindow.xaml;Theme\ModernButtonTheme.xaml;Theme\ModernTextBoxTheme.xaml;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ TRACE;DEBUG;NET;NET5_0;NETCOREAPP
|
|||||||
C:\Nathalie\Programmieren\Projekte\LotteryApplication\LotteryApplication\App.xaml
|
C:\Nathalie\Programmieren\Projekte\LotteryApplication\LotteryApplication\App.xaml
|
||||||
3-605903882
|
3-605903882
|
||||||
|
|
||||||
71897431273
|
51355262481
|
||||||
193-1891726104
|
193-1891726104
|
||||||
MainWindow.xaml;Theme\ModernButtonTheme.xaml;Theme\ModernTextBoxTheme.xaml;
|
MainWindow.xaml;Theme\ModernButtonTheme.xaml;Theme\ModernTextBoxTheme.xaml;
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "3FDCBBD618281872401463539A24B88773C2E06B"
|
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "78002E44A7F27DECE1537F2570F60833B1B8DA6A"
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// Dieser Code wurde von einem Tool generiert.
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
@@ -42,7 +42,23 @@ namespace LotteryApplication {
|
|||||||
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||||
|
|
||||||
|
|
||||||
#line 125 "..\..\..\MainWindow.xaml"
|
#line 97 "..\..\..\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.TextBox FirstTicket;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 116 "..\..\..\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.TextBox LastTicket;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 154 "..\..\..\MainWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.ListBox TicketList;
|
internal System.Windows.Controls.ListBox TicketList;
|
||||||
|
|
||||||
@@ -89,7 +105,7 @@ namespace LotteryApplication {
|
|||||||
return;
|
return;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
||||||
#line 47 "..\..\..\MainWindow.xaml"
|
#line 48 "..\..\..\MainWindow.xaml"
|
||||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnExit);
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnExit);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -97,21 +113,27 @@ namespace LotteryApplication {
|
|||||||
return;
|
return;
|
||||||
case 3:
|
case 3:
|
||||||
|
|
||||||
#line 58 "..\..\..\MainWindow.xaml"
|
#line 59 "..\..\..\MainWindow.xaml"
|
||||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnMinimizeClick);
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnMinimizeClick);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
return;
|
return;
|
||||||
case 4:
|
case 4:
|
||||||
|
this.FirstTicket = ((System.Windows.Controls.TextBox)(target));
|
||||||
|
return;
|
||||||
|
case 5:
|
||||||
|
this.LastTicket = ((System.Windows.Controls.TextBox)(target));
|
||||||
|
return;
|
||||||
|
case 6:
|
||||||
|
|
||||||
#line 118 "..\..\..\MainWindow.xaml"
|
#line 136 "..\..\..\MainWindow.xaml"
|
||||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnRaffleClick);
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnRaffleClick);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
return;
|
return;
|
||||||
case 5:
|
case 7:
|
||||||
this.TicketList = ((System.Windows.Controls.ListBox)(target));
|
this.TicketList = ((System.Windows.Controls.ListBox)(target));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "3FDCBBD618281872401463539A24B88773C2E06B"
|
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "78002E44A7F27DECE1537F2570F60833B1B8DA6A"
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// Dieser Code wurde von einem Tool generiert.
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
@@ -42,7 +42,23 @@ namespace LotteryApplication {
|
|||||||
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||||
|
|
||||||
|
|
||||||
#line 125 "..\..\..\MainWindow.xaml"
|
#line 97 "..\..\..\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.TextBox FirstTicket;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 116 "..\..\..\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.TextBox LastTicket;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 154 "..\..\..\MainWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.ListBox TicketList;
|
internal System.Windows.Controls.ListBox TicketList;
|
||||||
|
|
||||||
@@ -89,7 +105,7 @@ namespace LotteryApplication {
|
|||||||
return;
|
return;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
||||||
#line 47 "..\..\..\MainWindow.xaml"
|
#line 48 "..\..\..\MainWindow.xaml"
|
||||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnExit);
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnExit);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -97,21 +113,27 @@ namespace LotteryApplication {
|
|||||||
return;
|
return;
|
||||||
case 3:
|
case 3:
|
||||||
|
|
||||||
#line 58 "..\..\..\MainWindow.xaml"
|
#line 59 "..\..\..\MainWindow.xaml"
|
||||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnMinimizeClick);
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnMinimizeClick);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
return;
|
return;
|
||||||
case 4:
|
case 4:
|
||||||
|
this.FirstTicket = ((System.Windows.Controls.TextBox)(target));
|
||||||
|
return;
|
||||||
|
case 5:
|
||||||
|
this.LastTicket = ((System.Windows.Controls.TextBox)(target));
|
||||||
|
return;
|
||||||
|
case 6:
|
||||||
|
|
||||||
#line 118 "..\..\..\MainWindow.xaml"
|
#line 136 "..\..\..\MainWindow.xaml"
|
||||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnRaffleClick);
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnRaffleClick);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
return;
|
return;
|
||||||
case 5:
|
case 7:
|
||||||
this.TicketList = ((System.Windows.Controls.ListBox)(target));
|
this.TicketList = ((System.Windows.Controls.ListBox)(target));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user