Skip to content
Snippets Groups Projects
Commit e98a49f6 authored by bionic85's avatar bionic85
Browse files

Merge branch 'BlackJackEZFast'

parents bc32c056 eab27e55
No related branches found
No related tags found
No related merge requests found
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace PuzzlePlayer_Namespace
{
internal class BlackJack : Form
{
public BlackJack()
{
Paint += BlackJack_Paint;
Size = new Size(500, 400);
}
private void BlackJack_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
Graphics g = e.Graphics;
string s = "CRAZY BLACKJACK READY TO GO GAMBLING??";
Point p = new Point(0,0);
Image img = Image.FromFile("../../..//Resources/bj.jpg");
g.DrawImage(img,new Point(0,0));
g.DrawString(s, SettingForm.mainFont, Brushes.Red, p);
}
}
}
......@@ -10,14 +10,14 @@ namespace PuzzlePlayer_Namespace
{
internal static void Main(string[] args)
{
Application.Run(new MainForm()); //nnew PuzzleForm(new Maze())
Application.Run(new MainForm());
}
}
internal class MainForm : Form
{
List<PuzzleForm> puzzleForms = new List<PuzzleForm>();
BlackJack bj;
public MainForm()
{
SetUpPuzzleForms();
......@@ -154,12 +154,50 @@ namespace PuzzlePlayer_Namespace
this.MinimumSize = new Size(button.Width + 56, button.Height + 83);
}
}
// add BlackJackbutton
buttonsPanel.Controls.Add(SetUpBlackJackButton());
this.Controls.Add(menuStrip);
this.Controls.Add(buttonsPanel);
menuStrip.Items.Add(menuSettings);
menuStrip.BringToFront();
}
RoundedButton SetUpBlackJackButton()
{
RoundedButton blackJackButton = new RoundedButton();
bj = new BlackJack();
blackJackButton.Text = "BlackJack";
blackJackButton.Margin = new Padding(10);
blackJackButton.Height = 345;
blackJackButton.Width = 345;
blackJackButton.Image = Image.FromFile("../../..//Resources/bj.jpg");
blackJackButton.FlatStyle = FlatStyle.Flat;
blackJackButton.Font = SettingForm.mainFont;
blackJackButton.Click += (object o, EventArgs e) => {
this.Hide();
bj.FormClosed += (object o, FormClosedEventArgs fcea) =>
{
this.BackColor = SettingForm.primaryColor;
this.ForeColor = SettingForm.tertiaryColor;
foreach (Control control in this.Controls)
{
SettingForm.UpdateSettings(control);
}
this.Show();
bj = new BlackJack(); //cheeky dw
};
bj.Show();
};
return blackJackButton;
}
}
}
......@@ -2,6 +2,9 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<ItemGroup>
<Compile Update="BlackJack.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="PuzzleForm.cs">
<SubType>Form</SubType>
</Compile>
......
PuzzlePlayer/Resources/bj.jpg

34.2 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment