Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Selection()
- {
- flag = true;
- position = 0;
- textBox1.Enabled = true;
- textBox2.Enabled = true;
- textBox3.Enabled = true;
- Findindex();
- if (textBox4.Text.Length != 0 && t.Item1 != -1)
- {
- position = t.Item1;
- Output();
- IsMaster();
- CheckButton();
- CheckMenu();
- }
- else if ((textBox4.Text.Length != 0 && t.Item1 == -1))
- {
- position=-1;
- textBox1.Clear();
- textBox2.Clear();
- textBox3.Clear();
- textBox5.Clear();
- textBox1.Enabled = false;
- textBox2.Enabled = false;
- textBox3.Enabled = false;
- textBox5.Enabled = false;
- }
- else
- {
- position = 0;
- flag = false;
- if (list.Count() != 0)
- {
- Output();
- IsMaster();
- }
- else {
- textBox1.Enabled = false;
- textBox2.Enabled = false;
- textBox3.Enabled = false;
- }
- CheckButton();
- CheckMenu();
- }
- }
- private void удалитьToolStripMenuItem_Click(object sender, EventArgs e)
- {
- /* if (flag && position <= t.Item2 && position > t.Item1)
- {
- int it1 = t.Item1;
- int it2 = t.Item2-1;
- t = (it1, it2);
- }
- else if (flag && position < t.Item2 && position <= t.Item1)
- {
- int it1 = t.Item1+1;
- int it2 = t.Item2-1;
- t = (it1, it2);
- }*/
- list.RemoveAt(position);
- if (flag && position < t.Item2 && position > t.Item1)
- {
- int it1 = t.Item1;
- int it2 = t.Item2 - 1;
- t = (it1, it2);
- }
- else if (position == list.Count() || (position == t.Item2))
- {
- if (flag)
- {
- Findindex();
- position = t.Item2;
- }
- else position--;
- }
- else if (flag && position == t.Item1)
- {
- Findindex();
- position = t.Item1;
- }
- if (list.Count == 0 || (t.Item1 == -1 && flag))
- {
- textBox1.Clear();
- textBox2.Clear();
- textBox3.Clear();
- textBox5.Clear();
- textBox1.Enabled = false;
- textBox2.Enabled = false;
- textBox3.Enabled = false;
- textBox5.Enabled = false;
- button3.Visible = false;
- return;
- }
- Output();
- IsMaster();
- CheckButton();
- CheckMenu();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement