public CSudocuControl()
 {
     InitializeComponent();
     _UpdateSudocuEvent = new UpdateSudocuEvent(_UpdateSudocu);
     _Sudocu            = new Crossword();
     _Sudocu.SetSize(10, 20);
 }
        private void btnSave_Click(object sender, EventArgs e)
        {
            // Сохраняем
            SaveFileDialog saveFileDialog = new SaveFileDialog();

            saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            saveFileDialog.Filter           = "(*.xml)|*.xml";
            if (DialogResult.OK == saveFileDialog.ShowDialog(this))
            {
                // Формируем объект для сохранения
                Crossword newSudocu = new Crossword();
                newSudocu.SetSize((byte)numWidth.Value, (byte)numHeigth.Value);

                Byte RowIndex = 0;
                foreach (DataGridViewRow row in dataHorizontal.Rows)
                {
                    for (Byte i = 1; i < row.Cells.Count; i++)
                    {
                        try
                        {
                            byte value = (byte)(Int32)row.Cells[i].Value;
                            newSudocu.Horizontal[RowIndex].Add(value);
                        }
                        catch
                        { }
                    }
                    RowIndex++;
                }

                RowIndex = 0;
                foreach (DataGridViewRow row in dataVertical.Rows)
                {
                    for (Byte i = 1; i < row.Cells.Count; i++)
                    {
                        try
                        {
                            byte value = (byte)(Int32)row.Cells[i].Value;
                            newSudocu.Vertical[RowIndex].Add(value);
                        }
                        catch
                        { }
                    }
                    RowIndex++;
                }
                newSudocu.Save(saveFileDialog.FileName);
            }
        }