Click here to Skip to main content
15,441,149 members
Home / Discussions / C#
   

C#

 
GeneralRe: VS2012 Pin
OriginalGriff1-Feb-14 1:07
mveOriginalGriff1-Feb-14 1:07 
AnswerRe: VS2012 Pin
BillWoodruff1-Feb-14 0:53
mveBillWoodruff1-Feb-14 0:53 
GeneralRe: VS2012 Pin
Sandhya Bandar1-Feb-14 0:57
MemberSandhya Bandar1-Feb-14 0:57 
QuestionSqlDependency process... Pin
byerkan31-Jan-14 23:53
Memberbyerkan31-Jan-14 23:53 
AnswerRe: SqlDependency process... Pin
Eddy Vluggen1-Feb-14 6:45
professionalEddy Vluggen1-Feb-14 6:45 
QuestionHow to export extjs chart into pdf? Pin
Janu Kya Kar Rahi ho31-Jan-14 18:53
MemberJanu Kya Kar Rahi ho31-Jan-14 18:53 
QuestionRe: How to export extjs chart into pdf? Pin
Richard MacCutchan31-Jan-14 22:16
mveRichard MacCutchan31-Jan-14 22:16 
QuestionHow do I keep a player from override another player's move by reclicking a button Pin
Member 1045350931-Jan-14 9:29
MemberMember 1045350931-Jan-14 9:29 
Tic Tac Toe

code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Tic Tac Toe
{
public partial class Form1 : Form
{
private GameManager game_manager = new GameManager();

public Form1()
{
InitializeComponent();
}

private void Clicked(object sender, EventArgs e)
{
Button button = (Button)sender;
switch (button.Name)
{
case "button1":
game_manager.ButtonClicked(0, button, label1);
break;
case "button2":
game_manager.ButtonClicked(1, button, label1);
break;
case "button3":
game_manager.ButtonClicked(2, button, label1);
break;
case "button4":
game_manager.ButtonClicked(3, button, label1);
break;
case "button5":
game_manager.ButtonClicked(4, button, label1);
break;
case "button6":
game_manager.ButtonClicked(5, button, label1);
break;
case "button7":
game_manager.ButtonClicked(6, button, label1);
break;
case "button8":
game_manager.ButtonClicked(7, button, label1);
break;
case "button9":
game_manager.ButtonClicked(8, button, label1);
break;
}
}

private void label1_Click(object sender, EventArgs e)
{
label1.Text = "";
label2.Text = "";
}

private void resetButton_Click(object sender, EventArgs e)
{
button1.Text = "";
button2.Text = "";
button3.Text = "";
button4.Text = "";
button5.Text = "";
button6.Text = "";
button7.Text = "";
button8.Text = "";
button9.Text = "";


}

private void Form1_Load(object sender, EventArgs e)
{

}


}
}
AnswerRe: How do I keep a player from override another player's move by reclicking a button Pin
Dave Kreskowiak31-Jan-14 13:45
mveDave Kreskowiak31-Jan-14 13:45 
AnswerRe: How do I keep a player from override another player's move by reclicking a button Pin
agent_kruger31-Jan-14 23:13
professionalagent_kruger31-Jan-14 23:13 
JokeRe: How do I keep a player from override another player's move by reclicking a button Pin
Eddy Vluggen1-Feb-14 8:17
professionalEddy Vluggen1-Feb-14 8:17 
GeneralRe: How do I keep a player from override another player's move by reclicking a button Pin
agent_kruger1-Feb-14 18:45
professionalagent_kruger1-Feb-14 18:45 
Questionc# extension methods syntax question Pin
Jon Joeney30-Jan-14 23:23
MemberJon Joeney30-Jan-14 23:23 
AnswerRe: c# extension methods syntax question Pin
harold aptroot31-Jan-14 0:05
Memberharold aptroot31-Jan-14 0:05 
AnswerRe: c# extension methods syntax question Pin
OriginalGriff31-Jan-14 0:23
mveOriginalGriff31-Jan-14 0:23 
GeneralRe: c# extension methods syntax question Pin
BillWoodruff31-Jan-14 5:56
mveBillWoodruff31-Jan-14 5:56 
GeneralRe: c# extension methods syntax question Pin
OriginalGriff31-Jan-14 6:06
mveOriginalGriff31-Jan-14 6:06 
AnswerRe: c# extension methods syntax question Pin
BillWoodruff31-Jan-14 0:57
mveBillWoodruff31-Jan-14 0:57 
GeneralRe: c# extension methods syntax question Pin
Richard Deeming31-Jan-14 2:05
mveRichard Deeming31-Jan-14 2:05 
GeneralRe: c# extension methods syntax question Pin
BillWoodruff31-Jan-14 5:48
mveBillWoodruff31-Jan-14 5:48 
AnswerRe: c# extension methods syntax question Pin
Ennis Ray Lynch, Jr.31-Jan-14 9:49
MemberEnnis Ray Lynch, Jr.31-Jan-14 9:49 
QuestionConsole Application c# & use shape & color Pin
vajihe.mirzaei30-Jan-14 5:38
Membervajihe.mirzaei30-Jan-14 5:38 
AnswerRe: Console Application c# & use shape & color Pin
OriginalGriff30-Jan-14 5:57
mveOriginalGriff30-Jan-14 5:57 
AnswerRe: Console Application c# & use shape & color Pin
Dave Kreskowiak30-Jan-14 6:18
mveDave Kreskowiak30-Jan-14 6:18 
AnswerRe: Console Application c# & use shape & color Pin
Rahul VB30-Jan-14 17:45
professionalRahul VB30-Jan-14 17:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.