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 WindowsFormsApp5
{
public partial class Form1 : Form
{
int i=1;
bool Answer = false;
int happy, sad, indifferent;
public Form1()
{
InitializeComponent();
}
private void label2_Click(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void Next1_Click(object sender, EventArgs e)
{
i++;
if(i==2)
{
if (Answer)
{
sad+=2;
indifferent++;
}
else
{
happy++;
}
NumberOfQuestion.Text = "Pytanie 2/5";
Question.Text = "Czy jesteś uśmiechnięty?";
}
if(i==3)
{
if (Answer)
{
happy++;
}
else
{
indifferent+=2;
sad++;
}
NumberOfQuestion.Text = "Pytanie 3/5";
Question.Text = "Czy w ostatnich dniach przydarzyło Ci się coś niesamowitego?";
}
if (i == 4)
{
if (Answer)
{
happy+=3;
}
else
{
indifferent++;
sad++;
}
NumberOfQuestion.Text = "Pytanie 4/5";
Question.Text = "Czy w ostatnich dniach uprawiałeś sport?";
}
if (i == 5)
{
if (Answer)
{
happy+=2;
}
else
{
indifferent+=2;
sad ++;
}
NumberOfQuestion.Text = "Pytanie 5/5";
Question.Text = "Czy w ostantich dniach przydarzyło Ci się coś smutnego?";
NextButton.Text = "Podsumowanie";
}
if(i==6)
{
if (Answer == true)
{
sad += 5;
}
else
{
indifferent+=2;
sad++;
}
if(sad>happy&&sad>indifferent)
{
NumberOfQuestion.Text = "Jesteś smutny! :(";
Question.Visible = false;
ButtonNie1.Visible = false;
ButtonTak1.Visible = false;
}
else if(happy>sad&&happy>indifferent)
{
NumberOfQuestion.Text = "Jesteś wesoły! :)";
Question.Visible = false;
ButtonNie1.Visible = false;
ButtonTak1.Visible = false;
}
else if(indifferent>happy&& indifferent>sad)
{
NumberOfQuestion.Text = "Jesteś obojętny :|";
Question.Visible = false;
ButtonNie1.Visible = false;
ButtonTak1.Visible = false;
}
}
}
private void ButtonTak1_CheckedChanged(object sender, EventArgs e)
{
Answer=true;
}
private void ButtonNie1_CheckedChanged(object sender, EventArgs e)
{
Answer = false;
}
}
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}