Sign up
Login
New
Trending
Archive
English
English
Sign up
Login
New Paste
Add Image
//using System; //using System.Collections.Generic; //using System.ComponentModel; //using System.Data; //using System.Drawing; //using System.Linq; //using System.Text; //using System.Threading.Tasks; //using System.Windows.Forms; //namespace Card //{ // public partial class Form1 : Form // { // public Form1() // { // InitializeComponent(); // } // private void pictureBox1_Click(object sender, EventArgs e) // { // } // private void pictureBox2_Click(object sender, EventArgs e) // { // } // private void pictureBox3_Click(object sender, EventArgs e) // { // } // private void listBox1_SelectedIndexChanged(object sender, EventArgs e) // { // } // private void button1_Click(object sender, EventArgs e) // { // } // private void button2_Click(object sender, EventArgs e) // { // } // } //} using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Card { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void pictureBox1_Click(object sender, EventArgs e) { } private void pictureBox2_Click(object sender, EventArgs e) { } private void pictureBox3_Click(object sender, EventArgs e) { } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { // Optional: enable/disable the Show Card button based on selection button1.Enabled = listBox1.SelectedItem != null; } private void button1_Click(object sender, EventArgs e) { var selected = listBox1.SelectedItem as string; if (string.IsNullOrWhiteSpace(selected)) { MessageBox.Show("Please select a card from the list.", "No selection", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } // Normalize for case-insensitive comparison switch (selected.Trim().ToLowerInvariant()) { case "ace of spades": pictureBox1.Visible = true; pictureBox2.Visible = false; pictureBox3.Visible = false; break; case "10 hearts": pictureBox1.Visible = false; pictureBox2.Visible = true; pictureBox3.Visible = false; break; case "king club": pictureBox1.Visible = false; pictureBox2.Visible = false; pictureBox3.Visible = true; break; case "all card": case "all cards": pictureBox1.Visible = true; pictureBox2.Visible = true; pictureBox3.Visible = true; break; default: MessageBox.Show("Unknown selection.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); break; } } private void button2_Click(object sender, EventArgs e) { // Exit the form/application this.Close(); } private void Form1_Load(object sender, EventArgs e) { } } }
Settings
Title :
[Optional]
Paste Folder :
[Optional]
Select
Syntax :
[Optional]
Select
Markup
CSS
JavaScript
Bash
C
C#
C++
Java
JSON
Lua
Plaintext
C-like
ABAP
ActionScript
Ada
Apache Configuration
APL
AppleScript
Arduino
ARFF
AsciiDoc
6502 Assembly
ASP.NET (C#)
AutoHotKey
AutoIt
Basic
Batch
Bison
Brainfuck
Bro
CoffeeScript
Clojure
Crystal
Content-Security-Policy
CSS Extras
D
Dart
Diff
Django/Jinja2
Docker
Eiffel
Elixir
Elm
ERB
Erlang
F#
Flow
Fortran
GEDCOM
Gherkin
Git
GLSL
GameMaker Language
Go
GraphQL
Groovy
Haml
Handlebars
Haskell
Haxe
HTTP
HTTP Public-Key-Pins
HTTP Strict-Transport-Security
IchigoJam
Icon
Inform 7
INI
IO
J
Jolie
Julia
Keyman
Kotlin
LaTeX
Less
Liquid
Lisp
LiveScript
LOLCODE
Makefile
Markdown
Markup templating
MATLAB
MEL
Mizar
Monkey
N4JS
NASM
nginx
Nim
Nix
NSIS
Objective-C
OCaml
OpenCL
Oz
PARI/GP
Parser
Pascal
Perl
PHP
PHP Extras
PL/SQL
PowerShell
Processing
Prolog
.properties
Protocol Buffers
Pug
Puppet
Pure
Python
Q (kdb+ database)
Qore
R
React JSX
React TSX
Ren'py
Reason
reST (reStructuredText)
Rip
Roboconf
Ruby
Rust
SAS
Sass (Sass)
Sass (Scss)
Scala
Scheme
Smalltalk
Smarty
SQL
Soy (Closure Template)
Stylus
Swift
TAP
Tcl
Textile
Template Toolkit 2
Twig
TypeScript
VB.Net
Velocity
Verilog
VHDL
vim
Visual Basic
WebAssembly
Wiki markup
Xeora
Xojo (REALbasic)
XQuery
YAML
HTML
Expiration :
[Optional]
Never
Self Destroy
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Status :
[Optional]
Public
Unlisted
Private (members only)
Password :
[Optional]
Description:
[Optional]
Tags:
[Optional]
Encrypt Paste
(
?
)
Create Paste
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Site Languages
×
English