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 Lista_Jednokierunkowa
{
public partial class Form1 : Form
{
Kolejka kolejka
= new Kolejka
();
public Form1()
{
InitializeComponent();
checkedListBox1.SetItemChecked(0, true);
}
int a;
private void button1_Click(object sender, EventArgs e)
{
int x = 0;
Int32.TryParse(textBox1.Text, out x);
if (a == 0)
{
kolejka.Push(x);
}
if(a == 1)
{
stos.Push(x);
}
}
private void button2_Click(object sender, EventArgs e)
{
if (a == 0)
{
kolejka.Pop();
}
if (a == 1)
{
stos.Pop();
}
}
private void button3_Click(object sender, EventArgs e)
{
if (a == 0)
{
string str = kolejka.Length().ToString();
label1.Text = str;
}
if (a == 1)
{
string str = stos.Length().ToString();
label1.Text = str;
}
}
private void button4_Click(object sender, EventArgs e)
{
if (a == 0)
{
string str = kolejka.Show();
label2.Text = str;
}
if (a == 1)
{
string str = stos.Show();
label2.Text = str;
}
}
private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
int iSelectedIndex = checkedListBox1.SelectedIndex;
if (iSelectedIndex == -1)
return;
for (int iIndex = 0; iIndex < checkedListBox1.Items.Count; iIndex++)
checkedListBox1
.SetItemCheckState(iIndex, CheckState
.Unchecked);
checkedListBox1
.SetItemCheckState(iSelectedIndex, CheckState
.Checked);
if (checkedListBox1.GetItemChecked(0) == true)
{
a = 0;
}
if (checkedListBox1.GetItemChecked(1) == true)
{
a = 1;
}
}
}
}
{"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"}