p align="justify"> {= MessageBox. Show («Зберегти поточний файл?», «Інформація», MessageBoxButtons. YesNo, MessageBoxIcon. Question); (DialogResult == DialogResult. Yes)
{. Preservation (Path);
} if (DialogResult == DialogResult. No)
{= 0;=null;
сохранітьToolStripMenuItem. Visible=false;
Робота з данниміToolStripMenuItem. Visible=false;
сохранітьКакToolStripMenuItem. Visible=false ;. Rows. Clear () ;. Nodes. Clear () ;. Show («Поточна сесія обнулено, тепер можете відкрити новий файл», «Інформація», MessageBoxButtons.OK, MessageBoxIcon. Information);
}
}
}
void древовідностьToolStripMenuItem_Click (object sender, EventArgs e)
{. Visible=false ;. Visible=true;
}
void табліцаToolStripMenuItem_Click (object sender, EventArgs e)
{. Visible=true ;. Visible=false;
}
void сохранітьToolStripMenuItem_Click (object sender, EventArgs e)
{. Preservation (Path);
} void ізменітьToolStripMenuItem_Click (object sender, EventArgs e)
{f=new Form2 (); (f. ShowDialog () == DialogResult.OK)
{. Sub (f.textBox1. Text, f.textBox2. Text) ;. Loading (treeView1, dataGridView1);
}
}
void удаленіеToolStripMenuItem_Click (object sender, EventArgs e)
{f=new Form3 () ;. Text=«Видалення»;. Label1. Text=«Введіть значення для видалення»;
f.button1. Text=«Видалити»; (f. ShowDialog () == DialogResult.OK)
{. Removal (f.textBox1. Text) ;. Loading (treeView1, dataGridView1);
}
}
void сохранітьКакToolStripMenuItem_Click (object sender, EventArgs e)
{. Filter=«Текстовий файл | * .txt»; (saveFileDialog1. ShowDialog () == DialogResult.OK)
{. Preservation (saveFileDialog1. FileName);
}
}
void вставкаToolStripMenuItem_Click (object sender, EventArgs e)
{view=new Notebook (); f=new Form4 (); (int i=0; i lt; view.sports. Count (); i ++)
{. comboBox1. Items. Add (view.sports [i]);
} (f. ShowDialog () == DialogResult.OK)
{. Add (new Notebook (f.textBox1. Text, f.textBox2. Text, fboBox1. Text)) ;. Loading (treeView1, dataGridView1);
}
}
void Form1_FormClosing (object sender, FormClosingEventArgs e)
{(ekz!=null)
{= MessageBox. Show («Зберегти інформацію?», «Інформація», MessageBoxButtons. YesNoCancel, MessageBoxIcon. Question); (DialogResult == DialogResult. Yes)
{. Preservation (Path);
} if (DialogResult == DialogResult. No)
{();
} if (DialogResult == DialogResult. Cancel)
{();
}
}
}
void поіскЕлементаToolStripMenuItem_Click (object sender, EventArgs e)
{f=new Form3 () ;. Text=«Пошук»;. Label1. Text=«Введіть значення для пошуку»;
f.button1. Text=«Пошук»; (f. ShowDialog () == DialogResult.OK)
{. Quest (f.textBox1. Text, dataGridView1, treeView1);
}
}
static TreeNode [] Coloor_Blue=null;
void поіскToolStripMenuItem1_Click (object sender, EventArgs e)
{ lt; Notebook gt; Data=ekz;=ekz. Top (Data); (ekz!=Null)//Якщо корінь є
{i=0; Stop=false; (dataGridView1. Rows. Count gt; i)
{(dataGridView1. Rows [i] .DefaultCellStyle. BackColor == Color. Blue)
{. Rows [i] .DefaultCellStyle. BackColor=Color. White ;;
}
{++;
}
} (Coloor_Blue!=null)
{. SelectedNode=Coloor_Blue [0] ;. SelectedNode. BackColor=Color. White;
}=0; (Stop!=true)
{(dataGridView1 [0, i] .Value. ToString () == (Data. Value as Notebook) .FIO_OutPut)
{. Rows [i] .DefaultCellStyl...