예제 #1
0
        private void DeleteButton_Click(object sender, EventArgs e)
        {
            Month month = Helper.Deserialize(path);

            if (month.Days.Count != 0)
            {
                ToolWindow tWindow = new ToolWindow(path, this);
                tWindow.Size = new Size(424, 283);
                (tWindow.Controls["deletePanel"] as Panel).BringToFront();
                Helper.AddDaysToComboBox(path, (tWindow.Controls["deletePanel"].Controls["dayBox"] as ComboBox));
                Helper.AddTempToComboBox(path, (tWindow.Controls["deletePanel"].Controls["tempBox"] as ComboBox));
                tWindow.ShowDialog();
            }
            else
            {
                MessageBox.Show("База данных пуста!", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }